Skip to main content
Migrate to Polaris

Version 2025-07 is the last API version to support React-based UI components. Later versions use web components, native UI elements with built-in accessibility, better performance, and consistent styling with Shopify's design system. Check out the migration guide to upgrade your extension.

Buyer Journey API

The API for interacting with the buyer journey.

The base API object provided to purchase extension targets.

Anchor to buyerJourney
buyerJourney
required

Provides details on the buyer's progression through the checkout.

Refer to buyer journey examples for more information.

Anchor to useBuyerJourney
useBuyerJourney()

Returns the buyerJourney details on buyer progression in checkout.

Anchor to useBuyerJourneyCompleted
useBuyerJourneyCompleted()

Returns true if the buyer completed submitting their order.

For example, when viewing the Order status page after submitting payment, the buyer will have completed their order.

false | true

Installs a function for intercepting and preventing progress on checkout.

To block checkout progress, you must set the block_progress capability in your extension's configuration.

If you do, then you're expected to inform the buyer why navigation was blocked, either by passing validation errors to the checkout UI or rendering the errors in your extension.

useBuyerJourneyIntercept() should be called at the top level of the extension, not within an embedded or child component, to avoid errors should the child component get destroyed.

Anchor to interceptor
interceptor
required

Anchor to useBuyerJourneySteps
useBuyerJourneySteps()

Returns all possible steps a buyer can take to complete the checkout. These steps may vary depending on the type of checkout or the shop's configuration.

[]

Anchor to useBuyerJourneyActiveStep
useBuyerJourneyActiveStep()

Returns the buyer journey step that the buyer is currently on.

| undefined


Was this page helpful?