简要描述
- 代付下单接口
请求信息
请求 URL
javascripthttps://www.xxx.com/gateway/withdraw请求规范
基础信息
- 接口协议:
HTTPS - 数据格式:
application/json - 请求方式:
POST
- 接口协议:
请求示例
typescript// typescript + axios 请求示例 import axios from 'axios' // 请求参数类型定义 interface CreateOrderParams { merchant_no: string order_no: string amount: string remark: string customer: string callback_url: string account: string time: string sign: string } // 创建订单请求 async function createOrder(params: CreateOrderParams) { try { const response = await axios.post('https://api.example.com/gateway/withdraw', params) console.log('Success:', response.data) return response.data } catch (error: any) { if (error.response) { console.error('API Error:', error.response.data) } else { console.error('Request Failed:', error.message) } throw error } } // 示例调用 createOrder({ merchant_no: 'M1234567890', order_no: 'ORD1234567890', amount: '250.00', remark: 'Wallet top-up', customer: 'user456', callback_url: 'https://yourapp.com/callback', account: '0xA0b86991c6218b36c1d19d4a2e9eb0ce3606eB48', time: Date.now().toString(), sign: 'your_generated_signature_here' })
请求参数列表
参数名 必选 类型 说明 merchant_no ✅ string 商户号 order_no ✅ string 商户订单号 amount ✅ string 金额 remark ✅ string 备注 customer ✅ string 用户id callback_url ✅ string 成功回调地址 account ✅ string 钱包地址 time ✅ string 时间戳 sign ✅ string sign
响应信息
响应示例
json
{
"code": "0",
"msg": "",
"data": {
"trade_no": "W24111615133132216"
}
}响应参数列表
参数名 类型 说明 trade_no string 订单号
备注
- 更多关于代付下单接口的问题请咨询管理员
- 更新日期: 2024-04-24