Skip to content

Cancel order ​

For your own checkout. Cancels a pay-in order that hasn't been paid.

POST/api/open/order/cancel2

Full URL = your API base URL + this path. The base URL is shown in the merchant console under Developers → API & callbacks.

Requires: whitelisted IP, OpenAPI enabled, a pay-in callback URL configured.

Request parameters ​

ParameterTypeRequiredDescription
merchantNostringYesMerchant number
merchantOrderNostringYesYour order number
json
{ "merchantNo": "your merchant number", "merchantOrderNo": "A20261013001" }

Response ​

json
{ "code": 0, "message": "success" }

Common errors ​

codeDescription
40020Order not found (you can only cancel your own orders)
40021The order is not pending payment (orders already marked as paid can't be cancelled)