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.yabandmedia.com/pay/webhook.php&order_id=20180902014018888&pay_method=online&redirect_url=https://www.yabandmedia.com/pay/redirectpage.php&sub_pay_method=WeChat Pay&time=1555498137&timeout=0&user=016683"
Use stringA and secret_key to get stringSign
Get Signature:
"ac6e0d6203170584dc9efc71df3b12440093c853d6879483331a1e5d61af5c73"
Example Request:
{
"user": "016683",
"sign": "ac6e0d6203170584dc9efc71df3b12440093c853d6879483331a1e5d61af5c73",
"method": "v3.CreatePaymentsWechatH5Pay",
"time": 1555498137,
"data": {
"amount": "0.1",
"currency": "EUR",
"demo": "test",
"description": "YabandPay test",
"notify_url": "https://www.yabandmedia.com/pay/webhook.php",
"order_id": "20180902014018888",
"pay_method": "online",
"redirect_url": "https://www.yabandmedia.com/pay/redirectpage.php",
"sub_pay_method": "WeChat Pay",
"timeout": "0",
"ip_address" : "127.0.0.1"
}
}
Example Response:
{
"status": true,
"code": "200",
"data": {
"order_id": "20180902014018888",
"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": ""
}