Documentation/API Reference

API REFERENCE

Initiate Payment or Authorization

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

Initiate Payment or Authorization

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

Request parameters11

Required fields first

Initiate transaction

pay_methodRequiredstringdata.pay_methodoffline
sub_pay_methodRequiredstringdata.sub_pay_methodpoint_of_sales
operationRequiredstringdata.operation1.Sales 2.Authorisation;
tidRequiredstringdata.tidDevice TID
amountRequiredstringdata.amountAmount as a numeric string. For example, enter 24.99 for € 24.99. CNY amount >=1; EUR amount >=0.1.
currencyRequiredstringdata.currencyISO 4217 currency code, for example EUR or CHF
descriptionRequiredstringdata.descriptionOrder description, within 64 characters
notify_urlRequiredstringdata.notify_urlAsynchronous notification URL after payment
request_idRequiredstringdata.request_idUnique request ID; a combination of digits and letters at least 24 characters is recommended
Optional parameters 2
tip_amountOptionalstringdata.tip_amountTip included in the total amount, as a numeric string; for example 1.02
demoOptionalstringdata.demoCustom field

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 sends payment or authorization instructions to a POS device through the cloud.

Before calling this API, ensure that the POS device is online and available so that instructions 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.POSRequired
timeLongTimestampRequired
  • Parameters
ParameterTypeDescriptionRequired
pay_methodStringofflineRequired
sub_pay_methodStringpoint_of_salesRequired
operationString1.Sales 2.Authorisation;Required
tidstringDevice TIDRequired
order_idstringOrder number consisting entirely of digits and fewer than 20 charactersRequired
amountStringAmount as a numeric string. For example, enter 24.99 for € 24.99. CNY amount >=1; EUR amount >=0.1.Required
tip_amountStringTip included in the total amount, as a numeric string; for example 1.02Optional
currencyStringISO 4217 currency code, for example EUR or CHFRequired
descriptionStringOrder description, within 64 charactersRequired
demoStringCustom fieldOptional
notify_urlStringAsynchronous notification URL after paymentRequired
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

 "amount=12.5&currency=EUR&description=YabandPay test&method=v3.POS&notify_url=https://www.yabandpay.com/notify&operation=1&order_id=202586556498441613&pay_method=offline&request_id=a7z1lox4l6z6mdx1udgn5gtezasze1x0&sub_pay_method=point_of_sales&tid=T125119061&time=1555498137&tip_amount=0.5&user=T125119061" 

Sign stringA using secret_key

The resulting signature is:

"YOUR_SIGNATURE"

Request example:

 {
  "user": "T125119061",
  "sign": "YOUR_SIGNATURE",
  "method": "v3.POS",
  "time": 1555498137,
  "data": {
    "operation": "1",
    "tid": "T125119061",
    "amount": "12.5",
    "currency": "EUR",
    "tip_amount": "0.5",
    "description": "YabandPay test",
    "notify_url": "https://www.yabandpay.com/notify",
    "order_id": "YOUR_ORDER_ID",
    "pay_method": "offline",
    "sub_pay_method": "point_of_sales",
    "request_id": "a7z1lox4l6z6mdx1udgn5gtezasze1x0"

  }
} 

Response example:

{
  "status": true,
  "code": "200",
  "data": {
    "order_id": "YOUR_ORDER_ID",
    "trade_id": "4552eeea-1ae8-1e40-3b4b-802dc2f56458",
    "amount": "12",
    "currency": "EUR",
    "tip_amount": "0.5",
    "state": "processing"
  },
  "message": ""} 

Additional information:

Tip

Important: When an asynchronous notification returns "state": "paid", the user has completed payment. Check whether the returned data contains "cvmTypeList": ["SIGNATURE"].

If the response contains "cvmTypeList": ["SIGNATURE"], the customer must sign the receipt;

Prompt the cashier to request the customer's signature and print a receipt with a signature field;

After the customer signs, the cashier selects “Confirm signature” or “Invalid signature” based on the signature.

If “Confirm signature” is selected, the transaction completes normally;

If “Invalid signature” is selected, immediately call the transaction reversal API to reverse this transaction;

For unattended or self-service payments, signature verification may be omitted because amounts are generally small, but this carries a chargeback risk.

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
true200Success
false-1000Internal error
false-3001Required field is missing
false-3002duplicate request_id
false-403The signature Error
false-4011Not support the payment method