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.
Anchor to Use casesUse cases
- Display store branding: Show the shop name,
myshopifyDomain, orstorefrontUrlin your extension to reinforce trust and brand consistency. - Route backend requests: Use
shopify.shop.idto 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.
Supported targets
- purchase.
address-autocomplete. format-suggestion - purchase.
address-autocomplete. suggest - purchase.
checkout. actions. render-before - purchase.
checkout. block. render - purchase.
checkout. cart-line-item. render-after - purchase.
checkout. cart-line-list. render-after - purchase.
checkout. chat. render - purchase.
checkout. contact. render-after - purchase.
checkout. delivery-address. render-after - purchase.
checkout. delivery-address. render-before - purchase.
checkout. footer. render-after - purchase.
checkout. header. render-after - purchase.
checkout. payment-method-list. render-after - purchase.
checkout. payment-method-list. render-before - purchase.
checkout. pickup-location-list. render-after - purchase.
checkout. pickup-location-list. render-before - purchase.
checkout. pickup-location-option-item. render-after - purchase.
checkout. pickup-point-list. render-after - purchase.
checkout. pickup-point-list. render-before - purchase.
checkout. reductions. render-after - purchase.
checkout. reductions. render-before - purchase.
checkout. shipping-option-item. details. render - purchase.
checkout. shipping-option-item. render-after - purchase.
checkout. shipping-option-list. render-after - purchase.
checkout. shipping-option-list. render-before - purchase.
thank-you. announcement. render - purchase.
thank-you. block. render - purchase.
thank-you. cart-line-item. render-after - purchase.
thank-you. cart-line-list. render-after - purchase.
thank-you. chat. render - purchase.
thank-you. customer-information. render-after - purchase.
thank-you. footer. render-after - purchase.
thank-you. header. render-after
Supported targets
- purchase.
address-autocomplete. format-suggestion - purchase.
address-autocomplete. suggest - purchase.
checkout. actions. render-before - purchase.
checkout. block. render - purchase.
checkout. cart-line-item. render-after - purchase.
checkout. cart-line-list. render-after - purchase.
checkout. chat. render - purchase.
checkout. contact. render-after - purchase.
checkout. delivery-address. render-after - purchase.
checkout. delivery-address. render-before - purchase.
checkout. footer. render-after - purchase.
checkout. header. render-after - purchase.
checkout. payment-method-list. render-after - purchase.
checkout. payment-method-list. render-before - purchase.
checkout. pickup-location-list. render-after - purchase.
checkout. pickup-location-list. render-before - purchase.
checkout. pickup-location-option-item. render-after - purchase.
checkout. pickup-point-list. render-after - purchase.
checkout. pickup-point-list. render-before - purchase.
checkout. reductions. render-after - purchase.
checkout. reductions. render-before - purchase.
checkout. shipping-option-item. details. render - purchase.
checkout. shipping-option-item. render-after - purchase.
checkout. shipping-option-list. render-after - purchase.
checkout. shipping-option-list. render-before - purchase.
thank-you. announcement. render - purchase.
thank-you. block. render - purchase.
thank-you. cart-line-item. render-after - purchase.
thank-you. cart-line-list. render-after - purchase.
thank-you. chat. render - purchase.
thank-you. customer-information. render-after - purchase.
thank-you. footer. render-after - purchase.
thank-you. header. render-after
Anchor to PropertiesProperties
The shopify global object 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.
- Anchor to shopshopshopShopShoprequiredrequired
The store where the checkout is taking place, including the shop name, storefront URL,
.myshopify.comsubdomain, 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>`.
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.
string - name
The display name of the shop as configured by the merchant in Shopify admin.
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.
string
Anchor to Best practicesBest 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.idis a Shopify Global ID intended for backend use. Display the shop name or domain instead of the ID when building buyer-facing UI.