Documentation/API Reference

API REFERENCE

Transaction Reversal

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

Transaction Reversal

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

Request parameters3

Required fields first

Transaction Reversal

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 reversal of successful transactions through the cloud.

Transaction reversal only supports transactions from the current day, and only full reversals are allowed.

For partial reversals or transactions from a previous day, use the refund API.

After a reversal instruction is sent, the POS terminal displays the reversal process and final result in real time so that merchants and users can immediately confirm the reversal status. For a silent reversal (without displaying the process on the POS terminal), use the Cancel Payment API.

Before calling this API, ensure that the POS device is online and available so that the reversal instruction can be delivered and processed successfully.

API URL (production): https://mapi.yabandpay.com/Payments

API URL (test): https://acc-mapi.yabandpay.com/Payments

ParameterTypeDescriptionRequired
userStringDevice TIDRequired
signStringSignatureRequired
methodStringv3.POSReversalRequired
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.POSReversal",
  "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