Open Source Headless eCommerce Platform

Open Source Headless eCommerce Platform

Connect any frontend to a complete REST API. Build storefronts, B2B portals, marketplaces, and mobile apps on one commerce backend. No GraphQL lock-in. No platform fees.

Used by over 5K businesses worldwide

Problem statement

Finding a headless ecommerce platform with everything built in isn’t easy

Feature gaps

Most headless ecommerce platforms ship a checkout and stop. You still need to build B2B pricing, marketplace payouts, and multi-store from scratch.

Poor API documentation

Endpoints without OpenAPI specs, no SDK, no code samples. Developers waste weeks reverse-engineering the API before writing a single line of storefront code.

No developer tooling

No CLI to scaffold projects, no starter kits, no AI coding assistance. Getting started means stitching together boilerplate from scratch.

Spree has been built API-first and comes with full service support

Open Source eCommerce API

A production-grade REST API with full OpenAPI 3.0 specs you can import into Postman in seconds. Flat JSON responses, no GraphQL required. Payment Sessions API for Stripe, Adyen, and any PSP. TypeScript SDK with autocomplete and type safety for every endpoint.

eCommerce SDK and Developer Tooling

Official TypeScript SDK and CLI to scaffold new projects in one command. Production-grade Next.js 16 starter with React 19, TypeScript 5, and Tailwind CSS 4. Spree ships AGENTS.md and a dedicated MCP server for documentation, so AI coding assistants like Claude and Cursor build on actual architecture, not hallucinated endpoints.

Agentic Commerce Ready

Spree’s REST APIs are natively compatible with emerging agentic commerce protocols: OpenAI ACP, Google UCP, Anthropic MCP, and Visa TAP. All operate over HTTP/REST, so AI purchasing agents can discover products, manage carts, and complete checkout programmatically. Build AI-powered storefronts or automated procurement on one open-source headless ecommerce platform.

What you get

What you can build with a headless ecommerce platform

Storefronts, B2B portals, marketplaces, mobile apps, and multi-tenant platforms from one commerce backend

Any storefront

Connect Next.js, React, Vue, or any frontend. The REST API handles cart, checkout, product discovery, and account management. OpenAPI 3.0 specs let mobile teams generate Swift or Kotlin clients in minutes.

B2B and marketplace

Wholesale portals with customer-specific pricing, buyer organizations, and approval workflows. Multi-vendor marketplaces with Stripe Connect payouts. All on the same platform.

Open source, self-hosted

BSD 3-Clause license. Deploy on any cloud or on-premises. Audit every line of code. Zero platform fees, zero vendor lock-in.

FREQUENTLY ASKED QUESTIONS

What is a headless ecommerce platform?

A headless ecommerce platform separates the backend (products, orders, payments) from the frontend (what customers see and interact with). The two communicate through APIs, so development teams can build any customer experience using their preferred framework without being locked into the platform’s built-in templates. This architecture gives complete control over performance, design, and multi-channel delivery.

How does a headless ecommerce platform connect to a frontend?

Through REST or GraphQL APIs. The frontend makes API calls to fetch product data, manage carts, and process checkout. Spree Commerce uses a REST API with OpenAPI 3.0 specs and a TypeScript SDK, so frontend teams get type safety and autocomplete in their IDE. Mobile teams can generate Swift or Kotlin clients directly from the OpenAPI spec without writing API integration code manually.

What are the benefits of open source headless ecommerce?

Open source headless ecommerce gives teams three things closed platforms lack: full code visibility for security audits, deployment flexibility across any cloud provider, and zero platform fees on revenue. Spree Commerce ships under BSD 3-Clause, meaning teams can inspect, modify, and deploy the commerce backend without licensing constraints or per-transaction costs that scale with growth.

Which headless ecommerce platform works with Next.js?

Several headless platforms offer Next.js integration, but most require teams to build the storefront from scratch. Spree Commerce ships a production-grade Next.js storefront starter built on Next.js 16, React 19, and TypeScript 5, with server-side rendering and a typed SDK. Teams fork the starter repo and start customizing immediately rather than wiring up API calls from a blank project.

How does headless ecommerce handle payments without vendor lock-in?

Payment provider lock-in happens when your checkout code is tightly coupled to a single PSP. A headless ecommerce platform with a provider-agnostic payment layer avoids this. Spree Commerce uses a Payment Sessions API where checkout code stays the same regardless of whether you process through Stripe, Adyen, or another provider. Swapping PSPs requires configuration changes, not a checkout rewrite.

What is the difference between headless and traditional ecommerce?

Traditional ecommerce platforms bundle the storefront with the backend: you customize within the platform’s theme system. Headless platforms expose commerce functionality through APIs and let you build the frontend independently. The tradeoff is development effort for design freedom. Headless fits teams that need custom storefronts, mobile apps, or multi-channel experiences beyond what a template system supports.

Can a headless ecommerce platform support B2B and B2C?

Yes. A headless backend manages the commerce logic (buyer organizations, approval workflows, price lists, customer segments) while separate frontends serve each audience. Spree Commerce runs B2B and B2C storefronts from a single instance, with buyer-specific pricing and gated catalogs on the B2B side and a consumer storefront on the B2C side, all powered by the same REST API.

Let's use Spree to build exactly what your business needs

facebook