
Headless Commerce Stack: Patterns and Anti-Patterns
Headless commerce earns its complexity for content-rich D2C, B2B, and subscription — and not for the stores a hosted platform serves better. Patterns and five anti-patterns.
TL;DR: Headless commerce separates the storefront frontend from the commerce backend so a content-rich brand experience and a transactional engine can each be best-in-class instead of fighting inside one template. It is the right choice for content-heavy D2C, B2B with role-based pricing, catalog-plus-lead-gen, and subscription businesses — and the wrong choice for the many small e-commerce businesses that a hosted platform serves better. This guide covers what headless commerce actually means, what a CMS-led e-commerce template includes, four use-case archetypes, payment patterns including regional gateways, and the five anti-patterns that sink a stack.
Why headless commerce in 2026
The trigger for headless commerce is often not a checkout problem. It is a content problem that a commerce platform cannot solve. A consumer brand that built its early store on a hosted theme can reach a point where the storytelling it now depends on — lookbooks, lifestyle editorial, brand pages, campaign microsites — is fighting the theme system rather than living in it. The catalog still works; the brand experience does not, and further theme customization may not close the gap when the theme is organized around products rather than narratives.
B2B has a different but equally structural trigger. Role-based pricing, account-specific catalogs, procurement approval flows, and request-for-quote functionality often do not fit a consumer-oriented e-commerce template, which is often built around an anonymous shopper buying at list price. Bending a consumer platform into a B2B workflow can produce a system that is expensive to maintain and still wrong at the edges.
Subscription and complex billing add a third. Recurring billing, plan changes, proration, dunning, and churn intervention are a composable problem — billing engine plus content surface plus customer state — and a single monolithic platform may not handle them cleanly past a basic tier. And underneath all three is the multi-channel requirement: the same products have to appear on a website, a mobile app, and marketplace feeds from one source, which a headless setup handles by design and which can turn into duplicated work on a coupled platform.
None of this makes hosted commerce platforms inferior. For many small and mid-market stores — a focused catalog, standard checkout, no heavy content layer — a hosted platform is the faster, cheaper, and more reliable answer, and choosing headless there is over-engineering with a maintenance bill attached. Headless commerce earns its complexity only when the content surface or the business model is the part that does not fit, and the rest of this guide is about recognizing which case you are in. Where this sits in the broader CMS category map is covered in the headless CMS and Payload 2026 guide.
What headless commerce actually means
Headless commerce separates the storefront frontend from the commerce backend. The frontend is a standalone application that owns presentation; the backend owns cart, checkout, pricing, inventory, and order state; the two communicate over an API. That single decoupling is the whole idea, and the three ways teams implement it differ in which side leads.
In a CMS-led stack, a content platform such as Payload, Sanity, or Storyblok owns the experience — product detail content, lookbooks, brand pages — and calls a commerce backend for cart and checkout. This is the right lead when the content surface is the differentiator and the catalog is comparatively standard.
In a commerce-led stack, a commerce platform exposes an API and the frontend is a separate app against it: Shopify with Hydrogen, BigCommerce with Catalyst, or an open-source engine like Medusa. This is the right lead when commerce logic — complex catalogs, promotions, fulfillment — is the hard part and content is comparatively light.
In practice many production stacks are hybrid, and the hybrid split is worth stating precisely because getting it wrong is a costly architectural mistake. The CMS holds product detail content — description, imagery, editorial copy, the story. The commerce engine holds the operational truth — inventory, price, tax, order state. The boundary is not negotiable per feature; it is a single rule applied everywhere, and the next sections build on it.
Payload's e-commerce template — what is included
Payload publishes an e-commerce starting point among its official templates, marked as beta (as of Oct 2026), and the value of a template here is not that it is finished but that it encodes the boundary above as default structure rather than something each team rediscovers. The relevant pieces are concrete.
There is a product collection with variants, pricing, inventory fields, and a media gallery — the catalog modeled as structured content, not as theme markup. There is a cart and checkout flow integrated with Stripe, so the payment path is a modern PaymentIntents flow rather than a hand-rolled charge. There is order tracking: Orders and Transactions collections, with an order status of processing, completed, cancelled, or refunded, all in the same admin the content team already uses. And there is membership through Payload's built-in authentication — JWT or session with role-based access — which is what makes B2B account scoping and subscription gating an extension of the auth model rather than a separate system.
The credibility question for any template is whether real businesses run on the platform underneath it. Payload's published case studies include Hello Bello, a direct-to-consumer baby products brand, and divbrands, a headless e-commerce operation — both production consumer businesses rather than demos. The point of naming them is the evaluation discipline, not the logos: a template is worth weight only if production businesses with a shape like yours run on the platform underneath it, and the right move is to read the reference whose model resembles your build and discount anything described only vaguely.
Four use-case archetypes
The stack decisions follow from the archetype, so classify the business before designing the architecture.
| Archetype | Defining requirement | Where the weight sits |
|---|---|---|
| D2C | Brand storytelling and lifestyle content beside the catalog | CMS-led; content surface is the differentiator |
| B2B | Role-based pricing, account managers, procurement, RFQ | Auth and pricing logic; catalog is account-scoped |
| Catalog + lead-gen | Product catalog feeding a sales pipeline, no direct checkout | CMS-led; no payment path at all |
| Subscription | Recurring billing, plan management, churn prevention | Billing engine plus content; checkout is the small part |
The D2C archetype is the canonical headless-commerce case: a consumer brand whose lookbooks, lifestyle pages, and brand story share one content model with the catalog, so the storefront and the editorial surface are not two systems pretending to be one. Payload's Hello Bello case study shows a narrower version of the pattern: one unified approach to content for product pages, and marketing landing pages that marketers produce without developer support, on a solution chosen to power both the brand's website and its app. The B2B archetype inverts the emphasis — the catalog itself is trivial, but who sees which price, which account approves which order, and how a quote becomes an order is the entire problem, and that lives in the auth and pricing layer. Catalog-plus-lead-gen is the archetype teams forget is e-commerce-shaped at all: an industrial manufacturer with a deep product catalog that feeds a sales pipeline has no checkout, so building a payment path for it is pure waste. Subscription is where the checkout is the smallest component and the billing lifecycle is the system; the content surface explains and retains, and the billing engine does the work.
Payment integration patterns
Stripe is the sensible global default, and PaymentIntents — with Subscriptions for recurring and Stripe Tax for jurisdictional tax — covers many common requirements without a custom payment engine. Building your own payment engine is usually the wrong answer; the regulatory, security, and reconciliation surface is large and usually better handled by a provider than by an in-house team.
Stripe alone is not sufficient in several markets, and the gap is operational, not theoretical. In Korea, Stripe now supports local cards and wallets such as Kakao Pay and Naver Pay (Stripe's South Korean payment methods, as of Oct 2026), but bank-transfer flows such as virtual accounts are not among them, which is where a domestic payment gateway — Toss Payments or NICE Pay — comes in. In Japan, Stripe supports konbini payments for one-time purchases but not for automatically charged subscriptions (as of Oct 2026), so a business that needs local methods beyond that may add KOMOJU or Univapay alongside the global default. The pattern that scales is multi-gateway: Stripe as the primary processor, a regional gateway as the secondary, and a single checkout UI that selects the gateway by the buyer's country rather than exposing the routing as a user choice. The complexity to plan for is reconciliation across gateways, not the checkout screen — two processors mean two settlement reports, two refund mechanics, and one order ledger that has to reconcile both.
// Gateway selection by buyer country, single checkout UI
function selectGateway(countryCode: string): PaymentGateway {
switch (countryCode) {
case 'KR': return tossPayments // local card + bank transfer
case 'JP': return komoju // card + konbini
default: return stripe // PaymentIntents global default
}
}Inventory and order state
The decoupling rule from earlier resolves the most consequential design question: where does inventory truth live. It belongs in the commerce backend or a dedicated inventory system — not in the CMS. The CMS holds the product's content; the commerce engine holds availability and price. Putting authoritative stock counts in the content model is the mistake that produces oversells and a content team accidentally responsible for warehouse accuracy.
The order is a state machine, and modeling it explicitly is what keeps refunds and returns from becoming ad hoc:
pending → paid → fulfilled → shipped → delivered
│ │
└──────────→ cancelled returned/refundedThe integration glue is webhooks, and webhook discipline is where stacks quietly fail. The payment provider notifies the commerce backend of a successful charge; the commerce backend updates order state and stock; the CMS is notified only so it can reflect a display-level availability change. Each hop needs idempotency keys and a retry policy, because a webhook can arrive more than once or not arrive at all — Stripe's webhook documentation, for example, says endpoints might occasionally receive the same event more than once and that Stripe might not be able to deliver an event — and either case corrupts inventory if the handler assumes exactly-once delivery. Treating inventory as "real-time enough" without that retry-and-idempotency discipline is one of the anti-patterns the next section names explicitly.
Anti-patterns to avoid
Five patterns sink headless commerce stacks, and each is a specific failure rather than general caution.
The first is forcing a content-heavy brand onto a constrained hosted theme. A brand whose differentiation is storytelling, fighting a theme system to publish a lookbook, has chosen the wrong lead — this is exactly the case headless commerce exists for, and persisting on the theme is the cost without the benefit.
The second is running a high-revenue store on small-business commerce tooling. A site builder's commerce tier — Wix Stores, Squarespace Commerce — is a genuinely good answer for a small catalog, and as catalog size and operational complexity grow, a store can outgrow what that tier was designed for. The anti-pattern is not using the tier; it is staying on it past the scale it was built for.
The third is building your own payment engine instead of using a provider's. Few teams should build payment infrastructure, and teams that try can discover the compliance and reconciliation surface only after they have shipped the easy part.
The fourth is single-platform lock-in for global commerce. Regional payment regulation, tax, and data residency can demand flexibility once the business sells across borders, and a stack with no seam for a regional gateway or an in-country deployment has to be partly rebuilt rather than extended.
The fifth is treating inventory as approximately real-time without webhook and retry discipline. It works in the demo and the low-traffic launch and fails the first time concurrent orders meet a dropped webhook, and the failure is an oversell the customer experiences before the team does.
Implementation roadmap
A realistic schedule for a non-trivial headless commerce build runs in five phases, and stating them in order keeps the order of operations honest.
The first phase is the product collection schema, content modeling, and the image pipeline — the catalog as structured content before any transaction exists. The second phase is the Stripe integration, cart, checkout, and order confirmation: the happy path, end to end, on the global default. The third phase is order management in the admin — fulfillment status, the refund and return workflows — because the operations team needs the back office before launch, not after. The fourth phase is regional gateway integration if the markets require it, multi-currency, and tax through Stripe Tax or an equivalent. The fifth phase is performance, observability, and a launch checklist that explicitly scopes PCI-DSS responsibility and confirms consent handling on the cart, because both are launch blockers discovered late if they are not scheduled early.
The schedule compresses if the business is a catalog-plus-lead-gen archetype with no payment path, and it extends if B2B pricing logic or subscription billing is in scope. The constant across all of them is sequencing: model the catalog as content first, prove the single-gateway happy path next, and treat regional gateways and tax as a deliberate later phase rather than a surprise at launch.
What to decide before you build
- Classify the business against the four archetypes — D2C, B2B, catalog-plus-lead-gen, subscription — before choosing a CMS-led, commerce-led, or hybrid lead.
- Confirm headless is warranted: if the content surface and the business model both fit a hosted platform, that platform is the better answer.
- Fix the decoupling boundary explicitly — content in the CMS, inventory and price in the commerce backend — and apply it everywhere rather than per feature.
- Default to Stripe, and map regional gateway requirements (Korea, Japan) at project kickoff so multi-gateway reconciliation is designed in, not retrofitted.
- Specify webhook idempotency and retry policy as a named work item, not an assumption, before inventory goes live.
- Scope PCI-DSS responsibility and cart-side consent handling into the launch checklist at the start of the schedule.