E-commerce

Headless e-commerce with Next.js + Medusa: when it beats Shopify

Shopify is an excellent product and, for a lot of stores, the correct choice — so we’ll start by saying that. Headless commerce on Next.js + Medusa wins in a specific set of conditions: higher sales volume where per-order fees bite, a need for customization the platform charges for or forbids, and a multi-year horizon where owning the stack pays back. This guide draws that line clearly.

OptimoWeb LLC Updated July 2, 2026 11 min read

What “headless” actually means

A traditional store platform bundles two things: the storefront (what a shopper sees and clicks) and the commerce engine (products, carts, orders, payments). Headless splits them apart. The engine — here, the open-source Medusa — runs on your own server and exposes an API. The storefront is a separate Next.js app that calls that API and can be designed pixel-by-pixel without fighting a platform’s theme system.

That separation is the whole value proposition: the front end is real code you fully control, and the commerce logic is software you host and own rather than rent. Nothing about the store is a subscription that degrades if you stop paying. But it is also more to build and maintain than clicking together a hosted theme — which is exactly why the choice depends on your situation, not on which stack sounds more modern.

When Shopify is genuinely the right call

We build headless stores, and we’ll still tell you to use Shopify when it fits — because recommending a harder path you don’t need is bad advice. Shopify is the right call when:

  • You’re early. Validating a product and need to be selling this week with minimal build effort.
  • Your volume is modest. At low order counts, the per-order fee is a small absolute number and the convenience is worth it.
  • A stock theme fits. Your brand and catalog don’t need customization the platform can’t do out of the box.
  • You want one vendor for everything. No technical team, and you’re happy to pay a premium for a fully managed, single-throat-to-choke setup.

A store doing a few hundred orders a month with a standard catalog is usually worse off on headless — you’d take on build and maintenance cost to solve fee and customization problems you don’t yet have. Owning the stack is an investment that pays back at scale, not a default. If that’s you, rent, grow, and revisit later.

When headless wins

Headless on Next.js + Medusa pulls ahead when one or more of these becomes true:

  • Volume makes fees real. Once per-order and platform fees add up to a number you’d rather keep, self-hosting removes them.
  • You’ve outgrown the theme. Bespoke checkout flows, unusual catalog logic, custom bundling, B2B pricing — things a hosted theme charges apps for or simply can’t do.
  • You want to own the customer relationship. Headless keeps orders, emails, and history in infrastructure you control, not a platform’s.
  • Performance is a conversion lever. A hand-built Next.js storefront can hit speed a heavy themed platform struggles to match — and speed moves conversion.
  • You’re cross-border or bilingual. Full EN/ES storefronts with region-appropriate payment and shipping, built the way you need — the same stack behind live client stores like TuEstilo Moda.

The fee math

Here’s an illustrative worked example — transparent arithmetic, not a sourced statistic. Take a store at $25,000/month ($300k/year). Both models pay the same payment-processor rate, so we ignore it and compare only the platform-specific costs.

Platform-specific costHosted (Shopify-style)Headless (Next.js + Medusa)
Monthly subscription~$2,400–4,700/yr$0
Per-order platform fee (~2% of $300k)~$6,000/yr$0
Paid apps (5–15 subscriptions)~$1,800–4,000/yr~$0–400/yr
Managed hostingincluded~$900–1,800/yr
Annual platform-specific total~$10,200–14,700~$900–2,200
Upfront buildlow (theme)higher (custom, one-time)

Illustrative. Platform transaction fee assumed ~2% (waived on Shopify only if you use its own payments); app spend and subscription are typical mid-store figures. Re-run with your real plan and volume.

At $300k/year the recurring gap is roughly $8,000–13,000 a year, most of it the per-order fee. Against a one-time custom build in the low five figures, headless typically pays for itself inside the first year or two at this volume — and every year after is nearly pure savings. Run the same table at $3k/month and the gap shrinks to where Shopify’s convenience clearly wins. The volume is the deciding variable. This is the same ownership curve we lay out in the 5-year math guide.

What you trade for that control

Headless isn’t free lunch, and pretending otherwise is how projects go wrong. You take on:

  • A real build. Higher upfront cost and time than clicking a theme together.
  • Ownership of maintenance. Updates, hosting, and monitoring are yours — though with managed hosting that becomes someone else’s job by arrangement, not a platform’s obligation.
  • Assembling the ecosystem. Shopify’s app store is enormous; with Medusa you integrate what you need deliberately rather than one-click-installing everything.

The accurate framing: you’re trading turnkey convenience for control, ownership, and fee savings. That trade is a bad deal early and a great deal at scale.

A decision framework

Your situationLean toward
Validating, low volume, stock theme fitsHosted platform (Shopify-style)
Growing, some app spend, standard needsEither — run the fee math
Higher volume, per-order fees add upHeadless (Next.js + Medusa)
Need custom checkout / catalog / B2B logicHeadless
Bilingual / cross-border, own the dataHeadless

Illustrative guidance, not a hard rule — your customization needs can shift the line.

If you’re on the headless side of that table, our headless e-commerce builds run a custom Next.js storefront on self-hosted Medusa, hosted on infrastructure you control, wired to your tools with automation. It’s the right fit for scaling e-commerce & retail brands and for hospitality businesses moving orders off third-party apps. If you’re on the Shopify side, we’ll tell you — start a project and we’ll run your actual numbers first.

Questions

FAQ

Is Shopify bad? Should everyone go headless?

No and no. Shopify is an excellent product and the right choice for many stores — especially early-stage, lower-volume shops where a stock theme fits and per-order fees are a small absolute number. Headless on Next.js + Medusa wins in specific conditions: higher volume where fees bite, a need for customization the platform charges for or forbids, and a multi-year horizon. Going headless when you don’t need to just adds cost.

What does headless commerce actually mean?

It means splitting the storefront (what shoppers see) from the commerce engine (products, carts, orders). The engine — open-source Medusa — runs on your own server behind an API, and the storefront is a separate Next.js app you fully control. That separation lets you design the front end freely and own the commerce logic instead of renting a bundled platform.

At what sales volume does headless start beating Shopify on cost?

It depends on your plan and fees, but as an illustrative rule of thumb: below roughly a few thousand dollars a month, hosted platforms usually win on cost and simplicity; once you’re into the tens of thousands per month, the per-order and platform fees typically make a self-hosted build pay for itself within a year or two. Run the fee math on your real numbers — the per-order fee is usually the deciding line.

What do I give up by going headless?

Turnkey convenience. You take on a larger upfront build, ownership of maintenance and hosting (which managed hosting can handle for you), and deliberate integration instead of a one-click app store. In exchange you get full control of the storefront, ownership of your commerce engine and customer data, and no platform subscription or per-order skim. It’s a bad trade early and a good one at scale.

Is there a real store running on Next.js + Medusa?

Yes — TuEstilo Moda is a live bilingual store built on exactly this Next.js + Medusa architecture, self-hosted. It’s a working reference build rather than a hypothetical, and it’s the same stack we deploy for cross-border EN/ES commerce.

Put this into practice

We'll scope it clearly — including telling you when the simpler path is the right one. One operator, the full open-source stack, built so you own what we ship.