API REFERENCE
Native Payments
| Parameter | Type | Description | Required |
|---|---|---|---|
| user | String | Cashier account UID | Required |
| sign | String | Signature | Required |
| method | String | v3.CreateWechatNativePay | Required |
| time | Long | Timestamp | Required |
- Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| order_id | String | Merchant order ID | Required |
| url_type | String | Default: 01. 01: the returned url redirects directly to the YabandPay hosted page; 02: native WeChat QR code URL | Optional |
| amount | String | Amount as a numeric string. For example, enter 24.99 for € 24.99. CNY amount >=1; EUR amount >=0.1. | Required |
| currency | String | ISO 4217 currency code, for example EUR or CHF | Required |
| description | String | Order description | Required |
| demo | String | Custom field | Optional |
| timeout | String | Expiration time in minutes (0-1440) | Required |
| notify_url | String | Asynchronous notification URL after payment | Required |
| redirect_url | String | Redirect URL after payment | Optional |
Signature example:
Sorted parameters concatenated into a URL-style query string
"amount=1¤cy=EUR&description=yaband test&method=v3.CreateWechatNativePay¬ify_url=https://www.yabandpay.com/notify&order_id=2024821984761654842&redirect_url=https://www.yabandpay.com&time=1568553105&timeout=0&user=h5@yaband.com"
Sign stringA using secret_key
The resulting signature is:
"YOUR_SIGNATURE"
Request example:
{
"user": "YOUR_CASHIER_UID",
"sign": "YOUR_SIGNATURE",
"method": "v3.CreateWechatNativePay",
"time": 1568553105,
"data": {
"url_type": "01",
"order_id": "YOUR_ORDER_ID",
"amount": "1",
"currency": "EUR",
"timeout": "0",
"description": "yaband test",
"redirect_url": "https://www.yabandpay.com",
"notify_url": "https://www.yabandpay.com/notify"
}
}
Response example:
{
"status": true,
"code": "200",
"data": {
"order_id": "YOUR_ORDER_ID",
"trade_id": "289c6441-056e-676e-80e6-672651911070",
"amount": "1.00",
"currency": "EUR",
"url": "https://pay.yabandpay.com/payments/wechat_native_callback/order/Mjg5YzY0NDEtMDU2ZS02NzZlLTgwZTYtNjcyNjUxOTExMDcw",
"state": "processing"
},
"message": ""
}
Additional information:
Response result:
-
A successful request returns "status": true.
-
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:
| Status | Code | Message |
|---|---|---|
| true | 200 | Success |
| false | -1000 | Internal error |
| false | -3001 | Required field is missing |
| false | -403 | The signature Error |
| false | -4011 | Not support the payment method |
