Use Case
Agent Commerce
Let agents perform purchases using MCP tools with policy enforcement and risk preflight.
Problem
AI agents need safe access to commerce without direct exposure to payment rails.
Architecture
Agent
MCP Tools
risk_preflight
order_create
checkout_initiate
Payment Rail
Implementation
- 1Configure AgentIdentity and AgentPolicy with spend limits.
- 2Call catalog_search and checkout_quote to build a purchase plan.
- 3Run risk_preflight before creating orders.
- 4Initiate checkout and wait for confirmation.
MCP agent flow
const quote = await mcp.checkout_quote({
product_id: "ticket-123",
currency: "COP"
})
const order = await mcp.order_create({
items: [{ product_id: "ticket-123" }],
currency: "COP",
idempotencyKey: "order-123",
reason: "user purchase"
})Production considerations
- Require risk_preflight for every financial side effect.
- Use idempotency keys for all order creation calls.
- Audit tool usage with reason fields and session metadata.
- Restrict privileged tools to admin scopes.
Start building with Orangepill
Get access to programmable financial infrastructure and launch faster.