Skip to content

Brief Description

  • 请求进入钱包接口

Solicited Message

  • Request URL

    javascript
    https://www.xxx.com/h5/access
  • Request Specification

    Basic Information

    • Interface Protocol:HTTPS
    • Data Format:application/json
    • Request Method:POST
  • 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
        return_url: string
        ip: string
        time: string
        sign: string
    }
    
    // 发起充值请求
    async function createRechargeOrder(params: CreateRechargeParams) {
        try {
            const response = await axios.post('https://api.example.com/h5/access', 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',
        return_url: 'https://yourapp.com/success',
        ip: '192.168.1.88',
        time: Date.now().toString(),
        sign: 'your_generated_signature_here'
    })

  • Request Parameter List

    Parameter NameRequiredTypeexplain
    merchant_nostringmerchant identification number
    member_idstringuser ID
    return_urlstringJumping to URL
    ipstringuser IP
    timestringtimestamp
    signstringsign

Response Message

  • Response Example

json
{
  "code": "0",
  "msg": "",
  "data": {
    "access_page_url": "http://xxxxxxx.com/xxx?token=xff3f3f3f3f"
  }
}

  • Response parameter list

    Parameter NameTypeexplain
    access_page_urlstringwallet address


remark

  • For more questions regarding 请求进入钱包接口 , please contact the administrator.
  • Date updated: 2024-04-24