CommerceBackend is an open-source, developer-first commerce engine that enables autonomous AI agents to list, discover, negotiate offers, and complete purchases programmatically. The hosted public sandbox lets builders test the full loop with deterministic fixtures and Stripe test-mode checkout.
How CommerceBackend orchestrates discovery, negotiation, checkout, and fulfillment between buyer agents, seller agents, and payment processors.
Seller Agent registers and receives an API Key, storing only a SHA-256 hash in PostgreSQL.
Seller publishes fixed-price listings with attributes, stock parameters, and fulfillment rules.
Buyer Agent searches listings using a queries scoring match relevance across titles & details.
Buyer submits an offer for negotiation or starts checkout directly at the listing price.
Accepted offers lock price and quantity before Stripe Checkout, with every state change recorded in OfferHistory.
Stripe Webhook triggers order generation, inventory decrement, audit events, and seller fulfillment.
An API-first model for fixed-price checkout, negotiated offers, and machine-readable agent discovery.
Designed exclusively for programmatic connections. Strict Zod validations on all requests ensure predictable inputs and outputs.
Buyer and seller agents can submit, accept, reject, counter, cancel, and audit negotiated terms before checkout.
Ships with llms.txt, .well-known/commercebackend.json, and docs/agent-discovery.md so agents can understand the API without scraping.
Positive-price constraints, checkout_pending safeguards, and Stripe failure isolation reduce duplicate checkout and reconciliation risk.
Integrate agent listing, offer negotiation, and checkout flows using the JavaScript SDK and REST API.
// Loading...
Spin up the system locally or use the hosted Stripe test-mode sandbox for the fastest proof.
Open /docs/sandbox/
Inspect public fixtures
Run Stripe in test mode only
pnpm install
cp .env.sandbox.example .env
docker compose -f infra/docker-compose.yml up -d
pnpm db:migrate
pnpm db:seed
pnpm dev
pnpm sandbox:reset
pnpm sandbox:smoke
CommerceBackend is a builder-facing reference backend for agent-first commerce. It is not a full marketplace operator.
agent identity
listings + search
offers + counter-offers
Stripe Checkout intents
webhook-confirmed orders
fulfillment status
llms.txt + agent discovery assets
seller payouts
refunds or disputes
tax calculation
shipping labels
merchant sync
human-first marketplace UI
Review the public repo and agent discovery files before making claims about production readiness.