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) and the customer details. To send both cardToken and customerToken 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

{
"firstName": "Test",
"middleName": "", // optional
"lastName": "Customer",
"reference": "{{$guid}}",
"email": "[email protected]",
"dob": "1990-01-01", // optional but format must be yyyy-mm-dd if present
"contactNumber": "+12345678",
"address": "test",
"country": "SE",
"state": "test",
"city": "test",
"zipCode": "1212",
"currency": "USD",
"amount": "110",
"webhookUrl": "{{webhookUrl}}", // optional, max 255 characters
"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
firstNamestringYesCustomer's first name
middleNamestringNoCustomer's middle name
lastNamestringYesCustomer's last name
referencestringYesUnique payment reference
emailstringYesCustomer's email address
dobstringYesDate of birth (YYYY-MM-DD)
contactNumberstringYesContact number with country code
addressstringYesCustomer address
countrystringYesCountry name or ISO 3166-1 alpha-2 code
statestringYesState/province
citystringYesCity
zipCodestringYesPostal/ZIP code
currencystringYesISO 4217 currency code
amountstringYesTransaction amount
webhookUrlstringNoURL for payment status notifications. Max 255 characters
merchantAccountIdstringYesYour merchant account ID
cardTokenstringYesSaved card token from Get Saved Card Tokens
secretstringYesCVV/CVC
customerBrowserUserAgentstringYesBrowser user agent (used for 3DS)
customerIPstringYesCustomer IP address (used for 3DS)

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