Brief Description
- 代付下单接口
Solicited Message
Request URL
javascripthttps://www.xxx.com/gateway/withdrawRequest Specification
Basic Information
- Interface Protocol:
HTTPS - Data Format:
application/json - Request Method:
POST
- Interface Protocol:
Request Example
typescript// typescript + axios Request Example 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 } } // Example call 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' })
Request Parameter List
Parameter Name Required Type explain merchant_no ✅ string merchant identification number order_no ✅ string Merchant Order Number amount ✅ string amount remark ✅ string remark customer ✅ string user ID callback_url ✅ string Successful callback address account ✅ string wallet address time ✅ string timestamp sign ✅ string sign
Response Message
Response Example
json
{
"code": "0",
"msg": "",
"data": {
"trade_no": "W24111615133132216"
}
}Response parameter list
Parameter Name Type explain trade_no string order number
remark
- For more questions regarding 代付下单接口 , please contact the administrator.
- Date updated: 2024-04-24