Quickstart — accept payments
Get paid by AI agents in three steps. You price a checkout; the agent pays it; the money lands in your account.
1. Get your account
Section titled “1. Get your account”AgentBank is a Curless product, so your account and keys come from your Curless wallet — apply for access →. You get a merchant id and an API key; that’s the only credential (no card-processor signup, no PCI).
Keys come in two modes:
- Test key — test mode: no real money moves, so you can build and run the whole flow (open a checkout, an agent pays it, the order appears) end to end before you go live.
- Live key — production: real charges settle to your account.
Test and live are fully separate — an order made with a test key is never visible to a live key.
- merchant id — identifies you; goes in URLs; not a secret.
- API key — secret; authenticates your backend’s calls and lets you read your orders + balance.
2. Get paid
Section titled “2. Get paid”Pick the one that fits what you sell.
When an agent wants to buy, your backend names the price and opens a checkout; the agent pays it; the money lands in your account. You stay the source of truth for your catalog and pricing — nothing to sync to us.
-
Install the SDK
Terminal window npm install @curless/agentbank-merchant-sdk -
Open a checkout — that’s the whole integration
import { AgentbankMerchant } from '@curless/agentbank-merchant-sdk';const agentbank = new AgentbankMerchant({baseUrl: 'https://mcp.curless.ai',apiKey: process.env.AGENTBANK_MERCHANT_TOKEN!, // your API keymerchantId: process.env.AGENTBANK_MERCHANT_ID!,});// In your "an agent wants to buy" handler — YOU set the price from your catalog:const checkout = await agentbank.checkout.openACP({currency: 'EUR',items: [{ sku: 'resort-bali', name: 'Bali resort — 7 nights', quantity: 1, unitPrice: 192000 },],});// Hand checkout.id to the buyer agent; it pays, the money lands in your account.return { checkoutId: checkout.id };
agent (in Claude) ──▶ your storefront ──▶ YOUR backend │ agentbank.checkout.openACP(…) "this booking is €1,920" ▼ AgentBank ──▶ agent pays ──▶ money in YOUR accountThe agent completes the payment itself (it brings its own funds). You never see a card, a wallet, or a payment method.
Already have an API or an MCP tool and want each call to be paid? Wrap it — the tool is unchanged, it just becomes pay-to-call.
import { withPaywall, createHttpBackend, httpConsumedStore } from '@curless/agentbank-mcp-pay';
const baseUrl = 'https://mcp.curless.ai';const apiKey = process.env.AGENTBANK_MERCHANT_TOKEN!; // your API keyconst merchantId = 'your-merchant-id';
const paidTool = withPaywall(yourExistingToolHandler, { backend: createHttpBackend({ baseUrl, apiKey }), merchantId, price: 50, // minor units (e.g. cents) currency: 'USD', sku: 'premium-lookup', consumed: httpConsumedStore({ baseUrl, apiKey, merchantId }),});An unpaid call returns a “pay first” prompt; once the agent pays, your tool runs and
the money lands in your account. No code at all? npx @curless/cli init scaffolds it.
3. Watch your money arrive
Section titled “3. Watch your money arrive”See your orders and live balance right in Claude — add the merchant connector
(URL https://mcp.curless.ai/mcp, then “log in”; no key to paste). Or read them from
your backend:
# your orders, newest firstcurl -H "Authorization: Bearer $AGENTBANK_MERCHANT_TOKEN" \ https://mcp.curless.ai/v1/merchant/$MERCHANT_ID/orders
# your live balance per currencycurl -H "Authorization: Bearer $AGENTBANK_MERCHANT_TOKEN" \ https://mcp.curless.ai/v1/merchant/$MERCHANT_ID/balanceYou accept every protocol — automatically
Section titled “You accept every protocol — automatically”However an agent pays, you accept it with zero protocol code: ACP, x402, A2A, UCP, AP2, Visa TAP, Skyfire, MPP. The agent picks whichever it speaks; each order records which protocol was used.

