Every "headless commerce cost" answer on the internet either names a single number that's wrong for your case, or refuses to name any number at all. Here's the actual shape of the cost, broken into the three buckets that matter, so you can run your own numbers instead of trusting someone else's.
Bucket one: the build
This is the cost everyone quotes, and it's genuinely comparable across approaches: a custom storefront (typically Next.js) talking to a commerce API. Whether that API is Medusa, Shopify's Storefront API, or another headless platform, the storefront engineering effort is nearly identical, same component architecture, same performance work, same checkout flow to build. The variable that actually moves this number is scope (number of page types, how custom the checkout is, integrations with reviews/loyalty/ ERP) not which backend sits behind it.
Bucket two: ongoing platform cost
This is where self-hosted and hosted diverge completely.
| Kryeo | Hosted platform (e.g. Shopify headless) | |
|---|---|---|
| Monthly fee | None, pay for your own hosting (Node service, Postgres, Redis) | Platform subscription, tier-based |
| Transaction fee | None at the platform level | Revenue share and/or payment-processing surcharge on most plans |
| Cost scaling | Roughly flat, hosting cost barely moves with order volume | Scales directly with GMV |
| Who absorbs growth | You keep the margin as volume grows | Platform's share grows in absolute terms with you |
Bucket three: the retainer nobody quotes up front
This is the bucket that actually determines whether self-hosting saved money. A self-hosted backend needs someone to patch dependencies, monitor the worker queue, respond to an outage, and build new commerce logic as the business changes. That's an ongoing engineering cost, either a retainer with an agency, an in-house hire, or (the risky option) nobody, which works fine until it doesn't. Skip this bucket in your estimate and you'll compare a hosted platform's visible monthly fee against a self-hosted deployment that looks free, right up until something breaks with no one on call.
Trying to budget a headless build?
Send us your current order volume and growth plan. We'll run the actual crossover math for your numbers, not a generic rule of thumb.
Get a real estimate →Putting it together
Low volume, unpredictable growth, no interest in owning infrastructure: a hosted platform's fees are a reasonable price for not thinking about hosting. Meaningful and growing volume, a team willing to budget an ongoing retainer: self-hosting on something like Medusa usually wins, and the margin it returns compounds as you scale, because your cost stays roughly fixed while a percentage-of-revenue fee doesn't. For the fuller trade-off between the two models, see Medusa vs. Shopify for headless commerce. We scope this cost math explicitly during discovery on every Medusa development engagement, before any commitment.