Cancel an order
cancel_orderCancel an order, stopping it before it is printed. With the order_token from create_order this works while the order is awaiting_payment (which also closes its payment link, and a payment that still lands on it is refunded in full automatically), and after payment until production starts (order.refund_on_cancel is true), when the payment is refunded in full automatically and the result status is refunded. A platform that sends its own API key (Authorization: Bearer mp_live_...) can additionally cancel an order THAT KEY created while it is confirmed or printing — that is how you stop a press when your customer cancels on your side. shipped and delivered can never be canceled; that is a refund, contact support (see get_catalog). Once printing has started, canceling (creating key only) stops production but moves no money. Canceling releases the order's client_reference — replaying that reference afterwards creates a new order and prints it. If the order moved on before the cancel landed you get not_cancellable naming its new status, never a false "canceled".
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"order_id": "<order_id>"
},
"name": "cancel_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order_id | Yes | The order_id returned by create_order, e.g. ord_01HZX8K3M9QWER5T7Y2B4N6C8D. Not the order_token. | |
| order_token | No | The token returned once by create_order. Optional if you send the API key that created the order instead. |