

Why an AI agent pays
Agents call paid web services. x402 lets them pay per request, with no account.
Key points
- An AI agent is a program that does tasks for you online.
- x402 turns the unused HTTP 402 code into a way to pay.
- The x402 Foundation runs the standard under the Linux Foundation.
The lesson
An is a program that does tasks for you. It uses an AI model to decide what to do next. To get work done, it calls web services. Think of a weather feed or a search tool.
Some of those services cost money. A person pays the old way. Sign up. Add a card. Buy credits. Keep a secret API key safe.
An agent is a program, not a person. Filling out a form does not fit.
is an open standard that puts the payment inside the web request itself.
- The agent asks for the data.
- The server answers with a price.
- The agent pays and asks again.
- The server sends the data.
No account and no API key. A payment for each request, even a tiny one.
The name comes from the web's own code, HTTP 402: "Payment Required".
HTTP answers every request with a status code.
200means OK.404means not found. RFC 9110, the HTTP standard, says only this about402: it "is reserved for future use."gives
402a job. A server that wants payment answers402with aPAYMENT-REQUIREDheader. The header lists the prices and ways to pay it accepts. The client pays and retries. The full handshake is in the next lesson.x402 is not tied to one chain. The x402 site says it works on EVM chains, Solana and more. A stablecoin payment is the main use. The XRP Ledger is one of the supported chains.
Who runs it:
- Coinbase gave the x402 protocol to the Linux Foundation.
- The Linux Foundation launched the x402 Foundation on July 14, 2026, with open governance.
- It had 40 member groups by then. Ripple and t54 labs are among them.
x402 charges no protocol fee. The payer still pays the chain's own network fee. On the XRP Ledger that is the transaction cost, which the ledger burns.

