What is x402?
x402 is an open protocol that lets a web service charge for a request inside the request itself. The service answers 402 Payment Required with its price; the client pays, usually in USDC, by signing an authorization, and sends the request again with the payment attached. There is no account, no API key and no subscription: the payment is the credential.
The name comes from the HTTP status code 402 Payment Required, reserved in the HTTP specification since the 1990s and almost never used until now. Coinbase created x402 in 2025. In April 2026 the Linux Foundation announced the x402 Foundation, which now stewards the protocol; its members include Cloudflare, Stripe, Google, Visa, Mastercard, AWS and Circle.
How an x402 payment works
One payment takes five steps:
- The client asks for a resource. An ordinary HTTP request to an API endpoint.
- The service answers
402 Payment Requiredwith its payment requirements: the price, the token, the network, the address to pay and the payment scheme. A service can offer several options. - The client signs an authorization to pay exactly that. For USDC, this is usually an EIP-3009
transferWithAuthorization: a signed message that says “pay this amount to this address before this time”. The client sends no transaction itself and needs no native token for fees. - The client sends the request again, with the signed payment attached.
- The service has the payment verified and settled on the blockchain by a facilitator, then returns the resource.
The whole exchange takes a few seconds, and the price can be a fraction of a cent.
The words to know
- Payment requirements: what the
402response contains, meaning price, asset, network, recipient and scheme. - Scheme: how the price is charged.
exactmeans a fixed price for the request. Other schemes exist or are in progress, such asupto, where the service charges up to a maximum according to usage. - Facilitator: the service that verifies the signed payment and settles it on the blockchain on behalf of the seller. The seller chooses it; the buyer only chooses among the options the seller offers.
- Asset and network: the token and the blockchain the payment is made in, most often USDC on networks such as Base.
Why x402 suits AI agents
An agent cannot fill in a sign-up form, pass a card check or manage a subscription for each supplier it meets. x402 fits the way agents buy:
- The price is in the response. The agent, or its wallet, can read what a request costs before paying, and compare it with a budget.
- Small amounts are practical. Paying a fraction of a cent per search makes sense, where card fees would not.
- No relationship is needed. An agent can pay a service it has never used, once, without anyone in the company creating an account.
- One integration covers many services. A wallet that pays x402 can pay every service that accepts it.
What x402 does not do
x402 defines how a payment is requested and proven. It says nothing about whether a payment should be made. On its own, the protocol has:
- no spending limit: nothing stops a client from paying the same request a thousand times;
- no approval step: there is no moment where a person can say no;
- no list of allowed suppliers: any service that answers
402can be paid; - no budget across services or across agents;
- no protection for the key that signs the payments.
All of this falls to the client’s wallet. For an AI agent, it is the part that matters most: an agent that follows instructions found in a web page can be told to pay the wrong service, and a loop can spend a budget in minutes.
x402 and the Machine Payments Protocol
x402 is not the only HTTP payment protocol for agents. In March 2026, Stripe and Tempo launched the Machine Payments Protocol (MPP).
| x402 | Machine Payments Protocol (MPP) | |
|---|---|---|
| Origin | Created by Coinbase, now the x402 Foundation (Linux Foundation) | Co-authored by Stripe and Tempo |
| Principle | The service answers 402 with payment requirements; the client pays and retries | The service returns a payment challenge; the client presents a payment credential |
| Payment methods | Stablecoins, mostly USDC, on several blockchains | Stablecoins on Tempo and other networks, and cards through Stripe |
| Settlement | Through a facilitator chosen by the seller | Through the rail chosen, for instance to the seller’s Stripe balance |
Both answer the same need: a price an agent can read, and a payment it can make inside an HTTP request. A service can accept both. For the wider picture, from card credentials to mandate protocols, see what agentic payments are.
Paying x402 APIs with Keyban
Keyban’s Agent Wallet pays x402 services for your agents, and adds what the protocol leaves out: a spending policy checked before every payment.
How a payment goes
- The agent gives Keyban the service’s URL.
- Keyban requests the service itself and reads the real price and recipient from the
402response, never from the agent. - Keyban checks the service’s domain and the price against the wallet’s policy: cap per payment, day, week and month budgets, allowed destinations. Above the approval threshold, the payment waits in the Inbox for a person. A refused payment stops here, with a reason, before anything is signed.
- Keyban builds the EIP-3009 authorization. The agent and Keyban sign it together; the agent cannot change the amount, the recipient or the time window.
- The agent sends the request with the payment and gets the result.
The tools the agent uses
Through the Keyban MCP server or CLI:
discover_x402_servicessearches Keyban’s directory of services that accept x402;x402_infochecks what a request would cost, without paying;x402_paymakes the request and pays, within the policy.
What your agents can buy
Web search and research (Perplexity, Exa, Tavily, Brave Search, Firecrawl), contact and company data (People Data Labs, Apollo, Hunter), speech and transcription (ElevenLabs, AssemblyAI), models and images (OpenRouter, fal.ai) and more, each paid per call.
What the wallet pays today
The exact scheme, in USDC, on Base mainnet and XDC mainnet; upto is not supported yet. You fund it with USDC you already hold, or by card from 5 euros on Base.
€1 on us at sign-up, no card needed. Free for three months, then top up in euros by card.
If you sell an API
To accept x402, a service adds a middleware that answers 402 with its payment requirements and hands the signed payment to a facilitator. The x402 Foundation lists the reference implementations and facilitators on x402.org. Agents that use a Keyban wallet can then pay your service, as long as its domain is allowed by their policy.
Questions
What does HTTP 402 mean?
402 Payment Required is an HTTP status code that tells the client the resource is paid. It was reserved in the early HTTP specifications but almost never used, until x402 gave it a standard format: the response carries the price and how to pay.
Is x402 a cryptocurrency?
No. x402 is a protocol, not a token. It moves existing assets, most often the USDC stablecoin, whose value follows the US dollar.
Does the agent need ETH or another token to pay fees?
Not with an EIP-3009 authorization: the agent only signs a message, and the facilitator submits it to the blockchain.
Which blockchains does x402 support?
The protocol works on several networks; the service states which ones it accepts. A Keyban agent wallet pays on Base mainnet and XDC mainnet.
Can an AI agent overspend with x402?
The protocol itself sets no limit. The agent’s wallet must enforce one. With Keyban, every x402 payment is checked against a cap per payment, budgets and allowed destinations before it is signed, and payments above a threshold wait for a person.
What is an x402 facilitator?
A service that verifies a signed x402 payment and settles it on the blockchain for the seller. The seller picks the facilitator; the buyer never has to trust it with funds beyond the amount it signed.
