代收接口
代收接口 是指商户提交到系统下单的接口。商户获得系统提供的商户ID和Secret后,即可通过发送POST请求到文档中的URL地址发起下单请求。
URL: https://hostname/pay
Method: POST
Content-Type: application/x-www-form-urlencoded
参数明细表:
name | opt | type | DESC | e.g. |
---|---|---|---|---|
amount | N | float64 | 金额 | 123.45 |
merchant | N | string | 商户id | e7b8ba3bdbf6ee68adc... |
paytype | N | string | 支付方式 | 具体模式名称請聯繫站點 |
outtradeno | N | string | 商户订单号 | 202002020123ABC |
remark | Y | string | 备注 | 注意:USDT支付时,备注填写"cny2usdt" 会自动转换金额从人民币到USDT |
bankname | Y | string | 备注 | 指定转账银行时,可填写银行名称,如:中国农业银行 |
notifyurl | Y | string | 异步回调通知地址 | https://example.com/your_path_here |
returnurl | Y | string | ClientHtml跳回地址 | https://example.com/your_path_here |
payername | Y | string | 付款人姓名 | 张三 |
returndataformat | Y | string | 返回格式1 | clienthtml |
cardno | Y | string | 指定卡号(特邀商户可用) | 09000000 |
sign | N | string | 签名 | e10adc3949bae20f883e... |
e.g USDT 支付,paytype 为 usdtpay
1 接口返回说明
clienthtml
(默认)重定向到订单支付页面serverhtml
返回{"code":0,"results": "[订单支付页面的url字符串]"}
serverjson
返回{"code":0,"results": [订单数据JSON对象]}
results 返回参数表
name | opt | type | DESC | e.g. |
---|---|---|---|---|
tradeno | N | string | 订单号 | |
amount | N | string | 订单金额 | |
discountamount | N | string | 实际需要支付的金额 | |
paytype | N | string | 支付方式 | wangguan |
cardname | N | string | 收款人姓名 | 赵四 |
cardno | N | string | 收款人账号 | 6000000000000 |
bankname | N | string | 收款人银行名称 | 中国xx银行 |
subbankname | N | string | 支行名称 | 中国xx银行xx支行 |
payername | N | string | 付款人姓名 | 张三 |
bankqrcode | N | string | 收款银行二维码 | http://xxxx/xxxx |
createtime | N | int | 创建时间(Unix时间) | 15000000000 |
timeout | N | int | 超时时长 | 90 |
redirect | Y | string | 跳转地址(仅在returndataformat=serverjson时)返回 | http://xxxx/xxxx |
e.g.
{
"code":0,
"results":{
"tradeno": "9c4bd61ff72a46159f2af820...",
"amount": "1000",
"discountamount":"999.99",
"paytype": "wangguan",
"cardname": "赵四",
"cardno": "6000000000000",
"bankname": "中国xx银行",
"subbankname": "中国xx银行xx支行",
"payername": "张三",
"bankqrcode": "http://xxxx/xxxx",
"createtime": 15000000000,
"timeout": 90
}
}