API REFERENCE
Token Payments
Applies to: initiating Token payments - credit cards
After the payer completes a standard credit card transaction on the YabandPay hosted payment page and gives consent, YabandPay converts sensitive cardholder data into a random numeric string (a Token) to remove identifying information. The Token can be used for the following payments:
- Users can pay with one click on the checkout page without entering credit card details.
- Merchants can use this Token for recurring payments, subscription charges, and similar purposes.
[!TIP|style:flat] Workflow
- Enable Token payments. Contact your account manager to activate the Token payment feature.
- Obtain user consent. When enabling express payments (Token payments) for consumers, you must clearly inform users and obtain their consent to avoid potential disputes.
- Get a Token. First, initiate a standard credit card transaction. YabandPay returns a payment url. After the user completes payment through that url and gives consent, YabandPay returns the Token in an asynchronous notification using the payment_token_object parameter.
- Initiate a Token payment. Include the Token in the payment_token_object variable. If Token validation succeeds, YabandPay processes the Token payment. If validation fails, YabandPay returns an error. In that case, we recommend initiating another standard credit card transaction to obtain a Token and then initiating payment again.
| Parameter | Type | Description | Required |
|---|---|---|---|
| user | String | Cashier account UID | Required |
| sign | String | Signature | Required |
| method | String | v3.CreateCardPayments | Required |
| time | Long | Timestamp | Required |
- Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| pay_method | String | online | Required |
| sub_pay_method | String | Token | Required |
| operation | String | 11.Token for sales 12.Token for authorisation; | Required |
| order_id | String | Merchant order ID | Required |
| 3ds_initiate | String | 01. Enable 3DS verification; 02. Disable 3DS (requires activation approval); 03. SCA exemption (requires activation approval). | Required |
| sca_exemption | String | LowValue | 3ds_initiate=03 Required |
| amount | String | Amount as a numeric string. For example, enter 24.99 for € 24.99. | Required |
| currency | String | ISO 4217 currency code, for example EUR or CHF | Required |
| payment_token_object | String | Payment Token | Required |
| description | String | Order description | Required |
| demo | String | Custom field | Optional |
| timeout | String | Expiration time in minutes (0-1440) | Required |
| notify_url | String | Asynchronous notification URL after payment | Required |
| request_id | String | Unique request ID; a combination of digits and letters at least 24 characters is recommended | Required |
Signature example:
Sorted parameters concatenated into a URL-style query string
"3ds_initiate=01&amount=1¤cy=EUR&description=test&method=v3.CreateCardPayments¬ify_url=https://www.yabandpay.com/notify&operation=11&order_id=1725875543&pay_method=online&payment_token_object=VnXaRabcsedfsSlPFZXavcsdfasdEFDd&request_id=hjf5lv32i40lh7oh86j6az98tnscwv37&sub_pay_method=Token&time=1725875543&timeout=0&user=YOUR_CASHIER_UID"
Sign stringA using secret_key
The resulting signature is:
"YOUR_SIGNATURE"
Request example:
{
"user": "YOUR_CASHIER_UID",
"sign": "YOUR_SIGNATURE",
"method": "v3.CreateCardPayments",
"time": 1725875543,
"data": {
"3ds_initiate": "01",
"description": "test",
"timeout": "0",
"pay_method": "online",
"sub_pay_method": "Token",
"operation": "11",
"order_id": 1725875543,
"amount": "1",
"currency": "EUR",
"payment_token_object": "VnXaRabcsedfsSlPFZXavcsdfasdEFDd",
"notify_url": "https://www.yabandpay.com/notify",
"request_id": "hjf5lv32i40lh7oh86j6az98tnscwv37"
}
}
Response example:
{
"status": true,
"code": "200",
"data": {
"order_id": "YOUR_ORDER_ID",
"trade_id": "109bb0e9-e1fb-49cb-c537-ec944f33c388",
"amount": "1.00",
"currency": "EUR",
"state": "paid"
},
"message": "",
"response_id": "202409091752241912726578"
}
Additional information:
MIT & CIT :
MIT = Merchant Initiated subsequent transactions. Token payments initiated by the merchant.
CIT = Cardholder Initiated Subsequent transactions. Token payments involving the customer. When activating payments, specify whether you need MIT or CIT so the appropriate mode can be configured.
Response result:
-
A successful request returns "status": true.
-
If the call fails, "status": false is returned. If you receive Invalid Token, we recommend calling HPP Token again to obtain a new Token.
The API returns the payment status synchronously. We strongly recommend using both Order Query and Asynchronous Notifications to synchronize and update the payment status and keep payment information accurate in real time. a) If the order status state is paid, payment succeeded; b) if the order status state is authorized, authorization succeeded. To capture funds after successful authorization, call the authorization capture API.
3DS low-value exemption:
Transactions within the following limits may qualify as low-value transactions. If the order amount is less than or equal to the applicable amount below, transaction code 02 (low-value exemption) may be used with approval.
| # | Currency | Amount |
|---|---|---|
| 1 | EUR | 30 |
| 2 | DKK | 225 |
| 3 | GBP | 27 |
| 4 | SEK | 310 |
| 5 | ISK | 5000 |
| 6 | NOK | 325 |
| 7 | CHF | 32 |
| 8 | PLN | 135 |
| 9 | USD | 36 |
Response codes:
| Status | Code | Message |
|---|---|---|
| true | 200 | |
| false | -1000 | Internal error |
| false | -403 | The signature Error |
| false | -2001 | The user not exist |
| false | -3001 | Required field is missing |
| false | -4118 | Incorrect request ID |
| false | -4119 | Invalid Token |
| false | -4120 | No operational permissions |
