Cancel order
For your own checkout. Cancels a pay-in order that hasn't been paid.
POST
/api/open/order/cancel2Full 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
| Parameter | Type | Required | Description |
|---|---|---|---|
merchantNo | string | Yes | Merchant number |
merchantOrderNo | string | Yes | Your order number |
json
{ "merchantNo": "your merchant number", "merchantOrderNo": "A20261013001" }Response
json
{ "code": 0, "message": "success" }Common errors
| code | Description |
|---|---|
| 40020 | Order not found (you can only cancel your own orders) |
| 40021 | The order is not pending payment (orders already marked as paid can't be cancelled) |