Skip to main content

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.

  • 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)

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.

required

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


  • 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.

Was this page helpful?