Skip to main content

创建数字币任意金额扫码支付订单

#简要描述: 数字币充值业务接口,用户通过扫描二维码的方式将 USDT(Tether)充值到他们的数字钱包账户

创建支付订单

请求参数
参数名称类型必填参数含义参数说明
keystring商户 key平台分配商户 key
localOrderIdstring商户本地订单号商户本地订单号
localUserIdstring平台分配商户商户号
notifyUrlstring回调地址用户下发成功后,由 API 回调商户的地址
timestampLong时间戳(秒)获取当前时间毫秒数,除以 1000 转换为秒
successRedirectUrlstring跳转地址成功后自动跳转地址
currencystring订单计价币种计价币种(CNY、USDT、TRX、USD)
userCurrencystring用户支付币种需要用户支付的币种(USDT、TRX)
signstring签名详情见签名算法
请求 json 样例
{
"key": "PZuzmBAeA8KzeglX",
"localOrderId": "1760",
"localUserId": "75",
"timestamp": 1730987114,
"notifyUrl": "http://192.168.222.244:8051/merchant-demo/notify",
"currency": "USDT",
"userCurrency": "USDT",
"sign": "c831fa6a0d772bb921101638acea91f7"
}

####支付返回 json 格式

返回 data 示例

{
"code": 0,
"success": true,
"message": null,
"data": {
"orderId": 242724552078396,
"localUserId": "302199873005",
"localOrderId": "2023102400684344447",
"orderType": "PAYMENT",
"orderBizType": "PAYMENT_ANY_USDT_WALLET_SCAN",
"paymentUrl": "http://api.wallet.dx.com/scan-pay-front/SAjuzkzzbkfjWewEmCMrTnHdvox1FcgUBcdJ9dSoULwa8Y22hQcQr4szdLkc"
}
}

返回的 paymentUrl 弹出支付页面,如下图:

img

data 参数说明
参数名称类型必填参数含义备注
orderIdstring订单 ID
localUserIdstring商户本地用户 ID
localOrderIdstring商户本地订单号
orderTypeenum订单类型PAYMENT:支付订单 WITHDRAW:提款订单
orderBizTypeenum订单业务类型orderBizType 类型说明如下
paymentUrlstring支付地址
publicKeystring公共访问密钥
addressesmap链地址

orderBizType 类型说明:

1、PAYMENT_WALLET_SCAN 点付钱包扫码支付
2、PAYMENT_TRANSFER 数字币绑定地址直充
3、PAYMENT_ANY_DIGITAL_SCAN 数字币任意金额扫码支付
4、WITHDRAW_WALLET 提款至点付钱包
5、WITHDRAW_ANY_DIGITAL_WALLET 提款数字币至任意钱包
6、PAYMENT_FIXED_DIGITAL_SCAN 数字币限定金额扫码支付
7、BATCH_PAY 批量代付

回调返回 json 数据

默认所有回调参数参与验签,回调参数详情请看回调

回调 data
{
"amount": 11,
"bizType": "PAYMENT_FIXED_DIGITAL_SCAN",
"currency": "CNY",
"key": "h3cS7dBltRU4W1wD",
"localOrderId": "2820",
"merchantActualAmount": 8.86,
"merchantCurrency": "CNY",
"merchantId": 303122065665,
"merchantPaidAmount": 10.98,
"merchantUserId": "97",
"notifyTime": 1731572168370,
"orderCreateTime": 1731572133082,
"orderId": "273124814912907",
"sign": "699806308a9e055114c378671b0d2a15",
"status": "SUCCESS",
"type": "PAYMENT",
"userAmount": 1.55,
"userCurrency": "USDT"
}