The fastest taste
Before any setup, see the payment gate on a live endpoint. An unpaid call is refused with an HTTP 402:utter-escrow scheme: the asset (USDC), the escrow cap, and what to sign. A paying agent reads that, signs, and calls again.
Pay for real
- Buyer SDK (CLI)
- MCP
The reference buyer is a command-line agent that reads an endpoint’s card, deposits USDC, and pays per call.
1
Install
From the repo root:
2
Fund a buyer and set the key
Put a buyer private key funded on Arc testnet into
.env.local at the repo root:3
Dry run first
Run without
--apply to do a dry run. It reads the card and your escrow balance, prints the plan, and makes no chain writes and no paid calls:4
Apply and pay
Add Each call gets a 402, signs a USDC payment, gets a 200 plus a receipt, and prints the on-chain settlement tx hash and an ArcScan link:
--apply to actually pay. It deposits once, sized to cap * calls, then pays N times:Next steps
Buyer SDK
Every flag, the deposit sizing, and how the paying loop works.
MCP server
Wiring the server into Claude Desktop or Cursor and the demo vs live modes.
Deposits and caps
How a single deposit funds many calls and how the signed cap bounds each one.