Skip to main content

S2S Payment with Card Token and Customer Token

Charge a saved card by sending both cardToken and customerToken on the same Server-to-Server request.

Use this when you already have the customer token and the saved card token from Get Saved Card Tokens. Unlike S2S Payment using Card Token, this body also sets saveCard and omits a 3DS redirect when the issuer does not require it (redirect_to is null).

Endpoint Information

Name: S2S Payment with Card Token and Customer 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

{
"customerToken": "{{customerToken}}",
"reference": "{{$guid}}",
"currency": "USD",
"amount": "70",
"webhookUrl": "{{webhookUrl}}",
"merchantAccountId": "{{merchantAccountId}}",
"cardToken": "{{cardToken}}",
"secret": "123",
"saveCard": true,
"customerBrowserUserAgent": "Mozilla 52.0",
"customerIP": "127.0.0.1"
}

Key Parameters

ParameterTypeRequiredDescription
customerTokenstringYesCustomer token
cardTokenstringYesSaved card token
referencestringYesUnique payment reference
currencystringYesISO 4217 currency code
amountstringYesTransaction amount
merchantAccountIdstringYesYour merchant account ID
secretstringYesCVV/CVC
saveCardbooleanNoSet to true to keep / refresh the saved card
customerBrowserUserAgentstringYesBrowser user agent (used for 3DS)
customerIPstringYesCustomer IP address (used for 3DS)
webhookUrlstringNoURL for payment status notifications

Response

Success Response

When 3DS is not required, redirect_to is null and the payment can complete without a customer redirect.

{
"success": true,
"message": "Payment Request Processed",
"data": {
"success": true,
"reference": "d6da28b2-9eb8-43f7-bd4a-049971ebbcca",
"container_type": "redirect",
"redirect_to": null,
"errors": []
}
}

Response Fields

FieldTypeDescription
data.referencestringPayment reference
data.container_typestringContainer type for the next customer action
data.redirect_tostring | null3DS URL when required; null when no redirect is needed

To delete a stored card, use Remove Saved Card.