Skip to main content
Use this hook when you need the placed order on the order confirmation page. It’s useful for custom thank-you components, order summaries, and confirmation-page tracking.
Let your agent build it. The Ollie Shop skill ships with projects created by npx create-ollie-shop and knows this hook only resolves on the order confirmation route.
Prompt
Don’t have the skill yet? Install it.

Import

Return Value

For the shape of CheckoutOrder, FulfillmentOrder and the types they contain, see the Checkout Order Types reference.

Where it works

The order is only loaded on the order confirmation route, so this hook only returns data for components placed in the slots of that page (see the Slots Catalog, “Order confirmation”). The page fetches the order while it renders, and the hook suspends the component until the order arrives: the page’s own loading state covers that moment, so you do not need a loading branch. Anywhere else, order is an empty object and reading order.fulfillmentOrders[0] throws. Keep order components in the confirmation slots.

Usage

Example

Display an order summary on a custom order page.

Notes

  • A store configured to use the platform’s own success page redirects before the order page renders, so this hook never runs there.
  • raw is platform-specific and not covered by the SDK types; prefer order and fall back to raw only for data the normalized order does not carry.
  • See Checkout Order Types for complete type definitions.