What is headless commerce? Headless commerce is an e-commerce architecture where the frontend (storefront) is separated from the backend (commerce engine). Instead of a single monolithic platform controlling both what customers see and how orders are processed, the two layers communicate through APIs — giving businesses complete control over the customer experience while keeping the commerce logic flexible and scalable.
"Headless commerce" has become one of those buzzwords that means everything and nothing. Every agency claims to do it. Every platform claims to support it. But most people talking about it can't explain why it actually matters — or when it doesn't.
We offer headless commerce development and build these systems regularly. We've also told clients not to go headless when it wasn't right for them. This guide is the honest explanation we give to every client who asks.
What headless commerce actually means
Traditional e-commerce platforms (Shopify, WooCommerce, Magento) are monolithic — the frontend (what users see) and the backend (inventory, orders, payments) are one system. You get a complete package: admin panel, storefront, checkout, everything bundled together.
Headless commerce separates these two concerns:
- Backend ("body"): Manages products, inventory, orders, payments, customers — exposed via APIs
- Frontend ("head"): A custom-built website or app that consumes those APIs and presents the shopping experience to users
Think of it like this: a monolithic platform is a pre-built house. Headless is buying the land and the plumbing, then designing your own house on top.
The stack we typically use
| Layer | Technology | Role |
|---|---|---|
| Frontend | Next.js | Server-rendered storefront — fast, SEO-friendly, fully custom |
| Commerce engine | Medusa.js | Open-source headless commerce backend — products, orders, payments, inventory |
| Database | PostgreSQL | Reliable, relational, free |
| Search | Meilisearch or Algolia | Fast product search and filtering |
| Payments | Stripe or Razorpay | Payment processing via APIs |
| Hosting | Vercel (frontend) + Railway (backend) | Managed, scalable, affordable |
| Media | Cloudinary or S3 | Product images, assets |
Why headless matters (the real reasons)
1. Performance you can't get any other way
When your frontend is a static or server-rendered Next.js application, pages load in under 1 second — even with thousands of products. This isn't a marginal improvement. It's the difference between:
- Monolithic Shopify: 2.5–4 second average page load
- Headless Next.js: 0.5–1.2 second average page load
Average page load: monolithic Shopify vs headless Next.js
Average page load in seconds, on one scale. Shorter is faster.
- Monolithic Shopify2.5–4 seconds
- Headless Next.js0.5–1.2 seconds
For e-commerce, speed directly correlates with revenue. Every 100ms of improvement increases conversion by roughly 1%. A store loading in 1 second instead of 3 seconds could see a 15–25% conversion rate improvement — that's real money.
2. Complete design freedom
With a monolithic platform, your store looks like every other store on that platform. Themes help, but there are constraints — header structure, product page layout, checkout flow, mobile menu behavior.
With headless, your frontend is a blank canvas. Every pixel, interaction, animation, and user flow is yours to design. This matters when:
- Your brand identity is a competitive advantage
- Your products need custom presentation (configurators, 3D viewers, AR try-on)
- Your checkout needs to be different (subscriptions, bundles, multi-vendor)
- Your content and commerce need to blend seamlessly
3. Flexibility to grow in any direction
Need to add a mobile app? Your API already exists — build a React Native app that consumes the same backend. Need a B2B portal alongside your B2C store? Same backend, different frontend with different logic. Manufacturers use this to stand up an aftermarket parts ecommerce portal with serial lookup and subscriptions on the same backend that runs their main catalog. Need to sell through a kiosk, a chatbot, or a partner's website? APIs support all of these.
With monolithic platforms, each new channel often requires a new integration, a new app, or a workaround. With headless, the backend is channel-agnostic.
3b. When headless helps industrial ecommerce
For industrial and B2B ecommerce, headless is often a fit: large catalogs (thousands of SKUs with faceted search), multiple touchpoints (storefront, portal, punchout, mobile), and custom configurators or engineering tools that need a flexible frontend. Monolithic platforms tend to cap variant options, limit catalog size, and make deep ERP or procurement integration painful. If you're evaluating platforms for manufacturing or industrial distribution, see our best industrial ecommerce platforms guide for a comparison that includes headless and custom options.
B2B E-Commerce Development
Customer-specific pricing, quote workflows, bulk ordering, and ERP integration — built for B2B sales.
4. No vendor lock-in
With headless (especially using open-source like Medusa.js), you own everything:
- The code lives in your repository
- The data lives in your database
- The hosting is on infrastructure you control
- You can switch any layer without rebuilding the others
Want to change your payment provider? Swap the integration. Want to move to a different hosting provider? Migrate the deployment. Want to replace the entire backend? The frontend still works — just point it at the new API.
5. Developer experience and velocity
Modern JavaScript/TypeScript developers can build on headless platforms immediately. The ecosystem is massive — React, Next.js, Node.js have millions of developers worldwide.
Compare this to Shopify's Liquid templating language (niche, limited, frustrating) or Magento's PHP architecture (complex, slow, expensive to develop on). With headless, your talent pool is 10x larger and development speed is 2–5x faster for custom features.
When you should NOT go headless
Honesty time. Headless is not always the answer. Here's when it's the wrong choice:
You have simple needs and limited budget
If you're selling 50–200 products with standard pricing, standard checkout, and standard shipping — Shopify is faster to set up, cheaper to launch, and perfectly adequate. Don't over-engineer.
Headless becomes worthwhile at: 500+ products, or when your business logic deviates significantly from standard e-commerce.
You don't have technical resources
A headless storefront needs a developer to build and maintain. If your team is entirely non-technical and you don't want to work with a development partner on an ongoing basis, a managed platform with a visual theme editor is more practical.
The exception: If you're working with a studio like us for the initial build and only need occasional maintenance, the ongoing technical requirement is minimal (a few hours per month).
Speed to market is your only priority
If you need a store live in 48 hours, Shopify wins. A headless build takes 2–4 weeks minimum, even for a simple store. That's faster than most people expect, but it's not instant.
You want to manage everything in one dashboard
Monolithic platforms give you one admin panel for everything — products, orders, customers, marketing, analytics. With headless, you might have separate tools: a commerce admin (Medusa, Shopify backend), a CMS (Sanity, Strapi), analytics (PostHog, GA), and email (Resend, SendGrid).
If dashboard consolidation matters to your team, factor in the operational complexity of multiple tools.
If you've read this far and you're still not sure which side of the line your store falls on, that's exactly the call we make for clients every week — bring us your product count, revenue, and the constraints you're hitting, and
book a free discovery call →How a headless build actually works
Week 1: Foundation
- Set up the Medusa backend (products, collections, regions, tax, shipping)
- Build the Next.js storefront skeleton (layout, navigation, routing)
- Connect the storefront to the backend APIs
- Deploy staging environments for both
By end of week 1: You can browse products on a live staging URL.
Week 2: Core commerce
- Product pages with images, descriptions, variants
- Cart functionality (add, remove, update quantities)
- Checkout flow (shipping, payment, order confirmation)
- Account management (login, order history, addresses)
By end of week 2: You can complete a purchase end-to-end on staging.
Week 3: Polish and launch
- Design refinement (brand-specific typography, colors, animations)
- SEO optimization (meta tags, structured data, sitemap, performance tuning)
- Product search and filtering
- Email notifications (order confirmation, shipping updates)
- Admin training and content migration
- Production deployment
By end of week 3: Live, production-ready storefront.
What this costs
For a typical headless commerce build:
| Complexity | Products | Cost (fixed) | Timeline |
|---|---|---|---|
| Simple storefront | 50–500 | ₹8L–₹15L | 2–3 weeks |
| Medium (custom features) | 500–5,000 | ₹15L–₹25L | 3–5 weeks |
| Complex (B2B, multi-vendor, etc.) | 5,000+ | ₹25L–₹50L+ | 5–8 weeks |
What a headless store costs, by complexity
Fixed-price build ranges, with product count and timeline under each bar. The complex range has no upper bound.
- Simple storefront₹8L – ₹15L
50–500 products · 2–3 weeks
- Medium (custom features)₹15L – ₹25L
500–5,000 products · 3–5 weeks
- Complex (B2B, multi-vendor, etc.)₹25L – ₹50L+
5,000+ products · 5–8 weeks
Compare this to Shopify Plus (₹1.5L+/month, ₹18L+/year) with less customization and less control.
Custom E-Commerce Development
Headless and custom commerce built for complex catalogs, B2B pricing, and the integrations you actually run.
Why we chose Medusa.js
We've worked with Shopify (headless), Commerce.js, Saleor, and custom backends. We settled on Medusa.js as our primary commerce engine because:
-
Open source. Free, forever. No monthly platform fees. No transaction fees. No "we changed our pricing" surprises.
-
Node.js/TypeScript. Same language as our frontend (Next.js). One tech stack, one team, faster development.
-
Extensible by design. Need custom business logic? Write a plugin or module. No fighting the framework.
-
Built for developers. Clean API design, good documentation, active community. Our developers are productive from day one.
-
Multi-region support. Multiple currencies, tax rules, shipping providers, payment gateways — built into the core, not bolted on.
-
Admin dashboard included. A polished admin panel that non-technical staff can use to manage products, orders, and customers.
We're not dogmatic about this. If a project genuinely needs Shopify as a backend, we'll use it. But for most custom commerce projects, Medusa gives us more control, better performance, and lower long-term costs.
Common concerns (answered honestly)
"Isn't headless more expensive?"
Year 1: Yes, usually. The development investment is ₹8L–₹25L versus ₹50K–₹2L for a Shopify theme.
Year 2+: No. Monthly costs drop dramatically (no platform fees, no transaction fees, minimal app subscriptions). For stores doing ₹15L+/month in revenue, headless is cheaper by Year 2.
"What about SEO?"
Headless is better for SEO. Next.js provides server-side rendering (Google sees fully rendered pages), complete URL control, optimized performance (Core Web Vitals), and structured data that you can customize per page type.
Shopify's SEO is good but limited — fixed URL patterns, limited structured data, less performance control.
"What if something breaks?"
Same as any other software: you monitor it and you fix it. With proper error tracking (Sentry), uptime monitoring (Better Stack), and a maintenance agreement, issues are caught and resolved quickly — often before customers notice.
The advantage of headless: when something breaks, you have complete access to debug and fix it. On a monolithic platform, you're sometimes at the mercy of the platform provider.
"Can non-technical people manage it?"
Yes. The admin panel (Medusa Admin) lets your team manage products, orders, inventory, discounts, and customers without touching code. Content updates can be handled through a CMS like Sanity with a visual editor.
Day-to-day operations don't require a developer.
"What about apps and plugins?"
Headless doesn't have a Shopify-style app store with one-click installs. Instead, functionality is built through:
- APIs: Connect any service via its API (email, reviews, loyalty, search)
- Medusa modules: Server-side extensions for custom business logic
- NPM packages: Thousands of JavaScript libraries for any functionality
The tradeoff: more initial setup, but no app conflicts, no monthly app fees, and no performance degradation from loading 15 third-party scripts.
The bottom line
Go headless when you need performance, customization, ownership, and long-term cost efficiency — and you're willing to invest upfront for those benefits.
Stay monolithic when you need speed to launch, simplicity, and low upfront cost — and your business requirements fit within a standard template.
Most businesses that outgrow Shopify end up going headless eventually. The question isn't whether — it's when.
Considering Headless Commerce?
We build headless storefronts using Next.js and Medusa at fixed prices — from simple product catalogs to complex B2B platforms. Book a free discovery call and we'll tell you honestly whether headless is the right move for your business and what the ROI looks like at your revenue level. If you sell to businesses as well as consumers, see our B2B e-commerce development work.
Ask an AI assistant about this guide: ChatGPT · Claude · Perplexity