Brief Description
- 用户直冲接口
Solicited Message
Request URL
javascripthttps://www.xxx.com/h5/depositRequest 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' // Define the types of request parameters interface CreateRechargeParams { merchant_no: string member_id: string order_no: string amount: string callback_url: string return_url: string remark: string ip: string time: string sign: string } // 发起充值请求 async function createRechargeOrder(params: CreateRechargeParams) { try { const response = await axios.post('https://api.example.com/h5/deposit', params) console.log('Recharge 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 createRechargeOrder({ merchant_no: 'M1234567890', member_id: 'user_001', order_no: 'ORD20250425001', amount: '500.00', callback_url: 'https://yourapp.com/api/callback', return_url: 'https://yourapp.com/success', remark: 'Recharge to wallet', ip: '192.168.1.88', time: Date.now().toString(), sign: 'your_generated_signature_here' })
Request Parameter List
Parameter Name Required Type explain merchant_no ✅ string merchant identification number member_id ✅ string user ID order_no ✅ string Merchant Order Number amount ✅ string recharge amount callback_url ✅ string loopback address return_url ✅ string Jumping to URL remark ✅ string remark ip ✅ string user IP time ✅ string timestamp sign ✅ string sign
Response Message
Response Example
json
{
"code": "0",
"msg": "",
"data": {
"trade_no":"asdf43fsfsdfasdgdfsfdz",
"status":"pending",//pending,success
"deposit_page_url": "http://xxxxxxx.com/xxx?token=xff3f3f3f3f&transaction_id=3r3f3f3f3f"
}
}Response parameter list
Parameter Name Type explain trade_no string order number status string status(pending, success) deposit_page_url string Link to the recharge page
remark
- For more questions regarding 用户直冲接口 , please contact the administrator.
- Date updated: 2024-04-24