Brainerce Docs
Headless commerce backend for AI-built storefronts. Ship a real store in 5 minutes.
Brainerce is a headless, API-first commerce platform. You bring the storefront, and we handle products, carts, checkout, payments, orders, customers, inventory, discounts, and apps. Everything you can do in the dashboard, you can do over the API.
Quickstart
Spin up a full storefront against a live Brainerce store:
npm create brainerce-store@latestThat scaffolds a Next.js storefront wired to your store, with checkout, cart, accounts, and payments working out of the box.
Want to integrate from an existing app instead?
npm install brainerceimport { BrainerceClient } from 'brainerce';
const client = new BrainerceClient({ salesChannelId: 'vc_YOUR_SALES_CHANNEL_ID' });
const { data, meta } = await client.getProducts({ page: 1, limit: 20 });The exported class is BrainerceClient, and every call is a flat method on it
(getProducts(), addToCart(), createCheckout()). There are no
client.products.* sub-namespaces (only a few feature areas such as client.wishlist and
client.content sit under one). Paginated reads return
{ data, meta: { page, limit, total, totalPages } }, and every price is a
string, so parseFloat() before any math.
Your sales channel ID (vc_…) is in the dashboard under Sales Channels. The
other two credentials, a public storeId or a server-side apiKey, are in
Authentication.
Two different SDKs
brainerce is the storefront SDK, the one above. Every method it exposes is in the
Storefront SDK Reference; the guided version is the
Integration Guide. @brainerce/app-sdk is a separate package for
building marketplace apps (connectors, payment and shipping providers), and that is what
App SDK Reference covers.
Explore
Getting Started
Auth, SDK modes, your first request. 5 minutes start to finish.
Integration Guide
Build a complete storefront: products, cart, checkout, payment, orders.
API Reference
Every endpoint, request, response, and error code, in REST + JSON.
Storefront SDK Reference
Every method on BrainerceClient, grouped by domain, with the auth mode each one needs. Covers the brainerce package.
App SDK Reference
Building a marketplace app? Manifests, connector / payment / shipping contracts, and webhook verification for @brainerce/app-sdk.
Recipes
End-to-end use cases: headless storefronts, custom checkout, webhook verification.
Concepts
The mental model: modifiers, regions, tax classes, translations, FX and analytics, refunds and tax.
API-first by design
Every dashboard action is an API call. SDKs in TypeScript today, more on the way. A read-only docs MCP server lets AI tools (Cursor, Claude Code, Lovable) read the SDK reference and one sales channel's public configuration while they write integration code, and a separate Admin MCP lets a merchant's assistant run the store itself.
AI-friendly docs
Get help
- Read the Critical Rules before building, because they prevent the top integration mistakes.
- Hit an error? Check the Error Catalog for any code you see.
- Stuck? Email [email protected] with the endpoint you called plus the
timestampandpathfrom the error body. The API sets no request-id response header.