API REFERENCE
CardCheck
Initiate a 0-value authorization for the cardholder to validate the supplied card number. The cardholder must provide valid information to complete verification.
Verification can be completed using the hosted page provided by YabandPay. Merchants can securely accept requests by hosting sensitive PCI DSS data on the YabandPay system.
Tip
Obtain the verification result through Order Query.
| Parameter | Type | Description | Required |
|---|---|---|---|
| user | String | Cashier account UID | Required |
| sign | String | Signature | Required |
| method | String | v3.CardCheck | Required |
| time | Long | Timestamp | Required |
- Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| pay_method | String | online | Required |
| sub_pay_method | String | CardCheck | Required |
| operation | String | 3 | Required |
| order_id | String | Merchant order ID | Required |
| description | String | Order description | Required |
| form_type | String | Type of returned url; defaults to 01. 01.completed, 02.iframe | Optional |
| demo | String | Custom field | Optional |
| timeout | String | Expiration time in minutes (0-1440) | Required |
| redirect_url | String | Redirect URL after payment | Optional |
| 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
"description=cardcheck test&form_type=01&method=v3.CardCheck¬ify_url=https://www.yabandpay.com/notify&operation=3&order_id=203040950640690239603690&pay_method=online&redirect_url=https://www.yabandpay.com/redirect_url&request_id=tscqf7ki76o7aem4z1yl1xs72f89fptl&sub_pay_method=CardCheck&time=1720680417&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.CardCheck",
"time": 1720680417,
"data": {
"description": "cardcheck test",
"form_type": "01",
"timeout": "0",
"pay_method": "online",
"sub_pay_method": "CardCheck",
"operation": "3",
"order_id": "YOUR_ORDER_ID",
"redirect_url": "https://www.yabandpay.com/redirect_url",
"notify_url": "https://www.yabandpay.com/notify",
"request_id": "tscqf7ki76o7aem4z1yl1xs72f89fptl"
}
}
Response example:
{
"status": true,
"code": "200",
"data": {
"order_id": "YOUR_ORDER_ID",
"trade_id": "160899f3-f6d9-a8d8-ab5b-82eacdab9c5b",
"amount": "0.00",
"currency": "EUR",
"url": "https://pay.yabandpay.com/payments/callback/order/MTYwODk5ZjMtZjZkOS1hOGQ4LWFiNWItODJlYWNkYWI5YzVi",
"state": "processing"
},
"message": "",
"response_id": "202407111544200649155078"
}
Additional information:
Response result:
-
A successful request returns "status": true.
-
A failed request returns "status": false.
Redirect to the returned url. After the user enters card details at this url and completes payment, they are redirected back to redirect_url 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;
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 |
