Cancel an order
Cancels a completed order.
cancel_reason_id records why, from the store’s own cancellation-reason
vocabulary (/admin/order_cancellation_reasons), and cancel_note is a
staff-facing note; both are shown on the order afterwards.
Stock is always released — the goods are not going out either way — and every payment is settled at the gateway, which releases an authorization it never drew on and refunds a charge it cannot release.
refund_payments and refund_amount govern the shared payment of a
split checkout, where one payment covers several orders: they decide
whether this order’s share comes back, and how much of it. A
refund_amount on an ordinary order is refused with a 422.
Set notify_customer: true to send the order cancellation email.
Required scope: write_orders (for API-key authentication).
Authorizations
Secret API key for admin access
JWT token for admin user authentication
Headers
Bearer token for admin authentication
Path Parameters
Order ID
Body
Why the order was canceled — the id of one of the store's cancellation reasons.
Staff-facing note about the cancellation.
Whether this order's share of a payment shared across a split checkout is handed back.
How much of that share to return. Defaults to all of it; refused on an order whose payment is not shared.
Send the order cancellation email after canceling.
Response
order canceled

