In-App Payment
API URL:https://mapi.yabandpay.com/Payments
Method:POST
POST data type:Json
Parameter | Type | Description | Mark |
---|---|---|---|
user | String | the UID of cashier account | Required |
sign | String | signature | Required |
method | String | v3.CreatePaymentsWechatMiniPay | Required |
time | Long | timestamp | Required |
- Parameter
Parameter | Type | Description | Mark |
---|---|---|---|
pay_method | String | online | Required |
sub_pay_method | String | Alipay | 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 CNY1 | Required |
currency | String | ISO 4217, For example EUR, CHF | Required |
demo | String | custom field | Optional |
timeout | String | value 0 means 1440 minutes | Optional |
notify_url | String | synchronous notification url | Required |
Signature:
Lexicographical sequence and URL key-value format new string
"amount=1¤cy=EUR&description=YabandPay test&method=v3.CreatePaymentsAlipayAppPay¬ify_url=https://www.yabandmedia.com/pay/webhook.php&order_id=20180902014018888&pay_method=online&sub_pay_method=Alipay&time=1546588959&timeout=0&user=ee_test@yaband.com"
Use stringA and secret_key to get stringSign
Get Signature:
"4245e08ecb86abb99ebbdb644f4e92a85f33874c4c482744f4d766ebb537829b"
Example Request:
{
"user": "ee_test@yaband.com",
"sign": "4245e08ecb86abb99ebbdb644f4e92a85f33874c4c482744f4d766ebb537829b",
"method": "v3.CreatePaymentsAlipayAppPay",
"time": 1546588959,
"data": {
"description": "YabandPay test",
"timeout": "0",
"pay_method": "online",
"sub_pay_method": "Alipay",
"order_id": "20180902014018888",
"amount": "1",
"currency": "EUR",
"notify_url": "https://www.yabandmedia.com/pay/webhook.php",
"redirect_url": ""
}
}
Example Response:
{
"status": true,
"code": "200",
"data": {
"order_id": "20180902014018888",
"trade_id": "97ffb0e1-69eb-67f1-b8b7-ed7a0cd68b14",
"amount": "1.00",
"currency": "EUR",
"settlement_amount": "1.00",
"settlement_currency": "EUR",
"exchange_rate": "1",
"parameters": {
"pay_url": "https://open-sea.alipayplus.com/api/open/v1/ac/cashier/self/codevalue/checkout.htm?codeValue=281666040092sxBvzSwPw9gUhQ6HrVJv5OcN"
},
"state": "processing"
},
"message": ""
}