Headless commerce keeps the backend - inventory, checkout, payment processing, order management - on a platform built and hardened for exactly that job, while the actual storefront is built as a fully custom front end talking to that platform through its API.

const { data } = await storefrontClient.query({
  query: `{ products(first: 10) { edges { node { title, priceRange { minVariantPrice { amount } } } } } }`
});

Why not just customise a theme?

A standard theme's templating language has real limits. For a client needing a genuinely custom product configurator, a non-standard checkout flow, or a storefront built with the same component library as the rest of their web presence, headless removes that ceiling entirely.

The trade-off, honestly

Checkout itself is usually still handled by the platform's own hosted flow for PCI compliance reasons - headless commerce rarely means a fully custom checkout too, and that's usually the right call rather than a limitation worth fighting.

Keep the parts that are genuinely hard to build yourself

PCI-compliant payment processing, inventory sync, tax calculation across jurisdictions, and fraud detection are not things worth reinventing - Shopify (and similar platforms) have spent years and significant engineering effort hardening exactly those pieces. Headless commerce keeps all of that, exposed through an API, while replacing only the customer-facing storefront.

const { data } = await storefront.query(`
  query { products(first: 10) { edges { node { title, priceRange { minVariantPrice { amount } } } } } }
`);

Where the custom storefront actually earns its cost

A themed Shopify storefront is fast to launch but visually constrained by the theme system. A headless storefront costs more up front - a real front-end build, not a theme customization - but removes that ceiling entirely, which matters most for brands where the shopping experience itself is a differentiator, not just a checkout mechanism bolted onto a catalog.