API reference
Search…
⌃K
Links

Orders

The order object and the allowed CRUD operations on the related resource endpoint
Orders get created in draft status and become pending when they have a customer and some line items.
Draft orders act as shopping carts — see our how-to on how to manage shopping carts.
pending orders can be recovered when abandoned. The status of an order is strictly dependent on the related payment and fulfillment statuses. When an order is placed, it can either get approved or cancelled. An approved order becomes fulfilled when paid and shipped. Cancelling an order automatically voids its payment source's authorization. Captured payments can be refunded, either fully or partially.
Action
Order status
Payment status
Fulfillment status
Order placement
placed
authorized
unfulfilled
Order cancellation
cancelled
voided
unfulfilled
Order approval
approved
authorized
unfulfilled
Payment capture
approved
paid
in_progress
Refund (partial)
approved
partially_refunded
No changes to the previous fulfillment status.
Refund (full)
cancelled
refunded
unfulfilled if in progress, otherwise fulfilled.
All shipments shipped
approved
paid
fulfilled
Data model

Idempotency

Order status changes are idempotent. The order and payment statuses are granted to be consistent upon multiple updates (e.g. it's possible to place or cancel an order multiple times, without worrying about duplicated transactions and other side effects).
This can be useful to force a payment status (e.g. paid), in case the payment gateway has recorded the capture, but for some reason (typically the gateway's timeout) the order kept an inconsistent payment status (e.g. authorized). Webhooks's events, stock item updates, and other status-related actions are granted to be executed only once.