Documentation/API Reference

API REFERENCE

In-App Payments

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

In-App Payments

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

Request parameters9

Required fields first

App payments

pay_methodRequiredstringdata.pay_methodonline
sub_pay_methodRequiredstringdata.sub_pay_methodWeChat Pay
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
sub_app_idRequiredstringdata.sub_app_idApp APPID
Optional parameters 1
demoOptionalstringdata.demoCustom field

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

Tip

Note: Provide your WeChat Mini Program Appid to YabandPay. The feature must be activated before use.

ParameterTypeDescriptionRequired
userStringCashier account UIDRequired
signStringSignatureRequired
methodStringv3.CreatePaymentsWechatAPPPayRequired
timeLongTimestampRequired
  • Parameters
ParameterTypeDescriptionRequired
pay_methodStringonlineRequired
sub_pay_methodStringWeChat PayRequired
order_idStringMerchant order IDRequired
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
sub_app_idStringApp APPIDRequired

Signature example:

Sorted parameters concatenated into a URL-style query string

"amount=0.1&currency=EUR&description=YabandPay test&method=v3.CreatePaymentsWechatAPPPay&notify_url=https://www.yabandpay.com/notify&order_id=202459846951635165&pay_method=online&sub_app_id=wxc72defa5cec6dfc7&sub_pay_method=WeChat Pay&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.CreatePaymentsWechatAPPPay",
	"time": 1546588959,
	"data": {
		"description": "YabandPay test",
		"timeout": "0",
		"pay_method": "online",
		"sub_pay_method": "WeChat Pay",
		"order_id": "YOUR_ORDER_ID",
		"amount": "0.1",
		"currency": "EUR",
		"notify_url": "https://www.yabandpay.com/notify",
		"sub_app_id": "wxc72defa5cec6dfc7"
	}
}

Response example:

{
    "status": true,
    "code": "200",
    "data": {
        "order_id": "YOUR_ORDER_ID",
        "trade_id": "eaf6b81c-1a19-3ce5-d2d7-4002d6812c76",
        "amount": "0.10",
        "currency": "EUR",
        "parameters": {
            "appid": "wxc72defa5cec6dfc7",
            "partnerid": "299811131",
            "prepayid": "wx15164758052100530086b5391151892200",
            "package": "Sign=WXPay",
            "noncestr": "_YB_5d2c3dbe544a4",
            "timestamp": "1563180478",
            "sign": "YOUR_SIGNATURE"
        },
        "state": "processing"
    },
    "message": ""
}

Pass this parameter to the corresponding App interface to launch WeChat Pay.

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