Skip to content

Create Wallet Recharge ​

Create a wallet recharge order and return the payment information. It is recommended to use the Place Order API with productCode=WALLET_RECHARGE; this dedicated wallet entry point is also available.

Interface Address:

text
/papi/wallet/recharge/create

Request Method:

text
POST

Content-Type:

text
application/json

Header Parameters:

ParameterTypeRequiredDescription
X-Access-KeystringYesAPI access key ID. See API Rules for authentication
X-SignaturestringYesSignature value, Base64-encoded HMAC-SHA256 result
X-TimestampstringYesMillisecond-level Unix timestamp (13 digits)
X-NoncestringYesRandom string, 10~32 lowercase letters and digits

Body Parameters:

ParameterTypeRequiredDescription
amountstringYesRecharge amount, a positive integer string in cents (e.g. 1000 means 10 USD). Decimals are not allowed
currencystringNoCurrency code; only USD is supported
payCodestringYesPayment method code, use an actually enabled online payment method
providerCodestringYesPayment provider code, use the provider code of this site

Request Example:

json
{
  "amount": "1000",
  "currency": "USD",
  "payCode": "actual payment method code",
  "providerCode": "actual provider code"
}

Response Parameters:

ParameterTypeDescription
codeintegerError code. See Error Codes
dataobjectReturn data
├─ rechargeNostringRecharge order number, same as orderNo
├─ orderNostringAssociated order number
├─ amountstringRecharge amount, in cents
├─ currencystringCurrency code
├─ currencySymbolstringCurrency symbol, e.g. $ for USD
├─ rechargeStatusstringRecharge status: CREATED pending confirmation, CREDITED credited
├─ creditedTimelongCredited time, Unix timestamp in milliseconds
├─ paymentNostringSystem payment number
├─ paymentStatusintegerPayment status
├─ payUrlstringPayment URL provided by the channel
├─ qrCodeUrlstringPayment QR code URL
├─ payParamsstringPayment channel parameters as a string, varies by channel
msgstringError message

Response Example:

json
{
  "code": 0,
  "data": {
    "rechargeNo": "",
    "orderNo": "",
    "amount": "1000",
    "currency": "USD",
    "currencySymbol": "$",
    "rechargeStatus": "CREATED",
    "creditedTime": null,
    "paymentNo": "",
    "paymentStatus": 0,
    "payUrl": "",
    "qrCodeUrl": "",
    "payParams": null
  },
  "msg": ""
}

Notes:

  • rechargeNo is the same as the order number and can be used in Get Recharge Status.
  • CREATED means the recharge has not been confirmed yet; only CREDITED means the recharge has been credited to the wallet.
  • Recharge does not support wallet payment or mixed payment; payCode must not be WALLET.

OpenAPI Docs