---
title: Shop API
description: >-
  Identify the active shop by name, myshopify.com domain, storefront URL, and ID
  during checkout.
api_version: 2026-07-rc
source_url:
  html: >-
    https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/target-apis/platform-apis/shop-api
  md: >-
    https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/target-apis/platform-apis/shop-api.md
api_name: checkout-ui-extensions
---

# Shop API

The Shop API provides read-only access to the current store's metadata during checkout. Use this API to display the shop name, retrieve the store's `myshopifyDomain` or `storefrontUrl`, and reference the store's ID for backend lookups.

The Shop API is read-only. There are no methods to modify store metadata from within a checkout extension.

The API exposes only `myshopifyDomain` and an optional `storefrontUrl`. Custom or secondary domains aren't available.

### Use cases

* **Display store branding**: Show the shop name, `myshopifyDomain`, or `storefrontUrl` in your extension to reinforce trust and brand consistency.
* **Route backend requests**: Use `shopify.shop.id` to associate checkout events with the correct store in your app's backend.
* **Adapt content by store**: Read shop metadata to customize your extension's behavior for merchants running multiple stores.

### Support Targets (33)

### Supported targets

* [purchase.​address-autocomplete.​format-suggestion](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/checkout/address#format-a-selected-suggestion-)
* [purchase.​address-autocomplete.​suggest](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/checkout/address#suggest-address-completions-)
* [purchase.​checkout.​actions.​render-before](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/checkout/navigation#navigation-target)
* [purchase.​checkout.​block.​render](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/checkout/block#block-target)
* [purchase.​checkout.​cart-line-item.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/checkout/order-summary#line-item-targets)
* [purchase.​checkout.​cart-line-list.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/checkout/order-summary#checkout-cart-line-list-)
* purchase.​checkout.​chat.​render
* [purchase.​checkout.​contact.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/checkout/information#information-target)
* [purchase.​checkout.​delivery-address.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/checkout/shipping#render-after-delivery-address-)
* [purchase.​checkout.​delivery-address.​render-before](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/checkout/shipping#delivery-address-targets)
* [purchase.​checkout.​footer.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/checkout/footer#footer-target)
* [purchase.​checkout.​header.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/checkout/header#header-target)
* [purchase.​checkout.​payment-method-list.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/checkout/payment#render-after-payment-methods-)
* [purchase.​checkout.​payment-method-list.​render-before](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/checkout/payment#payment-targets)
* [purchase.​checkout.​pickup-location-list.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/checkout/local-pickup#render-after-pickup-locations-)
* [purchase.​checkout.​pickup-location-list.​render-before](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/checkout/local-pickup#location-list-targets)
* [purchase.​checkout.​pickup-location-option-item.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/checkout/local-pickup#location-option-item-target)
* [purchase.​checkout.​pickup-point-list.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/checkout/pickup-points#render-after-pickup-points-)
* [purchase.​checkout.​pickup-point-list.​render-before](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/checkout/pickup-points#pickup-points-targets)
* [purchase.​checkout.​reductions.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/checkout/order-summary#checkout-reductions-after-)
* [purchase.​checkout.​reductions.​render-before](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/checkout/order-summary#reductions-targets)
* [purchase.​checkout.​shipping-option-item.​details.​render](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/checkout/shipping#shipping-option-item-targets)
* [purchase.​checkout.​shipping-option-item.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/checkout/shipping#render-after-shipping-option-)
* [purchase.​checkout.​shipping-option-list.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/checkout/shipping#render-after-shipping-options-)
* [purchase.​checkout.​shipping-option-list.​render-before](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/checkout/shipping#shipping-option-list-targets)
* [purchase.​thank-you.​announcement.​render](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/thank-you/announcement#thank-you-announcement-)
* [purchase.​thank-you.​block.​render](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/thank-you/block#block-target)
* [purchase.​thank-you.​cart-line-item.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/thank-you/order-summary#line-item-targets)
* [purchase.​thank-you.​cart-line-list.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/thank-you/order-summary#thank-you-cart-line-list-)
* purchase.​thank-you.​chat.​render
* [purchase.​thank-you.​customer-information.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/thank-you/information#information-target)
* [purchase.​thank-you.​footer.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/thank-you/footer#footer-target)
* [purchase.​thank-you.​header.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc/targets/thank-you/header#header-target)

### Properties

The [`shopify` global object](https://shopify.dev/docs/api/checkout-ui-extensions/2026-07-rc#target-apis-define-what-your-extension-does) provides shop metadata for the current checkout. Access the following properties on `shopify` to read the store's name, ID, `myshopify.com` domain, and storefront URL. Available to `purchase` extension targets.

* **shop**

  **Shop**

  **required**

  The store where the checkout is taking place, including the shop name, storefront URL, `.myshopify.com` subdomain, and a globally-unique ID.

### Shop

Metadata about the merchant's store, including its name, storefront URL, \`.myshopify.com\` subdomain, and a globally-unique ID.

* id

  A globally-unique identifier for the shop in the format \`gid://shopify/Shop/\<id>\`.

  ```ts
  string
  ```

* myshopifyDomain

  The shop's unique \`.myshopify.com\` subdomain, such as \`'example.myshopify.com'\`. This domain is permanent and doesn't change even if the merchant adds a custom domain.

  ```ts
  string
  ```

* name

  The display name of the shop as configured by the merchant in Shopify admin.

  ```ts
  string
  ```

* storefrontUrl

  The primary storefront URL for the shop, such as \`'https://example.myshopify.com'\`. Use this to build links back to the merchant's online store.

  ```ts
  string
  ```

Examples

### Examples

* ####

  ##### Description

  Show the store name to reinforce brand trust during checkout. This example reads \`shopify.shop\` and renders a welcome message with the shop's name.

  ##### jsx

  ```jsx
  import '@shopify/ui-extensions/preact';
  import {render} from 'preact';

  export default function extension() {
    render(<Extension />, document.body);
  }

  function Extension() {
    const shop = shopify.shop;

    return (
      <s-box padding="base">
        <s-stack direction="block" gap="small-200">
          <s-text type="strong">
            Welcome to {shop.name}
          </s-text>
          <s-text color="subdued">
            Thank you for shopping with us.
          </s-text>
        </s-stack>
      </s-box>
    );
  }
  ```

* ####

  ##### Description

  Send the shop ID to your application server to associate checkout activity with the correct store. This example reads \`shopify.shop.id\` and posts it to a backend endpoint.

  ##### jsx

  ```jsx
  import '@shopify/ui-extensions/preact';
  import {render} from 'preact';
  import {useState} from 'preact/hooks';

  export default function extension() {
    render(<Extension />, document.body);
  }

  function Extension() {
    const shop = shopify.shop;
    const [status, setStatus] = useState('idle');

    async function syncWithBackend() {
      setStatus('syncing');
      try {
        await fetch(
          'https://my-app.example.com/api/sync',
          {
            method: 'POST',
            headers: {
              'Content-Type': 'application/json',
            },
            body: JSON.stringify({
              shopId: shop.id,
            }),
          },
        );
        setStatus('synced');
      } catch {
        setStatus('error');
      }
    }

    if (status === 'error') {
      return (
        <s-banner tone="critical">
          Sync failed. Please try again.
        </s-banner>
      );
    }

    return (
      <s-button
        disabled={status === 'syncing'}
        onClick={syncWithBackend}
      >
        {status === 'synced'
          ? 'Synced'
          : 'Sync account'}
      </s-button>
    );
  }
  ```

***

## Best practices

* **Cache shop data for the session**: The shop's name, domain, and ID don't change during a checkout session. Read them once and avoid redundant reactive subscriptions.
* **Don't expose the internal shop ID to buyers**: `shopify.shop.id` is a Shopify Global ID intended for backend use. Display the shop name or domain instead of the ID when building buyer-facing UI.

***
