Skip to content

Cloud Phone Renewal Order Creation ​

Cloud phone renewal order creation.

Interface Address:

text
/papi/order/renewal/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 + digits

Body Parameters:

ParameterTypeRequiredDescription
payCodestringYesPayment method code; WALLET for pure wallet payment
providerCodestringYesPayment provider code; INTERNAL for wallet payment
walletPayAmountlongNoWallet payment amount for mixed payment, in cents; must be greater than 0 and less than the order's actual payment amount
autoRenewintegerNoAuto-renewal setting: 0 disabled, 1 enabled; current setting is kept when omitted
payParamsobjectNoPayment parameters
├─ keyobjectNokey
skuGroupsarray[object]YesRenewal SKU group list
├─ skuCodestringYesSKU code
├─ containerSidsarray[string]YesCloud phone ID list
├─ packageCodestringYesPackage code

Request Example:

json
{
  "payCode": "wxpayUs",
  "providerCode": "Wallyt412",
  "payParams": {
    "key": {}
  },
  "skuGroups": [
    {
      "skuCode": "c94t9g2dzy",
      "containerSids": ["tERS5CXqCPU2+UPnoACjpA=="],
      "packageCode": "jeur2yj52s"
    }
  ]
}

Response Parameters:

ParameterTypeDescription
codeintegerError code. See Error Codes
dataobjectResponse data
├─ orderNostringOrder number
├─ qrcodeUrlstringQR code URL
├─ payUrlstringPayment URL
├─ payParamsobjectPayment parameters (specific parameters for various payment methods, such as APP payment parameters)
├─├─ keyobjectkey
├─ payAmountintegerPayment amount (US cents)
├─ payAmountYuannumberPayment amount (USD)
├─ walletPayAmountlongWallet payment amount (US cents)
├─ onlinePayAmountlongOnline payment amount (US cents)
├─ currencystringCurrency (USD)
├─ expireTimeintegerOrder expiration time (timestamp)
├─ payMethodstringPayment method
├─ payIconstringPayment method icon
├─ payTypeintegerPayment type
├─ paySceneintegerPayment scene
├─ transactionIdstringTransaction ID
├─ productNamestringProduct name
├─ descriptionstringOrder description
msgstringError message

Response Example:

json
{
  "code": 0,
  "data": {
    "orderNo": "",
    "qrcodeUrl": "",
    "payUrl": "",
    "payParams": {
      "": {}
    },
    "payAmount": 0,
    "payAmountYuan": 0.0,
    "walletPayAmount": 0,
    "onlinePayAmount": 0,
    "currency": "",
    "expireTime": 0,
    "payMethod": "",
    "payIcon": "",
    "payType": 0,
    "payScene": 0,
    "transactionId": "",
    "productName": "",
    "description": ""
  },
  "msg": ""
}

Notes:

  • Pure wallet payment: pass payCode=WALLET and providerCode=INTERNAL; the full order amount is used when walletPayAmount is omitted.
  • Mixed payment: pass the actual online payment channel in payCode/providerCode plus walletPayAmount (in cents); it must be greater than 0 and less than the order's actual payment amount, and the online amount is calculated by the backend. It is recommended to get the actual price via Cloud Phone Renewal Price Calculation first.
  • autoRenew keeps the current setting when omitted or null; an explicit value creates a policy under the existing renewal rules when the resource has no policy yet.

Wallet payment rules ​

Wallet payment uses payCode=WALLET and providerCode=INTERNAL. Mixed payment uses the actual online channel plus an integer walletPayAmount in USD cents, greater than zero and below the calculated payable total; do not submit onlinePayAmount. Recharge orders cannot use wallet or mixed payment. On timeout or uncertain payment status, query the original order and transactions before retrying. Cancellation or switching to wallet payment requires reliable confirmation that an existing online payment is closed. Wallet deductions are returned against the original transaction when cancellation is permitted.

OpenAPI Docs