Documentation/API Reference

API REFERENCE

UnionPay Online Payments

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

UnionPay Online Payments

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

Request parameters9

Required fields first

UnionPay Online Payments

pay_methodRequiredstringdata.pay_methodonline
sub_pay_methodRequiredstringdata.sub_pay_methodUnionPayWap
amountRequiredstringdata.amountNumeric amount. For example, € 24.99 must be written as 24.99; euro amount>=1
currencyRequiredstringdata.currencyISO 4217 currency code, for example EUR or CHF
descriptionRequiredstringdata.descriptionOrder description
timeoutRequiredstringdata.timeoutExpiration time in minutes (0-1440)
notify_urlRequiredstringdata.notify_urlAsynchronous notification URL after payment
Optional parameters 2
demoOptionalstringdata.demoCustom field
redirect_urlOptionalstringdata.redirect_urlRedirect URL after payment

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

ParameterTypeDescriptionRequired
userStringCashier account UIDRequired
signStringSignatureRequired
methodStringv3.CreatePaymentsRequired
timeLongTimestampRequired
  • Parameters
ParameterTypeDescriptionRequired
pay_methodStringonlineRequired
sub_pay_methodStringUnionPayWapRequired
order_idStringMerchant order IDRequired
amountStringNumeric amount. For example, € 24.99 must be written as 24.99; euro amount>=1Required
currencyStringISO 4217 currency code, for example EUR or CHFRequired
descriptionStringOrder descriptionRequired
demoStringCustom fieldOptional
timeoutStringExpiration time in minutes (0-1440)Required
redirect_urlStringRedirect URL after paymentOptional
notify_urlStringAsynchronous notification URL after paymentRequired

Signature example:

Sorted parameters concatenated into a URL-style query string

"amount=1&currency=EUR&demo=test&description=YabandPay test&method=v3.CreatePayments&notify_url=https://www.yabandpay.com/notify&order_id=20248416516546816541&pay_method=online&redirect_url=https://www.yabandpay.com&sub_pay_method=UnionPayWap&time=1546588959&timeout=0&user=YOUR_CASHIER_UID"

Sign stringA using secret_key

The resulting signature is:

"YOUR_SIGNATURE"

Request example:

{
    "user": "YOUR_CASHIER_UID",
    "sign": "YOUR_SIGNATURE",
    "method": "v3.CreatePayments",
    "time": 1546588959,
    "data": {
        "description": "YabandPay test",
        "timeout":"0",
        "pay_method": "online",
        "sub_pay_method": "UnionPayWap",
        "order_id": "YOUR_ORDER_ID",
        "amount": "1",
        "currency": "EUR",
        "redirect_url": "https://www.yabandpay.com",
        "notify_url": "https://www.yabandpay.com/notify",
        "demo": "test"
    }
}

Response example:

{
    "status": true,
    "code": "200",
    "data": {
        "order_id": "YOUR_ORDER_ID",
        "trade_id": "d80e6ed6-e5e1-04f2-42b9-6aa18e74c3ea",
        "amount": "1.00",
        "currency": "EUR",
        "url": "https://pay.yabandpay.com/payments/callback/order/ZDgwZTZlZDYtZTVlMS0wNGYyLTQyYjktNmFhMThlNzRjM2Vh",
        "state": "processing"
    },
    "message": ""
}

Additional information:

Response result:
  1. A successful request returns "status": true.

  2. A failed request returns "status": false.

We strongly recommend using both Query Order and Asynchronous Notifications to keep payment statuses accurate and up to date.

Response codes:
StatusCodeMessage
true200Success
false-1000Internal error
false-3001Required field is missing
false-403The signature Error
false-4011Not support the payment method