Esenda
Recurring Payments

Payment Request

Charge a customer using a saved tokenised card

Process a payment using a previously tokenised card. The request is queued for processing and status updates are delivered via webhooks.

Production: POST https://api.esenda.com/v2/partner/recurring-payment/{shortcode}/charge

Sandbox: POST https://api-demo.esenda.com/v2/partner/recurring-payment/{shortcode}/charge

Headers

Accept-Language: <LANGUAGE>   (optional, default en-GB)
Authorization:   Bearer <ACCESS_TOKEN>
Content-Type:    application/json

Request Parameters

ParameterTypeConstraintsRequiredDescriptionExample
tokenised_card_idStringmax: 255YesThe unique card identifier from the tokenisation responsec3e7f8a9-...
idempotency_idStringmin: 1, max: 50, alphanumeric/underscore/hyphenYesUnique idempotency identifier for this request8e87ef2a-9faf-...
amountIntegermin: 1500, max: 1000000YesPayment amount in pence (e.g. 1500 = £15.00)1500
send_confirmation_emailBoolean—NoSend email receipt on successful payment. Defaults to falsetrue
descriptionStringmax: 255NoPayment description for customer recordsSchool fees payment
referenceStringmax: 255NoYour internal reference for this paymentINV-2024-001
notification_urlStringmax: 512, valid URLNoWebhook URL for payment status notificationshttps://your-site.com/webhooks

Payload Example

{
  "tokenised_card_id": "c3e7f8a9-1234-5678-9012-3456789abcde",
  "idempotency_id": "8e87ef2a-9faf-4627-9a54-8aca13890335",
  "amount": 1500,
  "send_confirmation_email": true,
  "description": "School fees payment",
  "reference": "INV-2024-001",
  "notification_url": "https://your-site.com/webhooks"
}

Responses

200 — Queued

The payment is queued. Watch for Payment Webhooks for status updates.

{
  "idempotency_id": "8e87ef2a-9faf-4627-9a54-8aca13890335",
  "tokenised_card_id": "c3e7f8a9-1234-5678-9012-3456789abcde",
  "amount": 1500,
  "status": "queued",
  "reference": "INV-2024-001",
  "created_at": "2024-01-23 14:42:19.999462"
}

400 — Error

{
  "error": "No active cards",
  "message": "No active cards found for tokenised_card_id: c3e7f8a9-1234-5678-9012-3456789abcde"
}

On this page