Esenda
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/json

Request Parameters

ParameterTypeConstraintsRequiredDescriptionExample
customer_nameStringmax: 255YesThe customer's full nameJohn Smith
customer_emailStringmax: 255, valid emailYesCustomer's email address for notificationsjohn.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"
}

On this page