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
| Parameter | Type | Required | Description |
|---|---|---|---|
customerToken | string | Yes | Customer token |
cardToken | string | Yes | Saved card token |
reference | string | Yes | Unique payment reference |
currency | string | Yes | ISO 4217 currency code |
amount | string | Yes | Transaction amount |
merchantAccountId | string | Yes | Your merchant account ID |
secret | string | Yes | CVV/CVC |
saveCard | boolean | No | Set to true to keep / refresh the saved card |
customerBrowserUserAgent | string | Yes | Browser user agent (used for 3DS) |
customerIP | string | Yes | Customer IP address (used for 3DS) |
webhookUrl | string | No | URL 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
| Field | Type | Description |
|---|---|---|
data.reference | string | Payment reference |
data.container_type | string | Container type for the next customer action |
data.redirect_to | string | null | 3DS URL when required; null when no redirect is needed |
To delete a stored card, use Remove Saved Card.