Skip to content

Cancel Order ​

Cancel order.

Interface Address:

text
/papi/order/cancel

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
orderNostringYesOrder number

Request Example:

json
{
  "orderNo": "MO202608111703173340002"
}

Response Parameters:

ParameterTypeDescription
codeintegerError code. See Error Codes
databooleanResponse data
msgstringError message

Response Example:

json
{
  "code": 0,
  "data": false,
  "msg": ""
}

Notes:

  • data=true means the cancellation request succeeded; only unfinished orders that meet the cancellation conditions can be cancelled.
  • When the order has wallet debits, cancellation returns them to the wallet per the original debit transactions; for mixed-payment orders, reliably confirm the online payment has been closed first.
  • Do not place duplicate orders as a substitute for querying the original order.

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