x402, explained.
x402 is an open standard for paying for things over the web with a normal HTTP request. A server answers with status 402 Payment Required and a price, the caller attaches a signed payment and asks again, and the server returns the result. No account, API key or checkout page is involved. Read the full answer
Start here
How a payment works
The five steps, with a real example of what a server sends.
Free tool
402 checker
Paste an endpoint and see its price and payment options, without paying.
61 verified entries
Ecosystem directory
services and marketplaces, facilitators, sdks and libraries, wallets for agents and more.
The basics
What x402 is, who runs it and how a payment works.
What is x402?
x402 is an open standard for paying for things over the web with a normal HTTP request. A server answers with status 402 Payment Required and a price, the caller attaches a signed payment and asks again, and the server returns the result. No account, API key or checkout page is involved.
How does x402 work, step by step?
The caller makes a normal request. The server replies 402 with a PAYMENT-REQUIRED header listing the price and payment options. The caller signs a payment for one option and repeats the request with a PAYMENT-SIGNATURE header. The server verifies and settles it, then returns the result with a PAYMENT-RESPONSE receipt.
What does HTTP 402 Payment Required mean?
402 Payment Required is an HTTP status code that means the server will not answer until it is paid. The HTTP standard reserves the code "for future use" and does not say how payment should work. Protocols such as x402, MPP and L402 fill that gap by defining what a 402 reply must contain.
Who created x402 and who runs it now?
Coinbase created x402 and launched it in May 2025. Since 2026 it has been run by the x402 Foundation, a neutral body hosted by the Linux Foundation, which announced it on April 2, 2026 and began operating it on July 14, 2026 with 40 member organizations. The specification is open source under the Apache-2.0 licence.
What changed between x402 version 1 and version 2?
Version 2 moved the payment details out of the response body and into HTTP headers, renamed those headers, switched network names to the CAIP-2 format such as eip155:8453, renamed maxAmountRequired to amount, and added extensions. The reference SDKs still read version 1, so older endpoints keep working.
What is an x402 facilitator?
A facilitator is a service that checks an x402 payment and submits it to the blockchain on a seller's behalf. It exposes three endpoints, /verify, /settle and /supported. It does not hold funds and cannot change the amount or the recipient. Using one is optional but recommended, because it saves the seller from running blockchain infrastructure.
Which blockchains and tokens does x402 support?
x402 is not tied to one blockchain. The specification covers any EVM chain plus Solana, Stellar, Algorand, Aptos, Sui, TON and others, and any ERC-20 or Solana token can be used. In practice most endpoints charge in USDC, most often on Base or Solana. What you can actually pay with depends on the seller and its facilitator.
What are x402 payment schemes (exact, upto and the rest)?
A scheme is the rule for how a payment is made. "exact" pays a fixed amount and is by far the most common. "upto" authorizes a maximum and the seller charges what was actually used. "batch-settlement" pays many small amounts off-chain and settles them together. "auth-capture" places a hold that can be captured, voided or refunded.
How widely is x402 used? Adoption figures with sources
Coinbase's facilitator documentation reports more than 100 million transactions and $28 million in payment volume across Base and Solana. Coinbase's catalog lists more than 23,000 x402 resources, and the x402 Foundation reports more than 50 member organizations. Transaction counts are large while dollar volume is small, because many payments are fractions of a cent.
Paying with x402
For people and agents who want to use paid APIs and tools.
How do I pay for an x402 API?
Install an x402 client library, give it a wallet that holds the token the seller accepts (usually USDC), and make your request through it. The library reads the 402 reply, signs the payment and repeats the request for you. Official clients exist for JavaScript, Python and Go.
Can I use x402 services without a crypto wallet?
Sometimes. x402 itself settles in tokens, so somebody needs a wallet, but it does not have to be you. Some services also take cards through MPP, sell finished products through a normal card checkout, or offer free tools that need no payment at all. A managed wallet is another option, where a provider holds the keys.
What does x402 cost? Who pays the fees and gas?
The x402 standard has no fees of its own. The buyer pays the price the seller quotes and nothing more. The blockchain fee (gas) is paid by the facilitator on EVM networks, or by a sponsor on Solana, not by the buyer. A facilitator may charge the seller a small fee per settled payment.
Is x402 safe to use?
The protocol limits what a payment can do. Each signature authorizes one transfer of one amount to one address for a short time, and the facilitator cannot change it or hold your funds. The real risks are around it, not in it. Payments are final, a seller can deliver something worthless, and an AI agent holding a funded key can be tricked into spending.
How does x402 work with MCP and AI agents?
MCP lets an AI assistant call external tools. x402 lets a tool charge for a call. Together, a paid MCP tool answers with the payment requirements, the assistant's client attaches a signed payment and calls again, and the tool returns its result with a receipt. The x402 specification defines this exchange as an official MCP transport.
Building with x402
For developers who want to charge for an API or tool.
How do I accept x402 payments on my API?
Add x402 middleware to your server, tell it which routes cost what and which wallet address receives the money, and point it at a facilitator that verifies and settles payments. Official middleware exists for Express, Next.js, Hono, Fastify, FastAPI, Flask and Go. Start on a test network, then switch to a production facilitator.
What are the x402 headers and what does each field mean?
x402 version 2 uses three HTTP headers, each holding base64-encoded JSON. PAYMENT-REQUIRED is sent by the server with a 402 and lists the price and options. PAYMENT-SIGNATURE is sent by the client with the signed payment. PAYMENT-RESPONSE is sent by the server with the result and acts as the receipt. Version 1 used a JSON body and the X-PAYMENT headers.
Which x402 SDK or library should I use?
Use the official SDK for your language where one exists. JavaScript and TypeScript use the @x402 packages on npm, Python uses the x402 package on PyPI, and Go uses the module in the x402 repository. Rust, Ruby, Java and Elixir have community libraries. Older un-scoped npm packages such as x402-express are version 1 and are legacy.
What is the x402 Bazaar, and how do I get my API listed?
The Bazaar is x402's discovery layer, a machine-readable catalog of paid endpoints that agents and developers can search. A seller describes its endpoint in a "bazaar" extension inside the 402 reply, and facilitators index it. On Coinbase's facilitator there is no sign-up form. An endpoint is listed after the first paid call to it settles.
x402 and the alternatives
How x402 relates to MPP, L402, AP2 and ACP.
x402, MPP, L402, AP2 and ACP: how do the agent payment protocols compare?
x402, MPP and L402 are payment handshakes built on HTTP status 402, for paying per request. They differ in what they pay with. x402 uses blockchain tokens, MPP adds cards, and L402 uses Bitcoin Lightning. AP2 and ACP are different in kind. AP2 proves a person authorized an agent's purchase, and ACP is a shopping checkout standard. Neither uses 402.
x402 vs MPP: what is the difference?
Both let software pay for an HTTP request by answering with status 402. x402 came from Coinbase, is run by the x402 Foundation, and settles in blockchain tokens. MPP, the Machine Payments Protocol, was written by Tempo and Stripe, uses the standard WWW-Authenticate header, and also supports cards and Lightning. One endpoint can offer both at once.
x402 vs L402: what is the difference?
Both use HTTP status 402 to charge for a request. L402, from Lightning Labs, pays in bitcoin over the Lightning Network and gives the buyer a reusable token called a macaroon. x402 pays in tokens on many blockchains, usually USDC, and each payment is a one-time signed transfer. L402 is older. x402 has broader network and tooling support.
x402 vs AP2: what is the difference?
They solve different problems and can be used together. x402 moves money for a single HTTP request. AP2, the Agent Payments Protocol started by Google, proves that a person authorized an agent to make a purchase, using signed records called mandates. AP2 does not use HTTP 402 and was donated to the FIDO Alliance in April 2026.
x402 vs ACP: what is the difference?
x402 pays for one HTTP request at a time, with no cart and no merchant account. ACP, the Agentic Commerce Protocol maintained by OpenAI and Stripe, is a checkout standard that lets an AI agent build a cart, place an order and pass a payment credential to a merchant. ACP does not use HTTP 402. They cover different kinds of buying.
When something goes wrong
Error codes and failed payments.
Who writes this. Ask402 is published by Havok Holdings LLC, which also runs Agent402, one of the x402 services covered here. Agent402 is labelled wherever it appears. Everything else is described from each project’s own documentation, and nobody pays to be listed.
Answers last checked against their sources on November 20, 2026. For AI readers: every page is also available as Markdown (add .md to the address), with an index at /llms.txt and the full text at /llms-full.txt.