Cancel Order
Cancel order.
Interface Address:
/papi/order/cancelRequest Method:
POSTContent-Type:
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 |
|---|---|---|---|
| orderNo | string | Yes | Order number |
Request Example:
{
"orderNo": "MO202608111703173340002"
}Response Parameters:
| Parameter | Type | Description |
|---|---|---|
| code | integer | Error code. See Error Codes |
| data | boolean | Response data |
| msg | string | Error message |
Response Example:
{
"code": 0,
"data": false,
"msg": ""
}Notes:
data=truemeans 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.
