Documentation/API Reference

API REFERENCE

Mini Program Payments

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

Mini Program Payments

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

Request parameters10

Required fields first

Mini Program Payments

pay_methodRequiredstringdata.pay_methodonline
sub_pay_methodRequiredstringdata.sub_pay_methodAlipay
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
sub_pay_method_typeOptionalstringdata.sub_pay_method_typeSee the list of supported wallets
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.

Tip

Only the Alipay China wallet is supported. Other Alipay+ wallets are not supported. For Alipay+ Mini Program integration, refer to the official Alipay+ documentation (https://miniprogram.alipay.com/docs-alipayconnect/miniprogram_alipayconnect/solutions/cn-cashier-payment).

ParameterTypeDescriptionRequired
userStringCashier account UIDRequired
signStringSignatureRequired
methodStringv3.CreatePaymentsAlipayMiniPayRequired
timeLongTimestampRequired
  • Parameters
ParameterTypeDescriptionRequired
pay_methodStringonlineRequired
sub_pay_methodStringAlipayRequired
sub_pay_method_typeStringSee the list of supported walletsOptional
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, such as 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&description=YabandPay test&method=v3.CreatePaymentsAlipayMiniPay&notify_url=https://www.yabandpay.com/notify&order_id=2024519846516588484&pay_method=online&redirect_url=https://www.yabandpay.com&sub_pay_method=Alipay&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.CreatePaymentsAlipayMiniPay",
	"time": 1546588959,
	"data": {
		"description": "YabandPay test",
		"timeout": "0",
		"pay_method": "online",
		"sub_pay_method": "Alipay",
		"order_id": "YOUR_ORDER_ID",
		"amount": "1",
		"currency": "EUR",
		"notify_url": "https://www.yabandpay.com/notify",
		"redirect_url": "https://www.yabandpay.com"
	}
}

Response example:

{
    "status": true,
    "code": "200",
    "data": {
        "order_id": "YOUR_ORDER_ID",
        "trade_id": "5902ea82-df87-bc30-3eef-c9cd1c64555c",
        "amount": "1",
        "currency": "EUR",
        "parameters": {
            "transaction_id": "2816660400948ddP1j0Et1lNHl2sOlC0bKn0"
        },
        "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.

Wallets supported by Alipay+:

The wallets corresponding to sub_pay_method_type support the following payment scenarios:

sub_pay_method_typeAPPWAPWebMini Program
ALIPAY_CN✅❌✅✅
TRUEMONEY✅❌✅✅
ALIPAY_HK✅✅✅✅
TNG✅✅✅✅
GCASH✅✅✅✅
DANA✅✅✅✅
KAKAOPAY✅❌✅❌
RABBIT_LINE_PAY✅❌✅❌
BPI❌✅✅❌
BOOST✅✅✅❌
AKULAKU_PAYLATER✅✅✅❌
BILLEASE✅✅✅❌
TINABA✅✅✅❌
NAVERPAY❌✅✅❌
TOSSPAY✅❌✅✅
MPAY✅✅✅❌
KREDIVO_ID✅❌✅❌
KPLUS✅✅✅❌
HIPAY✅✅✅✅
Response codes:
StatusCodeMessage
true200Success
false-1000Internal error
false-3001Required field is missing
false-403The signature Error
false-4011Not support the payment method