CommerceForAI

Going live

Test stores are free forever and use Stripe test cards. Real orders need a live store with Stripe connected. Everything you built in test (products, prices, stock, settings, print-on-demand) copies across.

Check what's left

One call lists every step between the store and real orders, each with the exact fix:

const { data } = await commerce.store.setupStatus();
data.ready_for_real_orders; // false
data.next_step;             // { key: "go_live", status: "todo", message, fix }

The MCP tool is setup_status.

Prove the flow first

On a test store, simulateOrder runs a real purchase without a browser: stock is reserved and committed, the order is paid, events and your webhooks fire, and with fulfill: true it's marked shipped. No card is charged, nothing reaches Printify or Printful, nobody is emailed, and it doesn't count toward usage.

const { data } = await commerce.store.simulateOrder({ items: [{ variant_id, quantity: 1 }], fulfill: true });
data.events;                  // ["order.created", "order.paid", "order.fulfilled"]
data.webhooks;                // which of your endpoints were notified
data.emails_that_would_send;  // what a real customer would get

Take it live

Two ways, both copy the test store into a new live store:

  • Dashboard: the Go live button on a test store.
  • From an agent: commerce.store.goLiveLink() (MCP: create_go_live_link) returns a one-time link (7 days). The owner opens it, signs in, and lands on Connect Stripe for the new live store. If the agent built the store with npx commerceforai init, the link also adds it to their account.

Connect Stripe

  • Create a new Stripe account for the store. It's named after the store, including the card statement text.
  • Connect an existing account you already use (live stores). Stripe only lets you rename those yourself; if customers would see another business's name, the dashboard shows what to change and links to that account's settings.
  • Until the store takes its first payment you can Disconnect Stripe and start over.

Shipping at checkout

Set your rates once. Every checkout uses them unless it passes its own shipping_rates:

await commerce.store.configureCheckoutShipping({
  countries: ["US", "CA"],
  rates: [
    { name: "Standard", amount: 500, min_days: 3, max_days: 7 },
    { name: "Express", amount: 1500, min_days: 1, max_days: 2 },
  ],
  free_over: 7500, // free shipping on $75+ (replaces the cheapest rate)
});

Without this, checkouts charge $0 shipping.

Customer emails

Order confirmation, shipped, refunded and return emails work out of the box. With no email provider connected, CommerceForAI sends them under your store's name from orders@commerceforai.com, and replies go to the store owner. Test stores only email their own team, so you can preview them.

// Send from your own domain instead (verify it in Resend first)
await commerce.store.configureEmails({ resend_api_key: process.env.RESEND_API_KEY!, from: "Acme <orders@acme.com>" });

// Or turn the built-in emails off
await commerce.store.update({ builtin_emails: false });

Your team

Invite people from the store's Team section. Members can run the store: products, orders, settings and API keys. Only owners can invite or remove people, change the Stripe account, or delete the store. Invite links last 14 days and only work for the email they were sent to.

Next