Orders can only be cancelled if they haven’t been shipped. Once shipped, use the return flow instead.
Overview
The cancel order endpoint allows you to cancel an existing order and automatically process refunds. This is useful for customer-requested cancellations, inventory issues, or fraud prevention.Cancellation Rules
Can Cancel
- Status:
pending
,processing
,paid
- No shipments created
- Within cancellation window
Cannot Cancel
- Status:
shipped
,delivered
- Partial fulfillment started
- Past cancellation deadline
Request
Path Parameters
The unique identifier of the order to cancelExample:
ord_1a2b3c4d5e6f
Body Parameters
Reason for cancellationOptions:
customer_request
- Customer initiated cancellationout_of_stock
- Item(s) no longer availablepricing_error
- Incorrect pricingfraud_suspected
- Potential fraudulent orderduplicate_order
- Duplicate order placedother
- Other reason (use notes)
Amount to refund. If not specified, full refund is processedExample:
99.99
Additional notes about the cancellationExample:
"Customer changed mind about purchase"
Whether to send cancellation email to customer
Whether to return items to inventory
Response
The cancelled order object
Refund details if payment was processed
List of inventory adjustments made
Webhooks
This endpoint triggers the following webhook events:order.cancelled
- When order is successfully cancelledrefund.created
- When refund is initiatedinventory.updated
- When items are restocked
Best Practices
Implement Cancellation Windows
Implement Cancellation Windows
Set clear cancellation deadlines based on your fulfillment process:
Handle Partial Payments
Handle Partial Payments
For orders with multiple payment methods or partial payments:
Customer Communication
Customer Communication
Always provide clear communication about cancellations: