VOOZH about

URL: https://shopify.dev/docs/api/checkout-ui-extensions/latest

⇱ Checkout UI extensions


Skip to main content

Checkout UI extensions

Extensions add custom UI and logic into any step of the Shopify checkout experience. For example, you can display personalized messages during cart review, integrate custom payment options at checkout, or add a survey to the thank-you page.

By using extension target APIs and web components from Shopify's Polaris design system, you can build performant customizations that look and feel familiar while tailoring the checkout experience to a store's specific needs.

Shopify Plus

Checkout UI extensions for the information, shipping, and payment steps are available only to stores on a Shopify Plus plan.

Shopify Plus:

Checkout UI extensions for the information, shipping, and payment steps are available only to stores on a Shopify Plus plan.

To get started customizing your store's checkout, scaffold an app extension using Shopify CLI.

Scaffolding the extension creates a file framework that includes your extension's TOML configuration file and a templated Checkout.jsx file where you add your extension's code.

TutorialGetting started with checkout UI extensions
Tutorial
Getting started with checkout UI extensions

Anchor to Upgrading your extensionUpgrading your extension

The latest version of checkout UI extensions adds new components and target APIs, and updates how extensions read and write metafields. Check out the migration guide for the steps to upgrade your extension.


Anchor to Building your extensionBuilding your extension

Checkout UI extensions are made up of three interconnected parts: targets that determine where your custom UI appears in the checkout interface, target APIs that provide access to checkout data and functionality, and web components that render UI elements like buttons and menus.

Anchor to Targets: Choose where your custom UI appearsTargets: Choose where your custom UI appears

Targets define where your custom UI appears within Shopify's checkout interface. There are three types of targets:

Target typeDescription
BlockFlexible placement targets that merchants can position using the checkout and accounts editor. Merchants can place block targets in various locations throughout the checkout flow and on the Thank you page.
RunnableTargets that provide data or functionality without rendering UI components. These targets run in response to specific events, such as when a customer types in an address field, and return data like autocomplete suggestions or formatted address information.
StaticTargets that appear at fixed locations in checkout, such as before actions, after contact fields, or after cart line items. These targets render automatically when the checkout page loads and can't be moved or repositioned.
ReferenceExplore all targets
Reference
Explore all targets

Anchor to Target APIs: Define what your extension doesTarget APIs: Define what your extension does

Target APIs provide access to data and functionality within the checkout flow. Use them to add custom logic to your extension.

When your extension runs, Shopify provides a shopify global object that you use to access data and features. Most target APIs are properties on this object. For example, shopify.buyerIdentity gives you information about the buyer who's interacting with the checkout, and shopify.cost provides the cost breakdown for the current checkout.

If your app uses ESLint, update your configuration to include the global shopify object to prevent linting errors.

ReferenceExplore all target APIs
Reference
Explore all target APIs

Anchor to Web components: Design your interfaceWeb components: Design your interface

Web components are the UI building blocks that you use to display data and trigger API functions. These components are native UI elements that follow Shopify's design system and are built with remote-dom, Shopify's library for building cross-platform user interfaces.

The component library includes options like form inputs, buttons, overlays, and feedback indicators. You can use these components individually for simple displays, or combine them with layout primitives like stack, grid, and section to build more complex interfaces.

ReferenceExplore all web components
Reference
Explore all web components

Anchor to Apply changes: Update the cart and checkoutApply changes: Update the cart and checkout

Some target APIs include methods that update the cart and checkout. For example:

Each method returns a promise that resolves after Shopify applies the change and the corresponding API property updates with the new state.

Rate limits may apply

Rate limits may apply to extensions that make too many changes during a checkout. After an extension is rate limited, it can't make further changes during the buyer's session.

Batch multiple changes with Promise.all. Only apply the changes your extension needs.

Rate limits may apply:

Rate limits may apply to extensions that make too many changes during a checkout. After an extension is rate limited, it can't make further changes during the buyer's session.

Batch multiple changes with Promise.all. Only apply the changes your extension needs.

GuidelinesApplying changes to checkout
Guidelines
Applying changes to checkout

