Documentation/API Reference

API REFERENCE

Transaction Cancellation

POSThttps://mapi.yabandpay.com/Payments
Live API
API PLAYGROUND · Live API

Transaction Cancellation

POSThttps://mapi.yabandpay.com/Payments
Automatically signed with your credentials

Request parameters3

Required fields first

Transaction Cancellation

tidRequiredstringdata.tidDevice TID
trade_idRequiredstringdata.trade_idYabandPay order number
request_idRequiredstringdata.request_idUnique request ID; a combination of digits and letters at least 24 characters is recommended

Credentials stay on this page. Your secret key is never stored or sent to the documentation server.

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

ParameterTypeDescriptionRequired
userStringDevice TIDRequired
signStringSignatureRequired
methodStringv3.POSCancelRequired
timeLongTimestampRequired
  • Parameters
ParameterTypeDescriptionRequired
tidstringDevice TIDRequired
trade_idStringYabandPay order numberRequired
request_idStringUnique request ID; a combination of digits and letters at least 24 characters is recommendedRequired

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:
  1. A successful request returns "status": true.

  2. 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:
StatusCodeMessage
true200
false-3001Required field is missing
false-3002duplicate request_id
false-4111Exceed cancel window
false-4112The transaction has been cleared cannot be cancelled
false-4114The trade_id does not exist
false-4115The transaction cannot be cancelled
false-4116The transaction has been cancelled
false-4117The transaction has been Expired