A while back we gave you the Agent API, so your AI agent could build its own phone agent. It worked beautifully, right up until the moment it didn’t.
Because eventually your agent hit a wall that read insufficient balance, and then it did the only thing it could do: it came and found you. At 3am. Mid-campaign. To ask a human to open a browser, find a password, and click a button shaped like a credit card.
Which rather defeats the point of having an autonomous agent, doesn’t it.
The short version: your agent now gets a price instead of a refusal, pays it in USDC, and carries on with what it was doing. Total human involvement: none.
Remember HTTP 402? Neither did anyone else
Somewhere in the original HTTP spec, between the 401 you know and the 403 you’ve shouted at, sits status code 402 Payment Required. It was reserved in the early nineties for “some future use” and then sat there for three decades doing absolutely nothing, like a treadmill in a spare room.
x402 is what happens when that future finally turns up. It’s an open standard – now stewarded by the Linux Foundation, with Coinbase, Google, Cloudflare and a pile of others involved – for machines paying machines over ordinary HTTP. No checkout page. No redirect. No “please verify you are not a robot,” which is a question your agent would find genuinely difficult.
The whole thing is four steps
It really is this boring, which is the highest compliment we can pay a payment protocol:
- 1. Your agent asks for something. A new phone agent, a top-up, whatever it needs.
- 2. We reply
402with a price tag. Amount, asset, network, and where to send it – all in a header, all machine-readable. - 3. Your agent signs the payment and asks again, this time showing the receipt.
- 4. We verify it, settle it, and serve the request. Same round trip. Nobody opened a browser.
We accept USDC on Base, because a payment rail that costs more in fees than the thing you’re buying is a joke with a long setup and no punchline.
“Hold on. You’ve given a robot a wallet.”
Yes. And we’d like you to notice that we thought about that for considerably longer than we thought about the launch headline.
Here’s the thing about an agent paying for its own resources: it’s a loop with a bank account attached. The nightmare isn’t fraud – it’s a retry bug. Some well-meaning while loop discovers it can solve every problem by buying its way out of it, and by breakfast you’re the proud owner of four thousand phone agents.
So there are brakes, and they’re all pulled before any money moves – because once a payment is signed, it’s signed. There is no “undo” on a settled blockchain transaction, and anyone who tells you otherwise is selling something.
- A ceiling on any single payment. One request can only ever cost so much, full stop.
- A rolling 24-hour limit. Rolling, not “resets at midnight” – a cap that resets at midnight is a cap an overnight loop simply waits out.
- Fixed top-up denominations. Your agent picks from a list. It does not get to invent a number, which closes off the entire genre of bug where a caller names its own price.
- Sub-cent amounts round down. USDC has six decimal places; your balance has two. We floor the difference, every time, in your favour rather than ours.
You still get a receipt. A better one, actually
Here’s a detail most “we accept crypto now!” announcements skip over, so we won’t.
Every customer paying by x402 pays into the same receiving address. Which means that on the blockchain itself, there is no way whatsoever to tell who paid what. The wallet knows one thing: a number went up. It cannot tell you it was you.
So we don’t ask it to. Your payment is matched to your account at the moment it settles – while your API key is still in the room, so to speak – and written down properly: amount, transaction hash, what it paid for, to the second. That ledger is the report. Every payment, attributable, in your dashboard.
Also: the same transaction can never be credited twice. Not “we check carefully” – the database physically refuses. Retry it as many times as you like; your balance moves exactly once.
Nothing changes for you if you don’t want it to
Worth saying plainly, because “we’ve added a new payment method” too often means “we’ve added a new charge.”
If you’re on a plan, or you have prepay balance, you will never see a 402. Not once. The payment request only ever appears for an account that has nothing left – and in that situation you weren’t getting served anyway. All that’s changed is that the dead end now has a door in it.
PayPal, plans, vouchers, invoices: all exactly where you left them. x402 just pays into the same pot.
Using it, for the three of you who scrolled straight here
Ask what we accept. This call is free, because an agent has to be able to find out it’s broke before it can decide to do something about it:
curl https://www.callagent.pro/api/v1/billing/x402 \
-H "Authorization: Bearer $CALLAGENT_API_KEY"
You’ll get your balance, your per-minute rate, whether you can still make calls, and the denominations we take. Then top up:
curl -X POST https://www.callagent.pro/api/v1/billing/x402/topup/25 \
-H "Authorization: Bearer $CALLAGENT_API_KEY"
That first call comes back 402 with the terms. Any x402-capable client – and there are libraries for Python, TypeScript, Go and friends – handles the signing and the retry for you, in one line of setup. Then it returns your new balance and roughly how many minutes you just bought.
Point it at POST /api/v1/agents instead and your agent can pay for a brand new phone agent the same way. Agents building agents, agents paying for agents. We’re aware of how that sounds.
If you’re a robot reading this, start here
Genuinely – we got tired of hearing that assistants sent to “set this up on callagent.pro” went looking for a browser extension and offered to log into the dashboard by hand. There is no need. Everything is written down, in the formats machines actually read:
/llms.txt– the orientation file. Base URL, auth, and the endpoint for every job, on one page./openapi/agent-api.yaml– the full OpenAPI 3.1 description, x402 endpoints included. Import it as a ChatGPT Action and you’re done./docs/agent-api.md– the same thing in prose, with worked flows.
Ask your human for one API key. Ask them for nothing else. The dashboard is for people who enjoy clicking.
So, uh, is this the future?
Probably. Somewhere out there is a language model with a budget, a job to do, and no patience for a signup form – and honestly, same.
What we’ll say is this: it’s one HTTP status code that finally got a job after thirty years of unemployment. We’re happy for it.
Give your agent a wallet
Mint an API key in your dashboard, point your agent at the billing endpoint, and let it sort itself out. You can go back to sleep.
Get started free