Skip to main content

Checkout UI extensions

Use checkout extensions to build custom functionality for merchants in the checkout flow. You can customize the product information, shipping, payment, order summary, and Shop Pay steps.

Shopify Plus

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

Anchor to Scaffolding an extensionScaffolding an extension

Use the Shopify CLI to generate a new extension in the directory of your app.

Make sure you’re using Shopify CLI v3.85.3 or higher. You can check your version by running shopify version.


Anchor to Optional ESLint configurationOptional ESLint configuration

If your app is using ESLint, update your configuration to include the new global shopify object.


When you create a UI extension, the shopify.extension.toml file is generated in your extension directory. Use this file to configure your extension name, extension targets, metafields, capabilities, and settings definition.

Extension targets provide locations where merchants can insert custom content. Static extension targets are tied to core checkout features like contact information, shipping methods, and order summary line items. Block targets can display at any point in the checkout process and will always render regardless of which checkout features are available. An example is a field to capture order notes from the customer.


Checkout will execute the module’s default export so it can render a user interface.

Extension UIs are powered by Remote DOM, a fast and secure environment for custom (non-DOM) UIs.


UI Extensions are scaffolded with Preact by default. This means you can use Preact patterns and principles within your extension.

Since Preact is included as a standard dependency, you have access to all of its features including hooks like useState and useEffect for managing component state and side effects.

You can also use Preact Signals for reactive state management, and take advantage of standard web APIs just like you would in a regular Preact application.


The platform defines a global shopify object that contains all properties and methods available to UI extensions.

These APIs enable UI extensions to get information about the checkout or related objects and to perform actions. For example, you can retrieve what’s in customer carts and offer related products.

APIs with a value property are Preact Signals. Preact will automatically re-render your extension as values change.


Checkout UI extensions declare their interface using Polaris web components. Shopify renders the UI natively, so it’s performant, accessible, and works in all of checkout’s supported browsers.

Checkout components are designed to be flexible, enabling you to layer and mix them to create highly-customized app extensions that feel seamless within the checkout experience. All components inherit a merchant’s brand settings and the CSS cannot be altered or overridden.


Checkout UI extensions are a safe and secure way to customize the appearance and functionality of the checkout page without compromising the security of checkout or 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 proccesses by Shopify.
Constraints

You can’t override the CSS for UI components. The checkout UI will always render the merchant’s own branding.

Checkout UI extensions don’t have access to the real checkout DOM and can’t render arbitrary HTML such as `` elements or <script> tags, etc. They can only render custom HTML elements provided by Shopify.


Find an end-to-end guide to testing your extensions in Testing checkout UI extensions.

If you're encountering errors when you run dev for an app that contains checkout UI extensions, follow this troubleshooting guide.



Was this page helpful?