Skip to main content

S2S Payment using Card Token

Charge a previously saved card by sending cardToken instead of the full PAN.

Get cardToken from Get Saved Card Tokens. Still send secret (CVV). customerToken is required for this flow. To send both tokens explicitly with saveCard, see S2S Payment with Card Token and Customer Token.

Endpoint Information

Name: S2S Payment using Card Token
Method: POST
URL: {{base_url}}/api/v1/payment/process-transaction

Authentication

Type: Basic Auth

  • Username: App Key
  • Password: Secret Key

Request Body

Content-Type: application/json

{
"reference": "test26080001",
"customerToken": "{{customerToken}}",
"currency": "USD",
"amount": "100.00",
"ttl": 5,
"tagName": "Tag",
"webhookUrl": "https://example.test",
"merchantAccountId": "{{merchantAccountId}}",
"cardToken": "{{cardToken}}",
"secret": "123",
"customerBrowserUserAgent": "Mozilla 52.0",
"customerIP": "127.0.0.1"
}

Do not send card, expiryDate, or cardName when paying with cardToken.

Key Parameters

ParameterTypeRequiredDescription
referencestringYesUnique payment reference (10+ characters, no special characters)
customerTokenstringYesCustomer token associated with the saved card
cardTokenstringYesSaved card token from Get Saved Card Tokens
secretstringYesCVV/CVC
currencystringYesISO 4217 currency code
amountstringYesTransaction amount
merchantAccountIdstringYesYour merchant account ID
customerBrowserUserAgentstringYesBrowser user agent (used for 3DS)
customerIPstringYesCustomer IP address (used for 3DS)
ttlnumberNoTime to live in minutes
tagNamestringNoOptional tag for the payment
webhookUrlstringNoURL for payment status notifications

Response

Success Response (3DS redirect)

When 3DS is required, redirect the customer to redirect_to.

{
"success": true,
"message": "Payment Request Processing",
"data": {
"success": true,
"reference": "6be4b237-ca3f-47c2-890b-411b7a54e121",
"reference_id": "6be4b237-ca3f-47c2-890b-411b7a54e121",
"container_type": "redirect",
"redirect_to": "https://api.sandbox.checkout.com/sessions-interceptor/sid_rl64ulqb5v6ytnjorexz55rwfm",
"errors": []
}
}

Response Fields

FieldTypeDescription
data.referencestringPayment reference
data.reference_idstringInternal reference ID
data.container_typestringredirect when 3DS is required
data.redirect_tostring3DS / session URL. Redirect the customer here when not null