What is x402? It is an open payment standard that lets an app or AI agent pay for an API or web page inside the web request itself. The server replies 402 Payment Required with a price, the agent signs a USDC payment, and the data comes back. No account or API key.
Last updated December 3, 2026. Every fact below was checked today against the official x402 documentation and the Coinbase, Cloudflare and Solana developer docs listed under Sources. x402 is changing fast, so check again before you build on it. This article is for education only and is not financial advice.
What is x402, in plain English?
x402 is a set of rules that lets any website or API charge for access directly over HTTP, the protocol your browser already uses, “without accounts, sessions, or credential management” (x402 docs). It is free to use under the Apache-2.0 open-source license, and the code is public on GitHub.
Payments usually move in USDC, a dollar stablecoin issued by Circle. If you are new to stablecoins, our side-by-side look at USDC vs USDT explains what backs each coin and who can freeze it. The standard was created by the Coinbase Developer Platform team and launched in May 2025, according to x402’s own V2 announcement.
Where the name comes from
Every web response carries a status code, like 404 Not Found. Code 402 means Payment Required, and the HTTP standard has listed it as “reserved for future use” for decades (RFC 7231). x402 finally gives that code a job: it tells the client that payment is required, how much, in which token and to which address (x402 docs: HTTP 402).
Why AI agents need a new way to pay
Using a paid API usually means creating an account, adding a card and copying an API key into your software. That is awkward for an AI agent that finds a useful data source halfway through a task. Cloudflare’s docs note that traditional onboarding requires all three before an agent can pay (Cloudflare).
With x402, the agent needs only a crypto wallet. It can pay for one request, get its answer and move on; the x402 FAQ’s pricing example is $0.001 per request. Listed uses include pay-per-call APIs, paywalls for articles and tools sold per call.
How x402 works in 5 steps
Here is the full loop, using version 2 header names:
- The agent asks. It sends a normal web request, such as GET /weather, to a paid API.
- The server names its price. It answers 402 Payment Required with a PAYMENT-REQUIRED header that lists the price, the accepted token, the network and the seller’s wallet address.
- The agent signs a payment. Its wallet signs a payment payload for that amount, and the agent sends the same request again with a PAYMENT-SIGNATURE header.
- The payment is checked and settled. The server verifies the signature and settles the payment onchain, either by itself or through a facilitator’s /verify and /settle services.
- The data comes back. The server returns the resource with a PAYMENT-RESPONSE header confirming settlement.

Because the buyer signs every payment, a middleman cannot quietly change it. The x402 FAQ says a facilitator that tampered with a transaction would fail the signature checks and could not settle it (x402 FAQ). It also says payments settle in about one second.
What a facilitator does
A facilitator is an optional service that handles the blockchain work for the seller. The x402 docs say it does not hold funds or act as a custodian; it verifies signed payments and submits them onchain (x402 docs: Facilitator). Anyone can run one. Coinbase’s CDP Facilitator, which adds sanctions screening, is free for the first 1,000 onchain transactions each month, then $0.001 per transaction, and Coinbase says it has processed more than 100 million transactions (Coinbase docs).
x402 V1 vs V2: what changed
x402 V2 was announced on December 11, 2025 (x402.org). It moved all payment data into HTTP headers and added plug-in “extensions.” The migration guide lists the main differences (migration guide):
| V1 | V2 | |
|---|---|---|
| Header the client pays with | X-PAYMENT | PAYMENT-SIGNATURE |
| Settlement header from the server | X-PAYMENT-RESPONSE | PAYMENT-RESPONSE |
| Payment request from the server | In the response body | PAYMENT-REQUIRED header |
| Network names | Plain strings such as base-sepolia | CAIP-2 IDs such as eip155:84532 |
| Version field | x402Version: 1 | x402Version: 2 |
The reference SDKs still accept V1, but Solana’s guide says new integrations should not use V1 fields.
x402 vs API keys vs card checkout
| x402 | API keys and subscriptions | Card checkout | |
|---|---|---|---|
| Sign-up needed | None; a wallet is enough | Account, payment method and API key | Card form for each purchase or a saved card |
| Who can pay | People, apps and AI agents with a wallet | Whoever set up the account | Mainly people |
| How you pay | Per request, in stablecoins such as USDC | Monthly plan, prepaid credits or usage bill | Per purchase, in regular money |
| Undoing a payment | Final once settled; the seller can send a refund | Depends on the provider | Card refunds and disputes |

