Documentation/API Reference

API REFERENCE

Native Payments

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

Native Payments

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

Request parameters8

Required fields first

Native Payments

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
timeoutRequiredstringdata.timeoutExpiration time in minutes (0-1440)
notify_urlRequiredstringdata.notify_urlAsynchronous notification URL after payment
Optional parameters 3
url_typeOptionalstringdata.url_typeDefault: 01. 01: the returned url redirects directly to the YabandPay hosted page; 02: native WeChat QR code URL
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.CreateWechatNativePayRequired
timeLongTimestampRequired
  • Parameters
ParameterTypeDescriptionRequired
order_idStringMerchant order IDRequired
url_typeStringDefault: 01. 01: the returned url redirects directly to the YabandPay hosted page; 02: native WeChat QR code URLOptional
amountStringAmount as a numeric string. For example, enter 24.99 for € 24.99. CNY amount >=1; EUR amount >=0.1.Required
currencyStringISO 4217 currency code, for example EUR or CHFRequired
descriptionStringOrder descriptionRequired
demoStringCustom fieldOptional
timeoutStringExpiration time in minutes (0-1440)Required
notify_urlStringAsynchronous notification URL after paymentRequired
redirect_urlStringRedirect URL after paymentOptional

Signature example:

Sorted parameters concatenated into a URL-style query string

"amount=1&currency=EUR&description=yaband test&method=v3.CreateWechatNativePay&notify_url=https://www.yabandpay.com/notify&order_id=2024821984761654842&redirect_url=https://www.yabandpay.com&time=1568553105&timeout=0&user=h5@yaband.com"

Sign stringA using secret_key

The resulting signature is:

"YOUR_SIGNATURE"

Request example:

{
    "user": "YOUR_CASHIER_UID",
    "sign": "YOUR_SIGNATURE",
    "method": "v3.CreateWechatNativePay",
    "time": 1568553105,
    "data": {
            "url_type": "01",
            "order_id": "YOUR_ORDER_ID",
            "amount": "1",
            "currency": "EUR",
            "timeout": "0",
            "description": "yaband test",
		    "redirect_url": "https://www.yabandpay.com",
		    "notify_url": "https://www.yabandpay.com/notify"
    }
}

Response example:

{
    "status": true,
    "code": "200",
    "data": {
        "order_id": "YOUR_ORDER_ID",
        "trade_id": "289c6441-056e-676e-80e6-672651911070",
        "amount": "1.00",
        "currency": "EUR",
        "url": "https://pay.yabandpay.com/payments/wechat_native_callback/order/Mjg5YzY0NDEtMDU2ZS02NzZlLTgwZTYtNjcyNjUxOTExMDcw",
        "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