An ivory sneaker in a coral shoe box on a blue packing table.

· Shopify · 5 min read

Headless Shopify: what you take on

What stays with Shopify and what becomes your job when you leave the theme: tokens, the cart, API versions that expire and the apps you lose.

"Headless" Shopify means keeping Shopify for the catalogue, the stock and the checkout, and building the storefront yourself. It sounds like freedom, and it is. It is also a list of things Shopify used to do for you that are now your job. This article goes through that list using Shopify's own documentation, so you can decide before you start. It is for developers and for shop owners who want to understand what their developer is proposing.

What stays with Shopify

The storefront talks to Shopify through the Storefront API, which is available only in GraphQL. Products, variants, prices and availability come from there. So does the cart, if you want it to. The checkout is not yours to build: your site asks for a cart's checkout URL and sends the customer to Shopify's own checkout, where payment, taxes and shipping are handled.

That last part is the reason headless is reasonable at all. The riskiest page of a shop stays with the party that is best at it.

Two kinds of token

The Storefront API has two kinds of access token, and they are not interchangeable.

  • A public token is meant for a browser or a mobile app. Shopify's documentation describes it as visible to buyers, so having it in client code is by design.
  • A private token is a secret. It belongs on a server and should never be sent to the client.

A site with no server, only static files, can therefore only use the public token. That is fine for reading the catalogue and creating a cart. It does mean every request comes straight from the visitor's browser.

const endpoint = `https://${shopDomain}/api/2026-07/graphql.json`;

async function storefront(query, variables, timeoutMs = 9000) {
  const response = await fetch(endpoint, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "X-Shopify-Storefront-Access-Token": publicToken,
    },
    body: JSON.stringify({ query, variables }),
    signal: AbortSignal.timeout(timeoutMs),
  });
  if (!response.ok) throw new Error(`Storefront API answered ${response.status}`);
  const { data, errors } = await response.json();
  if (errors?.length) throw new Error(errors[0].message);
  return data;
}

The timeout matters more than it looks. Without it, a slow answer from Shopify leaves a product page waiting forever. With it, you can decide what the page shows instead.

What becomes yours

Everything a theme does becomes something you build or connect:

  • The cart. Its interface, its state and when it talks to Shopify. I wrote up two ways to do it on the headless cart page.
  • Product pages and their place in search. Titles, structured data, a sitemap, and pages that exist as HTML before any script runs.
  • Anything that calculates. If your site shows a discount, it has to come out the same as in Shopify's checkout.
  • Apps. Many Shopify apps work by adding themselves to a theme. Without a theme they have nothing to attach to.
  • The default storefront. Shopify still serves one at its own address, so you need to send those visitors to your real domain.
  • Consent and analytics. The theme's built-in handling is gone with the theme.

None of this is hard on its own. Together it is the actual cost of going headless, and it is paid again every time the shop wants a new feature.

Hands folding tissue around a sneaker in a coral shipping box.
Illustration made for this article, not a photograph of a real order.

The version you pin will expire

Shopify releases a new API version every three months, and each stable version is supported for at least twelve months. The version is part of the URL you call, so a headless shop pins one.

What happens when that version is retired is easy to miss. The request does not fail. Shopify answers with the oldest version it still supports. Your code keeps running against an API it was not written for, and you find out when a field has changed. The practical rule: put the version in one place, and put a date in the calendar to raise it.

Traffic and limits

Shopify's documentation says buyer traffic on the Storefront API is not rate-limited, and that capacity for public access scales with the number of buyers, based on their IP address. That works in your favour when requests come from each visitor's browser.

It changes when you put a server in between. Then every request arrives from your server's address, not the buyer's. Shopify's guidance for that case is a private token plus a header that passes on the buyer's IP address. If you move from a static site to a server-rendered one, this is the part to reread.

Do you need a framework?

Not necessarily. Shopify has its own React framework for headless shops, and Next.js is a common choice. Both give you server rendering and caching, and both bring a build pipeline and a server to maintain.

Two shops I built use neither: static pages and plain JavaScript, with one file that talks to Shopify. That works when the catalogue is small and changes rarely. It would not work for thousands of products, or for prices that differ per market, where a server that can cache and personalise earns its keep.

When it is worth it

Headless is worth considering when the storefront itself is the product: a brand where the page has to look and behave in a way a theme will not allow, with a catalogue small enough to hand-build around.

It is the wrong choice when the shop depends on apps for reviews, subscriptions or bundles, when nobody will maintain custom code after launch, or when the real problem is something a good theme already solves. A theme that is boring and finished beats a custom storefront that is beautiful and half maintained.

Sources

All Shopify documentation was consulted on 10 November 2026.