1. user up interface
Business Description: User A requests recharge at Merchant B, Merchant B calls this interface, the result returned by the interface includes a URL. The URL opens to a page containing a QR code. User A scans the QR code with MPay wallet, after successful scanning the code, the system will request a callback callBackUrl. after User A completes the payment, merchant B's wallet increases the amount of coins and deducts the handling fee; user A's wallet decreases the amount of coins.
`interface address:{host}/api/v2.1/merch/user/up
`request method:GET/POST form
field | type | nickname | description |
---|---|---|---|
merchId | Integer | merchant ID | |
body | String | encryption parameter | See table 4 for details |
t | Integer | current timestamp | |
key | String | sign | Md5(merchId+body+t+md5key) |
Parameters: Table 4:
field | type | nickname | description |
---|---|---|---|
merchOrderId | String | Merchant up order number | |
amount | Integer | up Amount | |
returnUrl | String | return url | Non-essential, users will be redirected to this URL after completing the payment by scanning the qr code. |
callBackUrl | String | Merchant Customized Callback Interface | For details, please see the user‘s up order result notification. |
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) |
remark | String | Remarks | Merchant’s extension |
title | String | pay Title | pay Title |
body generation rules:
`1. base64Decode public key
`2. Convert the parameters in Table 4 to jsonString
3. Use public key to encrypt jsonString with RSA (ECB mode, PKCS1 alignment)
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 | {url:”url”,id:”Up Order Number”} |