B2B Starter: Foundation for a modern B2B setup
by Medusa
Let employees purchase on behalf of their company while companies manage users, invite employees, set purchasing rules, and track orders. Ships with pre-built B2B purchase flows out of the box — draft orders, quotes, cart approvals, spending limits, and bulk add-to-cart. Manage large catalogs with millions of SKUs and configure custom price lists and promotions for each B2B client, all within the Medusa Admin.

Medusa B2B Starter
Documentation | Website
Building blocks for digital commerce
Medusa B2B Starter
An official Medusa starter for B2B ecommerce, built with Medusa and Next.js 15. It covers common business-to-business requirements out of the box and is designed to be customized and extended.
Features
- Company management — Create and manage companies, invite employees, and assign roles
- Spending limits — Set per-employee spending limits with configurable reset frequencies
- Approval workflows — Require admin or sales manager approval before orders are placed
- Quote management — Allow customers and merchants to negotiate quotes with messaging
- Order editing — Adjust order items, pricing, and totals after placement
- Bulk add-to-cart — Add multiple products to the cart at once
- Promotions — Manual and automatic promotion support with free shipping progress
- Full ecommerce — Products, collections, cart, checkout, and order history
Getting Started
Deploy with Medusa Cloud
The fastest way to get started is deploying with Medusa Cloud:
- Create a Medusa Cloud account
- Deploy this starter directly from your dashboard
Local Installation
**Prerequisites:
- Node.js v20+
- PostgreSQL v15+
- pnpm v10+
- Clone the repository and install dependencies:
- Set up environment variables for the backend:
- Set the database URL in :
- Run migrations:
- Add admin user:
- Start Medusa backend:
-
Open the admin dashboard at and log in. Retrieve your publishable API key at Settings > Publishable API key.
-
Set up environment variables for the storefront:
- Update with your Medusa publishable API key:
- Start storefront:
The storefront runs on .
You can slo run the following command from the root to start both backend and storefront:
pnpm devConfiguration
Backend ()
| Variable | Description |
|---|---|
| PostgreSQL connection string | |
| Redis connection string (optional) | |
| Secret used to sign JWT tokens | |
| Secret used to sign session cookies |
Storefront ()
| Variable | Description |
|---|---|
| URL of the Medusa backend | |
| Public URL of the storefront | |
| Default region code, for example | |
| Secret for on-demand cache revalidation |
Resources
License
Licensed under the MIT License.