Private beta
The commerce layer for your Stripe account.
Products, inventory, checkout, orders, shipping, returns and print-on-demand, on the Stripe account you already have. One API key. Built for you and your AI coding agent.
Free during the beta. Read the quickstart →
import { Commerce } from "commerceforai";
const commerce = new Commerce(); // reads COMMERCEFORAI_API_KEY
const { data, error } = await commerce.checkouts.create({
items: [{ variant_id: "var_tee_m", quantity: 1 }],
success_url: "https://acme.com/thanks",
});
// → redirect to data.url (Stripe Checkout).
// Stock is held now, committed when Stripe confirms payment,
// and the order shows up in commerce.orders.list().Your agent already reaches for Stripe. Then it improvises the rest.
We asked Claude Code to add a store to an app six times. Every run chose Stripe Checkout, which is the right call. Then it hand-wrote everything Stripe doesn't do: an orders.json file, a password-protected orders page, no stock limits, and tax in only half the runs.
CommerceForAI is the part between Stripe and a real business. Keep your Stripe account, your payouts and your customers. Add the rest with one API key.
Claude Code, clean config, the prompt “add a store that sells 3 t-shirts”, November 2026.
Everything after “payment succeeded”.
Inventory that can't oversell
Stock is reserved atomically when checkout starts, committed on payment, and released when a checkout expires or a payment fails.
Orders from verified Stripe events
Exactly once, from signed webhooks, including delayed payment methods and refunds made in the Stripe Dashboard. Never from a success page.
Shipping labels
Live rates and labels through your EasyPost or Shippo account. Buying a label marks the order shipped and emails tracking.
Print-on-demand
Printful and Printify, routed per product. Every order line can carry its own artwork, so custom products just work.
Returns
Request, approve with a prepaid return label, receive. Items are restocked and refunded through Stripe.
Customer emails
Confirmation, shipped, refunded and return emails from your own domain, sent with Resend.
Sell to AI shoppers
Product feeds for ChatGPT and Google, plus a public endpoint other shopping agents can use to build a cart and hand back a checkout link.
Signed webhooks and an event log
Standard Webhooks signatures with retries, or poll a cursor-based event log. Every POST is idempotent.
Built for agents, from the first line.
- Coding agents get it right first time. An llms.txt with working recipes, typed SDK,
{ data, error }results, and safe automatic retries. - Operating agents run the store. An MCP server lets Claude ship orders, restock, buy labels and handle returns, within limits you set: refund caps, label-cost caps, read-only mode.
- Shopping agents can buy. Product feeds and a public catalog and checkout endpoint for AI shopping assistants.
{
"mcpServers": {
"store": {
"command": "npx",
"args": ["-y", "@commerceforai/mcp"],
"env": {
"COMMERCEFORAI_API_KEY": "cfa_live_…",
"COMMERCEFORAI_MAX_REFUND": "5000"
}
}
}
}Custom products without a warehouse.
Attach customer choices and per-order artwork to any line item. Paid orders go to Printful or Printify automatically, split across both when needed, and held for your approval until you trust the flow. When the package ships, the order is fulfilled and the customer gets tracking.
Print-on-demand guide →await commerce.checkouts.create({
items: [{
variant_id: myParksTee.id,
quantity: 1,
properties: { name: "Riley", parks: "Zion, Arches" },
print_files: [{ placement: "front", url: artworkUrl }],
}],
success_url,
});
// Paid → sent to Printify with this customer's artwork.
// Shipped → order fulfilled, tracking emailed.Get early access.
We're onboarding a small group of stores. Tell us what you sell and we'll get you set up.