Quick Payment
Available: WeChat Pay and Alipay+
This payment method is available in store, Merchant scans the barcode of customer on WeChat App or Alipay+ App to receive the payment.
a) Present payment code. Customer presents Alipay+ / WeChat payment code to cashier
b) Scan payment code. Cashier scans the payment code
c) Payment successful. Payment complete
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.BarcodePayment | Required |
time | Long | timestamp | Required |
- Parameter
Parameter | Type | Description | Required |
---|---|---|---|
pay_method | String | offline | Required |
sub_pay_method | String | WeChat Pay, Alipay, will be obtained through the API of Get sub_pay_method. If it is empty(recommended), YabandPay will determine the payment method. | Optional |
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 |
tip_amount | String | Tip included in the total amount.For example: 1.02 | Optional |
currency | String | ISO 4217, For example EUR, CHF | Required |
demo | String | custom field | Optional |
auth_code | String | the Payment QR Code scanned from customer's Wallet | Required |
description | String | order description | Required |
notify_url | String | asynchronous notification url | Optional |
Signature:
Lexicographical sequence and URL key-value format new string
"amount=2.1&auth_code=134443133735495918¤cy=EUR&demo=test&description=YabandPay test&method=v3.BarcodePayment¬ify_url=https://www.yabandpay.com/notify&order_id=202488465489451317&pay_method=offline&sub_pay_method=WeChat Pay&time=1555499083&tip_amount=0.5&user=016683"
Use stringA and secret_key to get stringSign
Get Signature:
"412f2d1d5fe0f56abde655d44d886e718bee808970f00186e9f340caa04893cb"
Example Request:
{
"user": "016683",
"sign": "412f2d1d5fe0f56abde655d44d886e718bee808970f00186e9f340caa04893cb",
"method": "v3.BarcodePayment",
"time": 1555499083,
"data": {
"amount": "2.1",
"tip_amount": "0.5",
"auth_code": "134443133735495918",
"currency": "EUR",
"demo": "test",
"description": "YabandPay test",
"notify_url": "https://www.yabandpay.com/notify",
"order_id": "202488465489451317",
"pay_method": "offline",
"sub_pay_method": "WeChat Pay"
}
}
Example Response:
{
"status": true,
"code": "200",
"data": {
"order_id": "202488465489451317",
"trade_id": "511444d0-2d91-5396-9e34-f2900e80d715",
"amount": "2.1",
"tip_amount": "0.5",
"sub_pay_method": "WeChat Pay",
"state": "paid"
},
"message": "",
}
More Information:
Payment results:
[!TIP|style:flat]
When the user does not need password verification, the payment result will be returned synchronously.
When the user enters a password for verification after scanning the QR code, the payment result state=
processing
will be returned. At this time, the merchant needs to use Query Payment Order to query the payment result every 5 seconds.If the user cancels the payment or the user fails to pay within 30 seconds, it is recommended that the merchant end the query process and continue to call Cancel Payment Order to cancel the payment order. If the user has actually paid, the system will automatically process the refund.
Result/Error codes:
Status | Description |
---|---|
200 | Success |
-1000 | Internal error |
-1007 | Identity code is invalid |
-4011 | Not support the payment method |
-4015 | This order has been closed |
-4028 | WeChat Pay is not available |
-4029 | Alipay is not available |
-4086 | Unknow identity code |