S2S Payment with Save Card
Process a Server-to-Server card payment and store the card for later charges.
Use this when the customer is paying with a raw card for the first time and you want to keep a cardToken for future payments. customerToken is required when saveCard is true. After a successful save, list tokens with Get Saved Card Tokens.
Endpoint Information
Name: S2S Payment with Save Card
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}}",
"card": "4111111111111111",
"secret": "123",
"expiryDate": "{{expiry_date}}",
"cardName": "TEST TEST",
"saveCard": true,
"customerBrowserUserAgent": "Mozilla 52.0",
"customerIP": "127.0.0.1"
}
Key Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
reference | string | Yes | Unique payment reference (10+ characters, no special characters) |
customerToken | string | Yes | Customer token. Required when saving a card |
currency | string | Yes | ISO 4217 currency code |
amount | string | Yes | Transaction amount |
merchantAccountId | string | Yes | Your merchant account ID |
card | string | Yes | Full card number (PAN) |
secret | string | Yes | CVV/CVC |
expiryDate | string | Yes | Card expiry (MM/YY) |
cardName | string | Yes | Cardholder name |
saveCard | boolean | Yes | Set to true to store the card and return a cardToken |
customerBrowserUserAgent | string | Yes | Browser user agent (used for 3DS) |
customerIP | string | Yes | Customer IP address (used for 3DS) |
ttl | number | No | Time to live in minutes |
tagName | string | No | Optional tag for the payment |
webhookUrl | string | No | URL for payment status notifications |
Response
Success Response (3DS redirect)
When the issuer requires 3D Secure, container_type is redirect and redirect_to contains the ACS URL. Send the customer to that URL to complete authentication.
{
"success": true,
"message": "Payment Request Processing",
"data": {
"success": true,
"reference": "12414312-14313212-121432312-132312321",
"reference_id": "12312312-132312132-132131312-1312313",
"container_type": "redirect",
"redirect_to": "https://api.sandbox.checkout.com/sessions-interceptor/sid_sdjhbfiuwye97y24r86gy26823",
"errors": []
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
data.reference | string | Payment reference |
data.reference_id | string | Internal reference ID |
data.container_type | string | redirect when 3DS is required |
data.redirect_to | string | 3DS / session URL. Redirect the customer here when not null |
Next steps
- Get Saved Card Tokens — retrieve the stored
cardToken - S2S Payment using Card Token — charge the saved card