Trades API
Trades API refers the API that merchant submits order to our system. Merchant will obtain Merchant ID and Secret from us, and then able to send POST request to URLs described in this guide.
URL: https://domain/pay
Method: POST
Content-Type: application/x-www-form-urlencoded
Parameters:
name | opt | type | DESC | e.g. |
---|---|---|---|---|
amount | N | float64 | Amount | 123.45 |
merchant | N | string | Merchant uid | e7b8ba3bdbf6ee68adc... |
paytype | N | string | Payment type | Please contact the administrator |
outtradeno | N | string | Merchant order number | 202002020123ABC |
remark | Y | string | Remarks | |
notifyurl | Y | string | Callback notification URL | https://example.com/callbackurl |
returnurl | Y | string | ClientHtml URL | https://example.com/success |
payername | Y | string | Payer's name | 张三 |
returndataformat | Y | string | Return format1 | clienthtml |
sign | N | string | Signature | e10adc3949bae20f883e... |
1 Notes on responses
clienthtml
by default, redirects to order payment page.serverhtml
returns{"code":0,"results": "[order payment URL]"}
serverjson
returns{"code":0,"results": [order data JSON]}
Paramaters of results returned
name | opt | type | DESC | e.g. |
---|---|---|---|---|
tradeno | N | string | Order number | |
amount | N | string | amount | |
discountamount | N | string | The actual amount to be paid | |
paytype | N | string | Payment type | wangguan |
cardname | N | string | Card holder name | 赵四 |
cardno | N | string | Card number | 6000000000000 |
bankname | N | string | Bank name | 中国xx银行 |
subbankname | N | string | Branch name | 中国xx银行xx支行 |
payername | N | string | Payer's name | 张三 |
bankqrcode | N | string | Bank QR code | http://xxxx/xxxx |
createtime | N | int | Creation time (Unix time) | 15000000000 |
timeout | N | int | Timeout | 90 |
e.g.
{
"code":0,
"results":{
"tradeno": "9c4bd61ff72a46159f2af820...",
"paytype": "wangguan",
"cardname": "赵四",
"cardno": "6000000000000",
"bankname": "中国xx银行",
"subbankname": "中国xx银行xx支行",
"payername": "张三",
"bankqrcode": "http://xxxx/xxxx",
"createtime": 15000000000,
"timeout": 90
}
}