Create Recharge
Create a wallet recharge order and get the payment URL and payment parameters. Recharge does not support wallet payment or mixed payment. It is recommended to create recharge orders via the Place Order API with productCode=WALLET_RECHARGE; this API is the wallet-specific entry.
Interface Address:
text
/papi/wallet/recharge/createRequest Method:
text
POSTContent-Type:
text
application/jsonHeader Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| X-Access-Key | string | Yes | API access key ID. See API Rules for authentication |
| X-Signature | string | Yes | Signature value, Base64-encoded HMAC-SHA256 result |
| X-Timestamp | string | Yes | Millisecond-level Unix timestamp (13 digits) |
| X-Nonce | string | Yes | Random string, 10~32 lowercase letters + digits |
Body Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| amount | string | Yes | Recharge amount (cents), positive integer string, decimals not allowed |
| currency | string | No | Currency code, only USD is supported, defaults to USD |
| payCode | string | Yes | Online payment method code, use an actually enabled payment method |
| providerCode | string | Yes | Payment provider code |
Request Example:
json
{
"amount": "1000",
"currency": "USD",
"payCode": "wxpayUs",
"providerCode": "Wallyt412"
}Response Parameters:
| Parameter | Type | Description |
|---|---|---|
| code | integer | Error code. See Error Codes |
| data | object | Response data |
| ├─ rechargeNo | string | Recharge order number, identical to the order number |
| ├─ orderNo | string | Associated order number |
| ├─ amount | string | Recharge amount (cents) |
| ├─ currency | string | Currency code |
| ├─ currencySymbol | string | Currency symbol, e.g. $ for USD |
| ├─ rechargeStatus | string | Recharge status (CREATED-pending confirmation, CREDITED-credited) |
| ├─ creditedTime | integer | Credit time (Unix millisecond timestamp), null when not credited |
| ├─ paymentNo | string | System payment number |
| ├─ paymentStatus | integer | Payment status |
| ├─ payUrl | string | Payment channel redirect URL |
| ├─ qrCodeUrl | string | Payment QR code image URL |
| ├─ payParams | string | Payment channel parameters |
| msg | string | Error message |
Response Example:
json
{
"code": 0,
"data": {
"rechargeNo": "MO202611021000000000001",
"orderNo": "MO202611021000000000001",
"amount": "1000",
"currency": "USD",
"currencySymbol": "$",
"rechargeStatus": "CREATED",
"creditedTime": null,
"paymentNo": "",
"paymentStatus": 0,
"payUrl": "",
"qrCodeUrl": "",
"payParams": ""
},
"msg": ""
}