One API for the agent economy
Accept payments from every AI shopping agent — card and stablecoin — through a single integration. Detect agents, route across 7 live protocols, and settle with one flat fee.
AI agents are shopping right now. Is your store ready?
ChatGPT handles ~53M shopping queries daily. Google AI, Claude, Perplexity, Amazon Rufus — all sending autonomous buyers to stores. Merchants who accept agent payments capture this wave first.
Build on Shopfi. Earn on every transaction.
Embed Shopfi's full infrastructure in your platform at 10% below direct rates. The difference is yours to keep or pass on.
Authentication
Base URL your-domain.com/api/v1. All endpoints require a Bearer token. Keys are prefixed sk_live_ (production) or sk_test_ (sandbox). Generate keys in your dashboard.
curl https://your-domain.com/api/v1/detect \
-H "Authorization: Bearer sk_live_••••" \
-H "Content-Type: application/json"Agent discovery manifest
AI agents discover your payment capabilities via the /.well-known/shopfi.json manifest. No auth required.
{
"version": "1.0",
"protocols": {
"acp": { "supported": true, "fee": "1%" },
"x402": { "supported": true, "fee": "1%", "network": "eip155:8453" },
"ap2": { "supported": true, "fee": "1%" },
"mpp": { "supported": true, "fee": "1%" },
"visa_tap": { "supported": true, "fee": "1%" },
"visa_cli": { "supported": true, "fee": "1%" },
"mc_agent_pay": { "supported": true, "fee": "1%" }
}
}7 live payment protocols
Shopfi supports 7 live payment protocols across fiat and crypto rails. Shopfi charges 1% as a flat platform fee on all protocols. Network/processor fees from each protocol's payment provider are separate.
Shopfi's platform fee is separate from network/processor fees. Card protocols carry standard interchange + processor fees. Crypto protocols (x402, MPP) have near-zero underlying costs — Shopfi's 1% is typically the only fee.
Core endpoints
Identify if an incoming request is from an AI shopping agent. Returns protocol, trust score, and agent identity.
{
"headers": {
"user-agent": "ChatGPT-User/1.0",
"x-acp-version": "2026-01-30"
}
}{
"isAgent": true,
"confidence": 90,
"agentId": "chatgpt",
"agentName": "ChatGPT",
"protocol": "ACP",
"rail": "CARD",
"trust": 95
}Create a settled transaction directly. Use when you handle payment collection yourself. 1% platform fee on all rails.
{
"amount": 4999,
"currency": "usd",
"protocol": "CARD",
"agent_id": "chatgpt",
"agent_name": "ChatGPT",
"product": "Merino Sweater",
"order_ref": "ord_abc"
}{
"id": "dGVzdC0xMjM",
"status": "settled",
"amount": 4999,
"fee": 25,
"net": 4974,
"currency": "usd"
}Universal payment endpoint. Returns 402 with USDC payment requirements. Agent retries with X-PAYMENT header after signing.
{
"amount": 2999,
"product": "Widget",
"description": "Widget — 1x",
"wallet_address": "0xABC..."
}// 402 Payment Required
{
"protocol": "x402",
"payment_required": {
"amount": "29.99",
"receiver": "0xABC...",
"network": "eip155:8453",
"asset": "0x833...",
"nonce": "a1b2c3d4e5f6"
}
}Paginated transaction history for your merchant account. Supports offset-based pagination.
?limit=50&offset=0{
"data": [
{ "id": "...", "amount": 4999,
"status": "settled", ... }
],
"total": 234,
"limit": 50,
"offset": 0
}Real-time event delivery
Signed POST on every event. Verify with HMAC-SHA256 using your webhook secret (whsec_ prefix). Configure endpoints in your dashboard.
// Verify signature
const crypto = require('crypto');
const expected = crypto
.createHmac('sha256', webhookSecret)
.update(rawBody)
.digest('hex');
const valid = signature === expected;Status codes
All errors return JSON with an error field. Common status codes:
Ready to accept agent payments?
Generate your API key and go live across every protocol.