1. User Down Interface
Business Description: User A requests cash withdrawal from merchant B. Merchant B calls this interface, which returns relevant information. After receiving the request, the backend will callback callBackUrl. After the business is successful, merchant B wallet coins reduced, deducted amount number of coins, deducting the handling fee; user A's wallet increases the amount of coins.
`interface address:{host}/api/v2/merch/user/down
`Request method:GET/POST form
field | type | nickname | description |
---|---|---|---|
merchId | Integer | merchant ID | |
body | String | encryption parameter | See table 6 for details |
t | Integer | current timestamp | |
key | String | sign | Md5(merchId+body+t+md5key) |
Parameters: Table 6:
field | type | nickname | description |
---|---|---|---|
merchOrderId | String | Merchant down order number | |
amount | Integer | down Amount | |
username | String | User real name | Non-essential, verify the user’s real name after passing in the value. If it does not match, the request will be returned. |
callBackUrl | String | Merchant Customized Callback Interface | For details, please see the user‘s down order result notification. |
userWalletAddress | String | User wallet address | |
remark | String | remark | Non-essential |
currency | String | Currency KEY | Non-essential, the merchant will have a default currency, which is normally CNY. |
merchUserId | String | Merchant's user ID | Merchant's user ID (unique value) |
title | String | pay Title | pay Title |
idNumber | String | ID card number | Not necessary, the incoming value will verify the user's ID number. If it does not match, the request will be returned |
phoneNumber | String | Phone number | Optional, the incoming value will verify the user's phone number. If it does not match, the request will be returned (note that you need to add the country code such as: 8613145202569) |
body generation rules:
`1. base64Decode public key
`2. Convert the parameters in Table 6 to jsonString
3. Use public key to encrypt jsonString with RSA (ECB mode, OAEP SHA256 pair, MGF1 padding)
4. The encryption result base64 Encode is the string body
Interface Response Results:
field | type | nickname | description |
---|---|---|---|
code | Integer | status code | 0 means the request is normal, see the attached table for details. |
message | String | message | |
data | Return data | {status:””,id:”down order number”} |
status Order Status:
`“finish”:Order transaction completed
`“pending”:Orders in progress