Agent budget#
Give your agent a budget, and it can buy any x402 resource with one call.
POST https://api.checkout402.com/v1/spending-wallets/base/pay
Authorization: Bearer c402_live_…
{"url": "https://any-site.example/x402-resource"}
The answer is the resource:
{"paid": true, "url": "…", "goods": {"…": "what the URL returned"},
"receipt": {"tx_hash": "0x…", "amount_usd": "0.25"}}
Over MCP the same call is pay_x402(url). No ceiling to compute, no chain
to pick, no address to hold. The limits you set on the dashboard bound every
call, and the wallet's key never leaves us.
What a budget is#
A small float of USDC that checkout402 holds the key to, so your agent can pay an x402 challenge without holding crypto. It is the opposite of a payout wallet: a payout wallet is where you get paid and we never see its key; a budget is what your agent pays with and we sign for it. It is bounded on purpose:
- Two budgets, one on Base and one on Solana, completely separate: pick
either at the top of the section. Agents pick the same way, with
chainon every tool and endpoint. - A float, not a balance. Fund it with what your agent will spend soon.
- Two limits you set: the most one purchase may cost and the most per day.
- No withdrawal button and no withdrawal flow. The money leaves when you reveal the key and move it yourself, so keep the float small.
The four steps#
The dashboard section Agent budget is a checklist that only reality can tick: created, funded, agent connected, first purchase. Each line flips when the fact behind it becomes true, never when you press something.
1. Create#
One click, for the chain you picked. It starts empty. We hold the key, encrypted; you can reveal it anytime under More.
2. Fund#
Press Add money, choose an amount, and use the door that matches where your wallet is:
- A browser wallet on this desktop: Send from MetaMask. The transfer is filled in; you only confirm.
- A wallet app on your phone: scan the QR from a laptop, or on the phone itself press Open in MetaMask or Open in another wallet.
- An exchange: buy USDC, send it, choose the network Base, paste the address from the page.
Every door carries the token, the chain, the address and the amount. The page reads the chain while the sheet is open and turns into Funded, $5.00 on its own. One rule is always on screen: USDC on Base only; anything else sent to the address is lost.
3. Connect your agent#
One button per client:
- Add to Claude: the connector, approved once. It renews itself.
- Claude Code: one command, with a key created for it on the spot:
claude mcp add --transport http checkout402 https://api.checkout402.com/mcp \
--header "Authorization: Bearer c402_live_…"
- Another agent: the same key and the one request at the top of this page.
The key can spend up to your limits and can never reveal anything. Keys made here need no payout wallet. The checklist ticks Agent connected the first time the key or the connection calls a budget tool.
4. Try it, free#
The page shows one line to paste into your agent:
Buy this for me, up to $0.10: https://api.checkout402.com/c/chk_…/test
That is a rehearsal checkout. Its /test face settles with a synthetic
receipt and no funds, and pay_x402 accepts it from an empty budget, so
your agent's first purchase costs nothing and the checklist ticks
First purchase (rehearsal).
Running#
The section then shows what is left, your limits, a Top up button, and Purchases: what was bought, from which site, for how much, and any refusal with its reason in one sentence. Below two purchases' worth of balance, the page says so.
The tools your agent gets#
| Tool | |
|---|---|
pay_x402 |
{url, max_usd?, chain?, params?}. Pays any x402 URL and returns the goods. Your limits are the ceiling; max_usd can only lower it |
spending_budget |
Your limits and what is left today. An agent reads it before promising a purchase |
list_spending_wallets |
The addresses, so an agent can say where to send funds |
spending_wallet_balance |
What the budget holds, read from the chain |
spending_wallet_events |
What happened, newest first: the answer to "what did I spend" |
There is no create, reveal or revoke tool, and there never will be a reveal tool: the credential that spends must not be the credential that takes the money out.
Limits#
Every budget has two limits, set under Limits on the dashboard and read
by everyone: the most one purchase may cost (default $1) and the most per
day (default $10). The pay path's ceiling is the smallest of the agent's
max_usd, the per-purchase limit and what is left of the day. An agent
looping on a paid endpoint is the failure this rail is most likely to
produce; these limits are what stand between a bug and an empty float.
GET /v1/spending-wallets/base/limits
PUT /v1/spending-wallets/base/limits {"per_payment_usd": "2", "per_day_usd": "20"}
Setting them is session-only. An agent can read them and never move them.
What a refusal looks like#
A payment over a limit, over the balance, or over the agent's own ceiling
answers 402 with one sentence naming the bound and the fix, and is
recorded as a refused purchase:
- "over your $1.00 per-purchase limit"
- "daily limit reached: $9.80 spent in the last 24 hours of your $10.00 per-day limit"
- "insufficient balance: this wallet holds $0.25 and the ceiling is $1.00. Send USDC to 0x… on base"
A c402_test_ key cannot spend at all: the money is real and someone else's
endpoint has no rehearsal face. Use a live key.
Getting money out#
Under More, Reveal private key. Import it into MetaMask (Base) or Phantom (Solana) and send the funds wherever you like. That is the only exit. Reveal is session-only: it refuses an API key or an agent connection even when a valid cookie rides along, and no MCP tool exposes it. Every reveal is recorded in Purchases.
Revoke archives the budget: agents can no longer pay from it. It is not a way to move money; reveal first if you have not already.
Who may do what#
| Session (dashboard) | Live key / agent | Test key | |
|---|---|---|---|
| List addresses | yes | yes | yes |
| Check balance | yes | yes | yes |
| Read purchases | yes | yes | yes |
| Read limits | yes | yes | yes |
| Pay an x402 URL | no | yes | no |
| Rehearse on a /test URL | no | yes | yes |
| Create, fund, set limits | yes | no | no |
| Reveal the key | yes | never | no |
| Revoke | yes | no | no |
What is recorded#
Every budget keeps its own stream: created, connected (the first call
from an agent), rehearsed, spent (with the amount and the URL), refused
(with the reason), limits, revealed, flagged (a balance over the line)
and revoked, each with the credential that did it. The dashboard shows it
under Purchases; GET /v1/spending-wallets/{chain}/events and the
spending_wallet_events MCP tool return the same list.
The stream is the budget's own. It is never joined to your payments, receipts or payouts, and no figure anywhere adds the two together.