Recurring Payments
Tokenise Card
Tokenise a card for future recurring payments
Create a secure iframe session to capture and tokenise a customer's payment card.
Production: POST https://api.esenda.com/v2/partner/recurring-payment/{shortcode}/tokenise-card
Sandbox: POST https://api-demo.esenda.com/v2/partner/recurring-payment/{shortcode}/tokenise-card
Headers
Accept-Language: <LANGUAGE> (optional, default en-GB)
Authorization: Bearer <ACCESS_TOKEN>
Content-Type: application/jsonRequest Parameters
| Parameter | Type | Constraints | Required | Description | Example |
|---|---|---|---|---|---|
customer_name | String | max: 255 | Yes | The customer's full name | John Smith |
customer_email | String | max: 255, valid email | Yes | Customer's email address for notifications | john.smith@example.com |
Payload Example
{
"customer_name": "John Smith",
"customer_email": "john.smith@example.com"
}Responses
200 — Success
Store the tokenised_card_id and embed tokenisation_url as an iframe src.
{
"tokenised_card_id": "c3e7f8a9-1234-5678-9012-3456789abcde",
"tokenisation_url": "https://checkout.esenda.com/tokenise/c3e7f8a9-1234-5678-9012-3456789abcde",
"status": "pending"
}400 — Error
{
"error": "Invalid request",
"message": "customer_email is required"
}