Unifiedorder Payment
Available: WeChat Pay and Alipay
[!TIP|style:flat]
Please note that this payment only supports WeChat Pay and Alipay. We recommend using Hosted payment page, which includes all enabled payment methods.
API URL:https://mapi.yabandpay.com/Payments
Method:POST
POST data type:Json
Parameter | Type | Description | Required |
---|---|---|---|
user | String | the UID of cashier account | Required |
sign | String | signature | Required |
method | String | v3.CreatePayments | Required |
time | Long | timestamp | Required |
- Parameter
Parameter | Type | Description | Required |
---|---|---|---|
pay_method | String | online | Required |
sub_pay_method | String | WeChat Pay,Alipay,YabandPay | Required |
order_id | String | order id from Merchant | Required |
amount | String | format in cents: € 24.99 should be 24.99, the min amount is EUR 0.10 or CNY 1.00 | Required |
currency | String | ISO 4217, For example EUR, CHF | Required |
description | String | order description | Required |
demo | String | custom field | Optional |
timeout | String | value 0 means 1440 minutes | Optional |
redirect_url | String | the redirect URL after payment is completed | Optional |
notify_url | String | asynchronous notification url | Required |
Signature:
Lexicographical sequence and URL key-value format new string
"amount=0.1¤cy=EUR&demo=test&description=YabandPay test&method=v3.CreatePayments¬ify_url=https://www.yabandpay.com/notify&order_id=2024849687894683&pay_method=online&redirect_url=https://www.yabandpay.com&sub_pay_method=WeChat Pay&time=1555498137&timeout=0&user=016683"
Use stringA and secret_key to get stringSign
Get Signature:
"1088cc688350732341ca3626ae4cf259b78d2b90b78768c67881f4c0189622ad"
Example Request:
{
"user": "016683",
"sign": "1088cc688350732341ca3626ae4cf259b78d2b90b78768c67881f4c0189622ad",
"method": "v3.CreatePayments",
"time": 1555498137,
"data": {
"amount": "0.1",
"currency": "EUR",
"demo": "test",
"description": "YabandPay test",
"notify_url": "https://www.yabandpay.com/notify",
"order_id": "2024849687894683",
"pay_method": "online",
"redirect_url": "https://www.yabandpay.com",
"sub_pay_method": "WeChat Pay",
"timeout": "0"
}
}
Example Response:
{
"status": true,
"code": "200",
"data": {
"order_id": "2024849687894683",
"trade_id": "4552eeea-1ae8-1e40-3b4b-802dc2f5686a",
"amount": "0.10",
"currency": "EUR",
"settlement_amount": "0.10",
"settlement_currency": "EUR",
"exchange_rate": "1",
"url": "https://pay.yabandpay.com/payments/callback/order/NDU1MmVlZWEtMWFlOC0xZTQwLTNiNGItODAyZGMyZjU2ODZh",
"state": "processing"
},
"message": "",
}
1. PC browser or ECR System
In PC browser or ECR screen, Customer scans the QR Code which is generated from Merchant to complete the payment on WeChat App or Alipay App.
YabandPay supports the original QR Code of WeChat Pay or Alipay, and also integrated QR Code (this QR code support WeChat Pay and Alipay) which is generated by YabandPay itself.
About the integrated QR Code of WeChat Pay or Alipay, Merchant can generate the QR Code based on the return url and display it to customers, then query payment result via the Query Order API, or waiting for the payment result via Notify API.。
2. Integrated Payment
Regardless of any browser, include PC, H5, or App etc. YabandPay will call up corresponding payment method based on different occasions.
sub_pay_method=
Browser | WeChat Pay | Alipay | YaBandPay |
---|---|---|---|
Mobile browser | generate QR Code for WeChat Pay | call up Alipay | generare intergrated QR Code |
H5 browser in App | generate QR Code for WeChat Pay | call up Alipay | generare intergrated QR Code |
WeChat browser (in WeChat App) | call up WeChat Pay | generate QR Code for Alipay | call up WeChat Pay |
Alipay browser ( in Alipay App) | generate QR Code for WeChat Pay | call up Alipay | call up Alipay |
PC browser | generate QR Code for WeChat Pay | generate QR Code for Alipay | generare intergrated QR Code |
More Information:
Return results:
On a successful API call, the response will be
"status": true
.On a failed API call, the response will be
"status": false
.
We strongly recommend using both Order Query and Asynchronous Notification simultaneously to synchronize and update payment status, ensuring real-time accuracy of payment information.
Result/Error codes:
Status | Code | Message |
---|---|---|
true | 200 | Success |
fales | -1000 | Internal error |
fales | -3001 | Required field is missing |
fales | -403 | The signature Error |
fales | -4011 | Not support the payment method |