API REFERENCE
Transaction Cancellation
Applies to in-person POS payments
This API initiates cancellation of unpaid orders through the cloud.
This closes the payment screen on the terminal so that the system can initiate a new transaction request.
API URL (production): https://mapi.yabandpay.com/Payments
API URL (test): https://acc-mapi.yabandpay.com/Payments
| Parameter | Type | Description | Required |
|---|---|---|---|
| user | String | Device TID | Required |
| sign | String | Signature | Required |
| method | String | v3.POSCancel | Required |
| time | Long | Timestamp | Required |
- Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| tid | string | Device TID | Required |
| trade_id | String | YabandPay order number | 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
"method=v3.POSReversal&request_id=a7z1lox4l6z6mdx1udgn5gtezasze1x0&tid=T125119061&time=1555498137&trade_id=4a49ffb3-a30f-ba92-9422-1969afb6f121&user=T125119061"
Sign stringA using secret_key
The resulting signature is:
"YOUR_SIGNATURE"
Request example:
{
"user": "T125119061",
"sign": "YOUR_SIGNATURE",
"method": "v3.POSCancel",
"time": 1555498137,
"data": {
"tid": "T125119061",
"trade_id": "4a49ffb3-a30f-ba92-9422-1969afb6f121",
"request_id": "a7z1lox4l6z6mdx1udgn5gtezasze1x0"
}
}
Response example:
{
"status": true,
"code": "200",
"data": {
"type": "payment",
"user": "T125119061",
"amount": "0.10",
"currency": "EUR",
"trade_id": "4a49ffb3-a30f-ba92-9422-1969afb6f121",
"description": "YabandPay test",
"order_id": "YOUR_ORDER_ID",
"createDate": "1706771212",
"demo": "test",
"transaction_id": "",
"state": "cancelled"
},
"message": ""}
Additional information:
Response result:
-
A successful request returns "status": true.
-
A failed request returns "status": false.
We strongly recommend using both order queries and asynchronous notifications to synchronize and update the payment status and keep payment information accurate in real time.
Response codes:
| Status | Code | Message |
|---|---|---|
| true | 200 | |
| false | -3001 | Required field is missing |
| false | -3002 | duplicate request_id |
| false | -4111 | Exceed cancel window |
| false | -4112 | The transaction has been cleared cannot be cancelled |
| false | -4114 | The trade_id does not exist |
| false | -4115 | The transaction cannot be cancelled |
| false | -4116 | The transaction has been cancelled |
| false | -4117 | The transaction has been Expired |
