Order API
The Order API provides read-only access to core order details on the Order status page. Use this API to identify the current order, display its status, or correlate it with data from other Shopify APIs.
Anchor to Use casesUse cases
- Display the order number: Show the human-readable order name (for example, #1000) to the buyer.
- Show order status: Check the cancellation and processing timestamps to determine and display the current order status.
- Reference the confirmation number: Display the confirmation number so the buyer can reference it when contacting support.
Supported targets
- customer-account.
order-status. announcement. render - customer-account.
order-status. block. render - customer-account.
order-status. cart-line-item. render-after - customer-account.
order-status. cart-line-list. render-after - customer-account.
order-status. customer-information. render-after - customer-account.
order-status. fulfillment-details. render-after - customer-account.
order-status. payment-details. render-after - customer-account.
order-status. return-details. render-after - customer-account.
order-status. unfulfilled-items. render-after - customer-account.
order. action. menu-item. render - customer-account.
order. action. render - customer-account.
order. page. render
Supported targets
- customer-account.
order-status. announcement. render - customer-account.
order-status. block. render - customer-account.
order-status. cart-line-item. render-after - customer-account.
order-status. cart-line-list. render-after - customer-account.
order-status. customer-information. render-after - customer-account.
order-status. fulfillment-details. render-after - customer-account.
order-status. payment-details. render-after - customer-account.
order-status. return-details. render-after - customer-account.
order-status. unfulfilled-items. render-after - customer-account.
order. action. menu-item. render - customer-account.
order. action. render - customer-account.
order. page. render
Anchor to PropertiesProperties
The shopify global object provides details about the placed order. Access the following properties on shopify to read the order ID, display name, confirmation number, processing date, and cancellation status.
- Anchor to orderorderorderSubscribableSignalLike<Order | undefined>SubscribableSignalLike<Order | undefined>requiredrequired
The order that was placed after checkout completion. Includes the order ID, display name, confirmation number, and timestamps for processing and cancellation. The value is
undefinedif the order hasn't been fully processed yet.
SubscribableSignalLike
Represents a reactive signal interface that provides both immediate value access and subscription-based updates. Enables real-time synchronization with changing data through the observer pattern. This interface extends `ReadonlySignalLike` with deprecated fields that are still supported for backwards compatibility.
- current
The current value of the signal. Equivalent to `.value`, accessing this property subscribes to changes when used in a reactive context.
T - destroy
Cleans up the subscription and releases any resources held by this signal. After calling `destroy()`, the signal stops receiving updates from the main thread.
() => Promise<void> - subscribe
Subscribes to value changes and calls the provided function whenever the value updates. Returns an unsubscribe function to clean up the subscription. Use to automatically react to changes in the signal's value.
(fn: (value: T) => void) => () => void - value
The current value of the signal. This property provides immediate access to the current value without requiring subscription setup. Use for one-time value checks or initial setup.
T
Order
Information about an order that was placed.
- cancelledAt
The date and time when the order was cancelled, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. The value is `undefined` if the order hasn't been cancelled. Use this to conditionally display cancellation details to the buyer.
string - confirmationNumber
A randomly generated alphanumeric identifier for the order that the buyer can use when contacting the merchant about their purchase. This is always present for orders created in 2024 and onwards. For older orders, this value may be `undefined`.
string - id
A globally-unique identifier for the order in the format `gid://shopify/Order/<id>`. Use this to reference the order in the [GraphQL Admin API](/docs/api/admin-graphql).
string - name
The merchant-facing order number prefixed with `#`, such as `#1001`. This is the human-readable identifier displayed to both the merchant in Shopify admin and the buyer on the **Order status** page and in email confirmations.
string - processedAt
The date and time when the order was processed, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. An order is processed after the buyer completes checkout and the payment is captured, at which point the order becomes visible in Shopify admin.
string
Anchor to Best practicesBest practices
- Use
namefor display andidfor lookups: Thenameproperty (for example,#1000) is the human-readable order number shown to buyers. Use theidproperty (a globally-unique GID) for API lookups and data storage.
Anchor to LimitationsLimitations
- The Order API provides summary-level information only. For detailed order data such as fulfillments or transactions, use the GraphQL Admin API through a backend service.