Documentation/Référence API

API REFERENCE

Obtenir le sous-moyen de paiement

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

Obtenir le sous-moyen de paiement

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

Request parameters1

Required fields first

获取sub pay method

auth_codeRequiredstringdata.auth_code通过扫描用户钱包的二维码获得

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

Paramètres

ParameterTypeDescriptionObligatoire
data.auth_codestring通过扫描用户钱包的二维码获得✓

Use this API with Paiement rapide.

Conseil

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

ParamètreTypeDescriptionObligatoire
userStringCashier account UIDObligatoire
signStringSignatureObligatoire
methodStringv3.GetSubPayObligatoire
timeLongTimestampObligatoire
  • Parameters
ParamètreTypeDescriptionObligatoire
auth_codeStringObtained by scanning the customer’s wallet QR codeObligatoire

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

Le champ resulting signature is:

"YOUR_SIGNATURE"

Exemple de requête:

{
	"user": "YOUR_CASHIER_UID",
	"sign": "YOUR_SIGNATURE",
	"method": "v3.GetSubPay",
	"time": 1555499083,
	"data": {
		"auth_code": "YOUR_AUTH_CODE"
	}
}

Exemple de réponse:

{
    "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. Le champ 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. Le champ 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. Le champre is no fixed length. Decode it and validate the UnionPay protocol identifier. Example: hQVDUFYwMWFWTwigAAADMwEBAlcRYlFkJZZFSTbVASIBUYcYCIljM4ICAACfEBEHAQEDoAAAAQgwMDI1MDAwMZ8mCFbpVlAj7RlynycBgJ82Ar/nnzcEPEEZil80AQE=