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.

Navigation

Checkout presents buyers with an action button at the end of each section. Use this target to add UI before those buttons, giving you a place to collect marketing consent, capture gift notes, or show cart-based messages.

  • Email and SMS marketing opt-in: Collect buyer consent for email or SMS marketing before checkout completes.
  • Gift notes: Let buyers add a personalized gift message to their order.
  • Cart messaging: Show contextual messages based on cart contents, such as a free shipping threshold or a discount code.
  • Reward points: Fetch the buyer's reward points balance from your backend and display how many points the current order will earn.

Use this target to render UI before the action buttons on each checkout section. The examples below demonstrate note and metafield writes, the two most common write operations at this target.

purchase.checkout.actions.render-before

Renders before the action button on each checkout step, including information, shipping, payment, and review. Read access to cart contents, buyer identity, delivery details, and cost is available.

Write operations are available through the Note API and Metafields API. Use cart instructions to check which mutations are available before calling them.

Support
Components (59)
APIs (25)

  • Check note permissions before writing: Use instructions.notes.canUpdateNote before calling applyNoteChange. When the instruction is false, the method returns an error result instead of applying the change.
  • Check metafield write permissions: Use instructions.metafields.canSetCartMetafields before calling applyMetafieldChange. When the instruction is false, the method returns an error result instead of applying the change.
  • Revert UI state on failure: Check the mutation's return value for {type: 'error'} and revert the UI element to its previous state. Leaving a checkbox checked after a failed mutation misleads buyers into thinking their input was saved.
  • Keep extensions concise: Multiple extensions at this target stack vertically before the action button. Keep each extension's output brief to avoid pushing the button below the visible area.

  • Accelerated checkout: This target doesn't render when Shop Pay is the active checkout method. During Apple Pay and Google Pay sessions, the target renders but cart mutation APIs such as applyNoteChange and applyMetafieldChange return error results.
  • Per-section targeting: This target renders before the action button on every checkout section. Conditional rendering based on checkout state is the only way to limit content to a specific section.
  • Action button control: Shopify's checkout action buttons, such as Continue to payment and Pay now, can't be modified by any extension. The labels, disabled states, and appearance are controlled by Shopify.
  • Buyer journey interception: Rendering at this target doesn't intercept or block navigation. To prevent buyers from advancing, use buyerJourney.intercept(), which is available from any checkout extension target.

Was this page helpful?