商户买币
此接口用于开发者代表商户向开放平台请求买币,希望通过有交易员可以协助完成买币操作。
请求地址
沙盒环境: http://sandboxwww.666otc.com/api/merchant/requestTraderBuy
生产环境: http://www.666otc.com/api/merchant/requestTraderBuy
请求方式
POST
请求参数
名称
是否必填
长度
类型
说明
appid
是
64
String
授权appid
amount
是
64
String
买币数量
mobile
是
64
String
用户手机号
username
是
64
String
用户名称
orderid
是
64
String
开发者系统订单id
notify_url
是
200
String
订单回调地址
return_url
否
200
String
支付成功后跳转地址
currency
是
64
String
法币
type
否
64
String
default:1
1:以usdt数量发起
2:以法币金额发起
sign
是
64
String
加密结果值
(以curl命令请求生产环境接口为例)示例如下:
curl 'http://www.666otc.com/api/merchant/requestTraderBuy' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"appid": "666666",\
"amount":"1",\
"mobile":"13000000001",\
"username":"999999",\
"orderid":"10011",\
"notify_url":"https://www.testwebsite.com/notify",\
"return_url":"https://www.testwebsite.com/redirect",\
"currency":"CNY",\
"sign":"84336629F874E793035255E12E88"}'
响应参数
名称
子项
是否
必填
长度
类型
说明
示例值
status
是
--
Integer
请参考本页"应答结果编码"部分
0
data
是
--
Object
接口返回值json串,具体见业务响应参数
total_price
是
--
String
总金额
rate_price
是
--
String
汇率
limit_time
是
--
String
交易限制支付时间,单位:分钟
order_time
是
--
String
订单时间
pay_info
是
--
String
支付信息(微信,支付宝,银行卡)
trader_no
是
--
String
开放平台订单号
order_id
是
--
String
开发者传入的商户平台订单号
pay_url
是
--
String
收银台网址
成功应答示例如下:
{
"data":{"trader_no":"","order_id":"","total_price":"","rate_price":"","limit_time":"","order_time":"","pay_info":"","pay_url":""},
"status":1
}
失败应答示例如下:
{
"err":"签名错误",
"status":0
}
应答结果编码
开发者在调用开放平台接口的时候,相关错误码请参考如下:
错误码
说明
1
平台处理成功
0
平台处理失败
Last updated
Was this helpful?