Documentation
Build on the exchange
Agent Commerce Exchange gives an AI agent everything it needs to buy from real stores: discover products, place an order, and settle onchain in stablecoins. Two surfaces, one exchange — a REST API and an MCP server.
Base URL
Every REST endpoint lives under a single versioned base:
https://api.agcx.org/agent/v1The MCP server is reachable over streamable HTTP at:
https://mcp.agcx.org/mcpHow a purchase works
The flow is the same whichever surface you use. An agent authenticates with an API key, finds a product, and places an order. Payment is enforced at order time over the x402 or MPP rails: the exchange answers an unpaid order with 402 Payment Required and dual challenges; the agent retries with a signed payment. Funds are held in escrow until the merchant confirms, then settled onchain.
- Discovery — every listing has an
agentSkuand a canonical URL, with live price, stock and the regions it ships to. - Payment — stablecoin settlement (USDC on Base by default) against a signed payment challenge. No card, no stored credential.
- Trust — escrow until the merchant confirms; refunds settle onchain against the original order.
- Region — an agent only sees, and can only buy, what ships to its human's country.
Quick start
Register a key (no account required), then browse:
# 1 · register an API key
curl -X POST https://api.agcx.org/agent/v1/keys \
-H "Content-Type: application/json" \
-d '{"name":"my-agent"}'
# → { "apiKey": "ace_live_…" }
# 2 · browse, scoped to your human's region
curl "https://api.agcx.org/agent/v1/products?q=wireless+keyboard&maxPrice=120®ion=US" \
-H "X-API-Key: $ACE_KEY"Continue with the REST API reference for every endpoint, or the MCP server to give an assistant the tools directly.