cancel_order
Cancel a Shopify order, optionally refund payment, restock inventory, and notify customer. Provide reason and staff notes.
Instructions
Cancel a Shopify order. Triggers an async job (the response includes a jobId; cancellation finishes shortly after the call returns). Combine with refund: true to issue a full refund of any captured payment, or refund: false if the order is unpaid or you'll handle refunds separately via refund_order. restock: true restores cancelled line items back to inventory; set false if items were physically lost/damaged. notifyCustomer: true sends the cancellation email. Cannot cancel an already-cancelled order or one with active fulfillments still in flight (cancel those fulfillments first via cancel_fulfillment).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Order GID or numeric ID to cancel. The order must not already be cancelled. | |
| reason | Yes | Why the order is being cancelled. CUSTOMER (customer requested), FRAUD (suspected fraud), INVENTORY (out of stock), DECLINED (payment declined), STAFF (staff decision), OTHER. | |
| refund | No | Whether to refund the customer's payment as part of cancellation. true = refund any captured payment in full; false = cancel without refunding (use for unpaid orders, or when you'll handle the refund separately). | |
| restock | No | Whether to restock cancelled line items back to inventory. true = decrement inventory back; false = leave inventory as-is (use when items were physically lost/damaged). | |
| staffNote | No | Internal note about the cancellation reason. Visible to staff only. | |
| notifyCustomer | No | Send the customer a cancellation email. Default false. |