Documentation/API Reference

API REFERENCE

Get sub pay method

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

Get sub pay method

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

Request parameters1

Required fields first

Get sub pay method

auth_codeRequiredstringdata.auth_codeObtained by scanning the customer’s wallet QR code

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

Use this API with Quick Payment.

Tip

Note: use the Get sub_pay_method API with the auth_code to identify whether the customer presented a WeChat Pay or Alipay+ code.

ParameterTypeDescriptionRequired
userStringCashier account UIDRequired
signStringSignatureRequired
methodStringv3.GetSubPayRequired
timeLongTimestampRequired
  • Parameters
ParameterTypeDescriptionRequired
auth_codeStringObtained by scanning the customer’s wallet QR codeRequired

Signature example:

Sorted parameters concatenated into a URL-style query string

"auth_code=134443133735495918&method=v3.GetSubPay&time=1555499083&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.GetSubPay",
	"time": 1555499083,
	"data": {
		"auth_code": "YOUR_AUTH_CODE"
	}
}

Response example:

{
    "status": true,
    "code": "200",
    "data": {
        "sub_paymethod": "Wechat Pay"},
    "message": ""}

Code types and rules

Wechat Pay

An 18-digit numeric dynamic code identifying a WeChat Pay user. It starts with 10, 11, 12, 13, 14, or 15 and must be read from the customer’s WeChat wallet in real time.

Alipay+

Alipay+ payment codes have four types: Alipay+ 19-digit codes, CGCP codes, AlipayCN codes, and AlipayHK codes. The table below describes each type and its rules.

QuickPass

Base64-encoded format (standard QR code string from the QuickPass App)

TypeRules
Alipay+ 19-digit codeStarts with 28. The third digit is always 9, and the sixth digit from the end is always 6. Example: 2893612204263667830.
CGCP codeStarts with 25, 26, 27, 28, 29, or 30, followed by a 1-digit protocol ID identifying the MPP (1 by default) and a 3-digit routing number. Example: 281010897274821897274821, where the routing number is 010.
AlipayCN codeLength: 16 to 24 digits. Starts with 25, 26, 27, 28, 29, or 30. Example: 28024456785672301.
AlipayHK codeLength: 17 to 19 digits. Starts with 25, 26, 27, 28, 29, or 30. Example: 280244567856723026.
UnionPay Base64 code (native QuickPass payment code)A Base64-encoded string, usually starting with hQVD, containing uppercase and lowercase letters, digits, +, /, and trailing = padding. There is no fixed length. Decode it and validate the UnionPay protocol identifier. Example: hQVDUFYwMWFWTwigAAADMwEBAlcRYlFkJZZFSTbVASIBUYcYCIljM4ICAACfEBEHAQEDoAAAAQgwMDI1MDAwMZ8mCFbpVlAj7RlynycBgJ82Ar/nnzcEPEEZil80AQE=