Capture
After a successful pre-authorization, the capture must be processed within 30 days; otherwise, the pre-authorization will automatically expire.
The currency of the capture must match the currency of the pre-authorization, and the amount cannot exceed the originally authorized amount.
Each authorization transaction allows only one capture and does not support multiple captures.
API URL:https://mapi.yabandpay.com/Payments
Method:POST
POST data type:Json
Parameter | Type | Description | Required |
---|---|---|---|
user | String | the UID of cashier account | Required |
sign | String | signature | Required |
method | String | v3.CreateCardPayments | Required |
time | Long | timestamp | Required |
- Parameter
Parameter | Type | Description | Required |
---|---|---|---|
trade_id | String | the trade_id of authorized transaction | Required |
amount | String | format in cents: € 24.99 should be 24.99 | Required |
currency | String | ISO 4217, For example EUR, CHF | Required |
description | String | order description | Required |
notify_url | String | asynchronous notification url | Required |
request_id | String | The request ID must be unique. It is recommended to use a combination of at least 24 digits and letters. | Required |
Signature:
Lexicographical sequence and URL key-value format new string
"amount=1¤cy=EUR&description=test&method=v3.Capture¬ify_url=https://www.yabandpay.com/notify&request_id=ca51f2fas3i0f8uiw7efj6oe4i2w1ghj&time=1720684254&trade_id=160899f3-f6d9-a8d8-ab5b-82eacdab9c5b&user=016683"
Use stringA and secret_key to get stringSign
Get Signature:
"6aea50e6a1c79d38b3398d32524deb17a38e8f2c84ac08cdbf147b47a78e01d2"
Example Request:
{
"user": "016683",
"sign": "6aea50e6a1c79d38b3398d32524deb17a38e8f2c84ac08cdbf147b47a78e01d2",
"method": "v3.Capture",
"time": 1720684254,
"data": {
"description": "test",
"trade_id": "160899f3-f6d9-a8d8-ab5b-82eacdab9c5b",
"amount": "1",
"currency": "EUR",
"notify_url": "https://www.yabandpay.com/notify",
"request_id": "ca51f2fas3i0f8uiw7efj6oe4i2w1ghj"
}
}
Example Request:
{
"status": true,
"code": "200",
"data": {
"order_id": "23505805395809345894869",
"trade_id": "160899f3-f6d9-a8d8-ab5b-82eacdab9c5b",
"amount": "1",
"currency": "EUR",
"settlement_amount": "1",
"settlement_currency": "EUR",
"exchange_rate": "1",
"state": "paid",
},
"message": "",
"response_id": "202407111550570060848432"
}
More Information:
Return results:
On a successful API call, the response will be
"status": true
.On a failed API call, the response will be
"status": false
.
We strongly recommend using both Order Query and Asynchronous Notification simultaneously to synchronize and update payment status, ensuring real-time accuracy of payment information.
Result/Error codes:
Status | Code | Message |
---|---|---|
true | 200 | |
fales | -1000 | Internal error |
fales | -403 | The signature Error |
fales | -2001 | The user not exist |
fales | -3001 | Required field is missing |
fales | -4118 | Incorrect request ID |
fales | -4089 | Exceed capture window |
fales | -4084 | The captured amount exceeds the original authorized amount |
fales | -4085 | The captured currency is different from the original authorization currency |
fales | -4024 | The original trade ID is incorrect |