You define your extension's configuration in a shopify.extension.toml file. This file contains the extension's name, targeting definitions, API version, and other settings. We recommend that you always set the latest supported api_version in your configuration file.

When you scaffold your extension using Shopify CLI, a shopify.extension.toml file with a default configuration is created for you. As you build your extension, you define the targets you want to use and their corresponding code modules in this file.

Checkout UI extensions use the following configuration properties:

ReferenceConfiguring app extensions
Reference
Configuring app extensions

Anchor to Testing and deploymentTesting and deployment

Shopify CLI provides a set of tools to help you test and deploy your extension.

Info

As of API version 2026-04, you can write unit tests for checkout UI extensions using @shopify/ui-extensions-tester. Check out the example test suite to get started.

Info:

As of API version 2026-04, you can write unit tests for checkout UI extensions using @shopify/ui-extensions-tester. Check out the example test suite to get started.

To run your extension locally during development, start a dev server using Shopify CLI. The dev command creates a preview of your extension on your chosen dev store. If your extension is built on an app with a backend, then this command also serves your backend locally using a Cloudflare tunnel.

The dev server automatically reloads your extension when you make changes to your code, so you can test updates in real-time.

When you're ready to go live, deploy your extension to production using Shopify CLI.

The Shopify CLI deploy command builds your extension bundle and uploads everything to Shopify. If your extension is built on an app with a backend, then you need to deploy your app to a hosting service first. Shopify hosts only your extension's code.

Note

Your compiled UI extension bundle can't exceed 64 KB. Shopify enforces this limit at deployment to ensure fast loading times and optimal performance. Learn how to analyze your bundle size.

Note:

Your compiled UI extension bundle can't exceed 64 KB. Shopify enforces this limit at deployment to ensure fast loading times and optimal performance. Learn how to analyze your bundle size.

TutorialTesting checkout UI extensions
Tutorial
Testing checkout UI extensions
ReferenceDeploy app versions
Reference
Deploy app versions

Polaris reference docs follow Shopify's API versioning policy. Each stable version is supported for a minimum of 12 months. Older versions continue to work, they just won't have dedicated docs on Shopify.dev. Shopify CLI already prevents deploys targeting API versions older than 12 months, so we recommend keeping your extensions on a supported version.


Checkout UI extensions are a safe and secure way to customize the appearance and functionality of checkout without compromising the security of customer data.

  • They run in an isolated sandbox, separate from the checkout page and other UI extensions.
  • They don't have access to sensitive payment information or the checkout page itself (HTML or other assets).
  • They are limited to specific UI components and APIs that are exposed by the platform.
  • They have limited access to global web APIs.
  • Apps that wish to access protected customer data must submit an application and are subject to strict security guidelines and review processes by Shopify.

To handle errors in your extension, add an unhandledrejection listener for promise rejections or an error listener for other exceptions like Javascript runtime errors or failures to load a resource.

You can also use third party error-reporting libraries. However, these libraries might require extra configuration because UI extensions run inside of a Web Worker which doesn't have access to window or the DOM. You'll typically need to disable default integrations and manually attach error listeners to self.

The third-party tool example shown uses Sentry. To install and initialize this tool, follow their Browser JavaScript guide. We recommend disabling the default integrations to be sure the tool will run within a Web Worker. You'll need to add event listeners manually.

Note

You must request network access to transmit errors to a third party service.

Note:

You must request network access to transmit errors to a third party service.


Anchor to Tutorials and resourcesTutorials and resources

Deepen your understanding of checkout UI extensions with these tutorials and community resources.

TutorialCustomizing Shopify checkout
Tutorial
Customizing Shopify checkout
TutorialStart building for checkout
Tutorial
Start building for checkout
TutorialDisplay custom data at checkout
Tutorial
Display custom data at checkout
TutorialCustomize the checkout header
Tutorial
Customize the checkout header

GuidelinesApp design guidelines
Guidelines
App design guidelines

ReferenceDeveloper changelog
Reference
Developer changelog
CommunityDeveloper community
Community
Developer community

Was this page helpful?