API REFERENCE
Get sub pay method
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.
| Parameter | Type | Description | Required |
|---|---|---|---|
| user | String | Cashier account UID | Required |
| sign | String | Signature | Required |
| method | String | v3.GetSubPay | Required |
| time | Long | Timestamp | Required |
- Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| auth_code | String | Obtained by scanning the customer’s wallet QR code | Required |
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)
| Type | Rules |
|---|---|
| Alipay+ 19-digit code | Starts with 28. The third digit is always 9, and the sixth digit from the end is always 6. Example: 2893612204263667830. |
| CGCP code | Starts 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 code | Length: 16 to 24 digits. Starts with 25, 26, 27, 28, 29, or 30. Example: 28024456785672301. |
| AlipayHK code | Length: 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= |