In short, x402 suits small, automatic payments between pieces of software, not a family shopping online with a credit card.
Which networks, coins and payment types work?
At the protocol level x402 works with any EVM chain plus Solana, Stellar, Aptos, Sui and others (x402 docs: Networks). In practice, the FAQ’s main table lists Base and Solana mainnets, and Coinbase’s facilitator also covers Polygon, Arbitrum, Monad and World.
The standard also offers several payment schemes (x402 docs: Schemes):
- exact: a fixed price per request, the most common choice.
- upto: the buyer approves a maximum and pays only for actual usage, such as AI tokens used.
- batch-settlement: the buyer deposits once into an onchain escrow contract (see how smart contracts work), then pays per request with off-chain vouchers that are settled in batches.
- auth-capture: funds are held in escrow and then captured, voided or refunded after the service is delivered.
x402 does not natively cash out to a bank, though the FAQ says gateways can add that step.
Who is behind x402?
Coinbase contributed x402 to the Linux Foundation, which announced the operational launch of the x402 Foundation on July 14, 2026. Premier members include Amazon Web Services, American Express, Circle, Cloudflare, Google, Mastercard, Shopify, Stripe and Visa (Linux Foundation announcement). On October 1, 2026, payments veteran Michael Hursta was named executive director of a foundation with more than 50 members (x402.org).
Cloudflare’s Agents SDK can charge for HTTP content and AI tools with x402, and its client can ask a human to approve payments (Cloudflare docs). Solana publishes its own x402 V2 guide (Solana docs).
Costs and risks to know
- Fees: the standard has “0 fees built in,” but network costs and any facilitator fees still apply.
- Payments are final: an exact payment cannot be pulled back. Refunds depend on the seller.
- Runaway spending: an agent with a funded wallet can spend it. Solana’s guide says production agents should get per-payment and total spending limits, not a raw private key.
- Wrong network: testnets use test money; real payments need real USDC on the right mainnet.
- Fake “x402 tokens”: x402 is a standard, not a coin. Treat any token sold under the name with suspicion.
- Rules: USDC is a payment stablecoin, so the US GENIUS Act, which takes effect January 18, 2027 (OCC), applies to its issuer. Our plain-English guide to the GENIUS Act explains what it means for holders.
How to try x402 or fund an agent wallet
Disclosure: Some links in this article are, or may become, affiliate links. If you sign up or buy through them, Cryptolix may earn a commission at no extra cost to you. This never changes what we recommend. See our Affiliate Disclosure. This article is for education only and is not financial advice.
If you build software, the Coinbase Developer Platform x402 docs have quickstarts for buyers and sellers, and the official x402 libraries come in TypeScript, Python and Go. Start on a testnet such as Base Sepolia or Solana Devnet with free test USDC before any real money moves.
To give an agent real money, buy USDC on a US exchange such as Coinbase or Kraken and send only a small budget to the agent’s wallet. Keep the rest of your savings on a hardware wallet such as Ledger or Trezor. Want to receive USDC from people instead? Our guide on how to accept USDC payments as a merchant compares Stripe, Coinbase Business and Shopify.
Video: x402 explained by its creator
Erik Reppel, the Coinbase engineer who wrote x402, walks through the 402 status code, the payment flow and live demos. It dates from October 2025, before V2 renamed the headers.
Checklist: before you let an agent pay with x402
- ☐ The agent uses its own wallet, separate from my savings.
- ☐ That wallet holds only a small USDC budget I can afford to lose.
- ☐ Per-payment and total spending limits are set in code.
- ☐ I tested the whole flow on a testnet first.
- ☐ The network and token match what the seller asks for.
- ☐ I know which facilitator settles payments and what it charges.
- ☐ I keep records of what the agent paid, and to whom.

This explainer is part of our series on stablecoin payments and AI agents that pay; browse the Crypto Payments and AI Agents category for the rest as it is published.
Frequently asked questions
Is x402 a cryptocurrency or a token?
No. x402 is a payment standard, not a coin, and there is no x402 token to buy. It describes how a server asks for payment over HTTP and how a client pays, usually in a stablecoin such as USDC on Base or Solana.
Do I need Coinbase to use x402?
No. The x402 docs say it is an open Apache-2.0 standard and you don’t need any Coinbase products. Coinbase created it and runs a facilitator, but anyone can run one, and the x402 Foundation at the Linux Foundation now stewards it.
How much does an x402 payment cost?
The standard has no built-in fee. The buyer pays the price the seller sets. Sellers may pay network or facilitator costs: Coinbase’s facilitator is free for the first 1,000 onchain transactions a month, then $0.001 each.
Can an x402 payment be refunded?
A standard exact payment is a push payment and is final once settled, so a refund means the seller sends money back. Newer schemes add options: auth-capture holds funds in escrow, and batch-settlement defines refunds from its escrow channel.
What changed in x402 V2?
V2, announced December 11, 2025, renamed the headers (X-PAYMENT became PAYMENT-SIGNATURE), moved payment data into headers and adopted standard CAIP-2 network IDs, such as eip155:8453 for Base. The reference SDKs stay backward-compatible with V1.
Sources
- x402 docs: Welcome to x402
- x402 docs: FAQ (fees, facilitators, refunds, networks, agents)
- x402 docs: HTTP 402 and V2 payment headers
- x402 docs: Facilitator
- x402 docs: Networks and token support
- x402 docs: Payment schemes
- x402 docs: Migration guide, V1 to V2
- GitHub: x402-foundation/x402 (Apache-2.0)
- x402.org: Introducing x402 V2 (December 11, 2025)
- x402.org: Linux Foundation announces operational launch of x402 Foundation (July 14, 2026)
- x402.org: Linux Foundation appoints Michael Hursta as executive director (October 1, 2026)
- Coinbase Developer Platform docs: x402 overview
- Coinbase Developer Platform docs: CDP Facilitator (pricing, networks)
- Cloudflare docs: x402 for Agents
- Cloudflare docs: Agentic payments (x402 and MPP)
- Solana docs: x402 on Solana
- IETF RFC 7231, section 6.5.2: 402 Payment Required
- OCC Bulletin 2026-50: GENIUS Act regulations, final rule
- Coinbase Developer Platform (YouTube): The DEFINITIVE guide to x402 (ft. Erik Reppel), October 2025