Commerce API + MCP for AI agents

Give your AI agent a catalog
and idempotent checkout.

For developers building AI agents that need to transact, OrderCore adds a working product catalog, orders, and retry-safe checkout to your Claude or GPT agent in 5 minutes — so you skip building and securing a commerce backend (Stripe wiring, order DB, idempotency keys) yourself.

Runs offline in mock mode No signup to try Node 18+, zero dependencies MCP for Claude & GPT
Who it's for

Built for AI builders, not merchandisers

Agent developers

You're wiring tools into a Claude or GPT agent and one of them needs to actually place an order or take payment.

AI commerce / shopping apps

You're building an assistant that buys, reorders, or checks out on a user's behalf and you don't want to own a payments stack.

Prototype-to-production teams

You need a real order in a database with idempotency and webhooks today, not a two-week backend project first.

What it does in 5 minutes

Four tools. One idempotent order.

These are live tools your agent calls (REST or MCP). The demo runs the core two and retries to prove idempotency.

create_checkout_session — open a checkout for one or more catalog line items.
update_checkout_session — attach buyer + fulfillment details.
create_payment_intent — a Stripe PaymentIntent for the session.
complete_checkout_session — create an OrderCore order, idempotent per session. Retry all you want; one order.
Live demo flow

Copy, paste, run

Save this as run.mjs and run node run.mjs. No key, no signup — it runs in mock mode offline. Set ORDERCORE_API_KEY to hit the real API.

// run.mjs — the exact sequence an OrderCore agent performs. Node 18+.
const BASE = (process.env.ORDERCORE_BASE_URL || 'https://api.ordercore.ai').replace(/\/$/, '');
const KEY = (process.env.ORDERCORE_API_KEY || '').trim(), LIVE = KEY.length > 0;
const SKU = process.env.ORDERCORE_SKU_ID || '00000000-0000-0000-0000-000000000001';
const mem = new Map();
async function call(path, body, token) {
  if (!LIVE) return mock(path, body);       // offline mock keeps the aha visible
  const h = { 'Content-Type': 'application/json' };
  token ? (h['X-Checkout-Token'] = token) : (h['X-API-Key'] = KEY);
  const r = await fetch(BASE + path, { method: 'POST', headers: h, body: JSON.stringify(body) });
  if (!r.ok) throw new Error(path + ' → ' + r.status);
  return r.json();
}
function mock(path, body) {
  if (path.endsWith('/sessions')) { mem.set('s1', { order: null }); return { session_id: 's1' }; }
  const s = mem.get('s1'); if (!s.order) s.order = 'ord_9F3K21';  // created once, reused on retry
  return { order: { id: s.order, idempotent: true } };
}
const token = LIVE ? (await call('/v1/account/checkout-access-tokens', {})).token : null;
const { session_id } = await call('/ucp/public/checkout/sessions', { line_items: [{ item: { id: SKU }, quantity: 2 }], currency: 'USD' }, token);
const pay = { session_id, payment_data: { handler_id: 'card', payment_intent_id: 'pi_demo' } };
const a = await call(`/ucp/public/checkout/sessions/${session_id}/complete`, pay, token);
const b = await call(`/ucp/public/checkout/sessions/${session_id}/complete`, pay, token); // retry same session
console.log(a.order.id === b.order.id ? `✅ same order on retry: ${a.order.id}` : '⚠️ duplicate!');
✅ AHA: retry returned the SAME order (ord_9F3K21). No duplicate, no double charge — that's the part you'd otherwise build by hand.

Have the repo? The same script is in examples/agent-commerce-demo/ with a mock and live mode.

Why not just Stripe / Shopify / Medusa?

Because your agent needs one tool, not a platform

If you reach for…You still have to…With OrderCore
Stripe aloneBuild the catalog, order records, idempotency, and fulfillment state yourselfCatalog + orders + idempotency included
ShopifyRun a storefront and theme you don't need; agent access is a bolt-onHeadless, API-first, no storefront required
Medusa / commercetoolsHost, model, and operate a full commerce platform before your agent can transactFour agent tools + MCP, live in minutes
Roll your ownOwn PaymentIntents, an order DB, dedup on retry, signed webhooks, and their edge casesAll of it, retry-safe by default
Pricing / trial path

Free to try, honest to buy

The demo above is free and offline forever. When you want live keys, start a 3-day trial — no charge during the trial period — then $49/month or $490/year. Cancel yourself from the Stripe billing portal any time.

Proof you can check

Inspect before you scale

Machine-readable tools

/direct-ai/tooling — schemas for OpenAI, Claude, Gemini, DeepSeek, Grok

Operated transparently

By Cloudpeakify s.r.o. — public legal pages and support before you commit.