H5 Payment
[!TIP|style:flat]
Note: WeChat Pay does not support H5 payment by default. Please apply to YabandPay to activate it.
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.CreatePaymentsWechatAPPPay | Required |
time | Long | timestamp | Required |
- Parameter
Parameter | Type | Description | Required |
---|---|---|---|
pay_method | String | online | Required |
sub_pay_method | String | WeChat Pay | 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 | Required |
notify_url | String | synchronous notification url | Required |
redirect_url | String | the redirect URL after payment is completed | Optional |
ip_address | String | Client terminal IP | Required |
Signature:
Lexicographical sequence and URL key-value format new string
"amount=0.1¤cy=EUR&demo=test&description=YabandPay test&ip_address=127.0.0.1&method=v3.CreatePaymentsWechatH5Pay¬ify_url=https://www.yabandpay.com/notify&order_id=202487816549841654&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:
"3d4f7095cd94fcc6703676115a4ab8ed4a317325d176e75e0c51dab5f4444427"
Example Request:
{
"user": "016683",
"sign": "3d4f7095cd94fcc6703676115a4ab8ed4a317325d176e75e0c51dab5f4444427",
"method": "v3.CreatePaymentsWechatH5Pay",
"time": 1555498137,
"data": {
"amount": "0.1",
"currency": "EUR",
"demo": "test",
"description": "YabandPay test",
"notify_url": "https://www.yabandpay.com/notify",
"order_id": "202487816549841654",
"pay_method": "online",
"redirect_url": "https://www.yabandpay.com",
"sub_pay_method": "WeChat Pay",
"timeout": "0",
"ip_address" : "127.0.0.1"
}
}
Example Response:
{
"status": true,
"code": "200",
"data": {
"order_id": "202487816549841654",
"trade_id": "ced03b0a-3bb1-ce9b-237e-eed85f4b7e33",
"amount": "0.10",
"currency": "EUR",
"settlement_amount": "0.10",
"settlement_currency": "EUR",
"exchange_rate": "1",
"parameters": {
"pay_url": "https://r2.girogate.de/wechatpay/P1240/I?tx=1034269933&rs=75bjdSRiskwjHHSlEihbvpiWrVgd16Mv&cs=5095080d5a3f88dfb16716f04479e36dda8d79fbea0dc52cf8d902bd3330bb41"
},
"state": "processing"
},
"message": ""
}
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 |