# Ask402: every x402 answer in one file > 24 plain-English answers about the x402 payment standard, each with its sources. Last checked 2026-11-20. Index: https://www.ask402.ai/llms.txt Ask402 is published by Havok Holdings LLC, which also operates Agent402 (https://agent402.tools), one of the x402 services listed in the directory. Agent402 is labelled wherever it appears. Other projects are described from their own documentation, and nobody pays to be listed. ======================================================================== # 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. ## The short version HTTP has always had a status code for "you need to pay": **402 Payment Required**. For decades nothing used it. x402 gives it a job. A server that charges for something replies to an unpaid request with status 402 and a machine-readable price. The caller signs a payment for that price and sends the same request again with the payment attached. The server checks the payment, settles it, and returns what was asked for. Because the whole exchange happens inside ordinary HTTP, software can do it without a person. That is why x402 is mostly talked about for **AI agents and APIs**: an agent can pay a fraction of a cent for one search, one page render or one model call, with no sign-up. ## Key facts | | | |---|---| | What it is | An open payment standard built on HTTP status 402 | | Created by | Coinbase, launched in May 2025 | | Run by | The x402 Foundation, hosted by the Linux Foundation since 2026 | | Licence | Apache-2.0 | | Current version | Version 2 (version 1 is still supported by the reference SDKs) | | Protocol fees | None. The standard itself charges nothing | | Paid in | Tokens on a blockchain, most often the USDC stablecoin | | Typical price | Fractions of a cent to a few dollars per request | ## What makes it different from an API key - **No account.** The payment is the permission. A caller that has never seen the service before can use it on the first request. - **Pay per call.** There is no subscription or prepaid plan built into the protocol. Each request carries its own payment. - **The price is in the reply.** The 402 response says exactly what is owed, in which token, on which network, and to whom. - **Any HTTP client can learn it.** Paying is a matter of reading one header and adding another. ## What you need to use it To **pay**, you need an x402 client library and a wallet that holds the token the seller asks for. See [how to pay an x402 API](https://www.ask402.ai/x402/how-to-pay-an-x402-api). If you do not want a wallet, see [using x402 services without a crypto wallet](https://www.ask402.ai/x402/use-x402-without-a-crypto-wallet). To **charge**, you add a piece of middleware to your server and choose a facilitator to settle payments for you. See [how to accept x402 payments](https://www.ask402.ai/x402/how-to-accept-x402-payments). To **see one**, paste any paid endpoint into the [402 checker](https://www.ask402.ai/tools/402-checker). It shows the price and payment options without paying anything. ## Where x402 sits among similar standards x402 is not the only way for software to pay. [MPP](https://www.ask402.ai/x402/x402-vs-mpp) also uses status 402 and adds card payments. [L402](https://www.ask402.ai/x402/x402-vs-l402) uses Bitcoin's Lightning Network. [AP2](https://www.ask402.ai/x402/x402-vs-ap2) and [ACP](https://www.ask402.ai/x402/x402-vs-acp) deal with shopping and checkout rather than per-request payment. The [comparison table](https://www.ask402.ai/x402/agent-payment-protocols-compared) puts them side by side. ## Sources - [x402 repository README](https://github.com/x402-foundation/x402/blob/main/README.md) - [x402 documentation](https://docs.x402.org/) - [x402 version 2 launch post](https://www.x402.org/writing/x402-v2-launch) - [Linux Foundation announcement of the x402 Foundation](https://www.linuxfoundation.org/press/linux-foundation-is-launching-the-x402-foundation-and-welcoming-the-contribution-of-the-x402-protocol) --- Facts checked against the sources above on 2026-11-20. Canonical page: https://www.ask402.ai/x402/what-is-x402 ======================================================================== # 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. ## The five steps 1. **Ask.** The caller sends an ordinary HTTP request, with no payment. 2. **Get the price.** The server answers `402 Payment Required`. A `PAYMENT-REQUIRED` header carries the offers: how much, in which token, on which network, paid to which address. 3. **Sign.** The caller picks one offer and signs a payment for exactly that amount. Nothing moves yet. The signature is permission for one specific transfer. 4. **Ask again, with payment.** The caller repeats the same request and adds a `PAYMENT-SIGNATURE` header holding the signed payment. 5. **Get the result.** The server checks the payment, has it settled on the blockchain, and replies `200 OK` with the result and a `PAYMENT-RESPONSE` header that works as a receipt. In practice a client library does steps 2 to 4 for you. Your code makes one call and gets one answer. ## What the price looks like The `PAYMENT-REQUIRED` header is JSON, encoded as base64. Decoded, the example from the specification reads: ```json { "x402Version": 2, "error": "PAYMENT-SIGNATURE header is required", "resource": { "url": "https://api.example.com/premium-data", "description": "Access to premium market data", "mimeType": "application/json" }, "accepts": [ { "scheme": "exact", "network": "eip155:84532", "amount": "10000", "asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", "payTo": "0x209693Bc6afc0C5328bA36FaF03C514EF312287C", "maxTimeoutSeconds": 60, "extra": { "name": "USDC", "version": "2" } } ] } ``` Read it as: pay exactly `10000` units of the token at that address (USDC, which has six decimal places, so $0.01) on network `eip155:84532` (Base Sepolia, a test network) to the `payTo` address, within 60 seconds. `accepts` is a list. A server can offer several networks or tokens, and the caller chooses one. The [headers and fields reference](https://www.ask402.ai/x402/x402-headers-and-fields) explains every field. ## Who checks the payment The server can verify and settle payments itself, but most hand the job to a [facilitator](https://www.ask402.ai/x402/what-is-an-x402-facilitator): a service that checks the signature and submits the transfer to the blockchain. The facilitator never holds the money and cannot change the amount or the recipient. ## The status codes | Status | Meaning in x402 | |---|---| | 402 | Payment is required, or the payment that was sent failed | | 400 | The payment was malformed | | 200 | Paid and delivered | | 500 | Something went wrong on the server | A failed payment also comes back as 402, with an error code that says why. See [x402 error codes](https://www.ask402.ai/x402/x402-error-codes). ## See it for yourself Run this in a terminal. It makes an unpaid request and prints the 402 reply: ```bash curl -i "https://agent402.tools/api/search?q=test" ``` Or paste an address into the [402 checker](https://www.ask402.ai/tools/402-checker), which decodes the header for you. ## Sources - [x402 version 2 HTTP transport specification](https://github.com/x402-foundation/x402/blob/main/specs/transports-v2/http.md) - [x402 version 2 specification](https://github.com/x402-foundation/x402/blob/main/specs/x402-specification-v2.md) - [Facilitator concept, x402 documentation](https://docs.x402.org/core-concepts/facilitator) --- Facts checked against the sources above on 2026-11-20. Canonical page: https://www.ask402.ai/x402/how-x402-works ======================================================================== # 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. ## What the standard says HTTP status codes in the 400 range mean the request cannot be fulfilled as sent. `401` means "sign in first". `403` means "you are not allowed". `404` means "not found". `402` sits between them and means "pay first". The current HTTP standard, RFC 9110, gives 402 one line: the code "is reserved for future use". It defines no headers, no price format and no way to pay. That is why, for most of the web's history, almost nothing returned it. ## Who uses 402 today Three payment protocols give the code a concrete meaning. All three reply 402, but each puts the payment details somewhere different. | Protocol | Where the price is | Paid with | |---|---|---| | x402 | `PAYMENT-REQUIRED` header (version 2) or the JSON body (version 1) | Tokens on many blockchains, usually USDC | | MPP | `WWW-Authenticate: Payment` header | Stablecoins, cards and Lightning | | L402 | `WWW-Authenticate: L402` header with a Lightning invoice | Bitcoin over the Lightning Network | One reply can carry more than one of these. A server may send both a `PAYMENT-REQUIRED` header and a `WWW-Authenticate: Payment` header, and each kind of client reads the one it understands. ## If you got a 402 and did not expect it - **Calling an API from code:** the endpoint charges per request. Look at the response headers to see which protocol it uses, or paste the address into the [402 checker](https://www.ask402.ai/tools/402-checker). - **In a browser:** some sites use 402 loosely to mean "your plan has run out" or "billing problem", with no payment protocol behind it. In that case the fix is in your account with that site, not in a wallet. ## What 402 is not A 402 is not an error in your request. The address and the input can be perfectly valid. It is the server quoting a price. A client that speaks the right protocol treats it as the first half of a normal exchange. See [how x402 works](https://www.ask402.ai/x402/how-x402-works). ## Sources - [RFC 9110, HTTP Semantics, section 15.5.3](https://www.rfc-editor.org/rfc/rfc9110.html#name-402-payment-required) - [x402 version 2 HTTP transport specification](https://github.com/x402-foundation/x402/blob/main/specs/transports-v2/http.md) - [MPP compared with x402, mpp.dev](https://mpp.dev/mpp-vs-x402) - [L402 protocol specification](https://github.com/lightninglabs/L402/blob/master/protocol-specification.md) --- Facts checked against the sources above on 2026-11-20. Canonical page: https://www.ask402.ai/x402/what-is-http-402 ======================================================================== # 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. ## Timeline | Date | What happened | |---|---| | May 2025 | Coinbase launches x402 | | September 23, 2025 | Cloudflare and Coinbase announce their intent to create an x402 Foundation | | December 2025 | Version 2 of the specification is published | | April 2, 2026 | The Linux Foundation announces the x402 Foundation, and Coinbase contributes the protocol to it | | July 14, 2026 | The foundation begins operating, with 40 member organizations | | October 1, 2026 | Michael Hursta is appointed executive director. The foundation reports more than 50 active members | ## Who is involved At the operational launch in July 2026 the foundation listed 17 premier members: Adyen, AWS, American Express, Circle, Cloudflare, Coinbase, Fiserv, Google, Mastercard, Monad Foundation, MoonPay, Ripple, Shopify, Solana Foundation, Stellar Development Foundation, Stripe and Visa. Technical decisions go through a Technical Steering Committee. Its members, as listed in the repository, come from Coinbase, Cloudflare and Stripe. ## Where the specification lives The canonical repository is `github.com/x402-foundation/x402`. The older `coinbase/x402` repository is now a development fork. The specification, the reference SDKs and the scheme definitions are all in the foundation's repository under the Apache-2.0 licence, so anyone can implement x402 without asking permission or paying a fee. ## Why the move matters A payment standard only works if competing companies are willing to build on it. Putting x402 under a neutral foundation, with card networks, cloud providers and several blockchain foundations as members, means no single company controls the specification or can charge for its use. ## Sources - [Linux Foundation, launch of the x402 Foundation (April 2, 2026)](https://www.linuxfoundation.org/press/linux-foundation-is-launching-the-x402-foundation-and-welcoming-the-contribution-of-the-x402-protocol) - [Linux Foundation, operational launch (July 14, 2026)](https://www.linuxfoundation.org/press/linux-foundation-announces-operational-launch-of-x402-foundation-to-standardize-internet-native-payments-for-ai-agents-and-applications) - [Linux Foundation, executive director appointment (October 1, 2026)](https://www.linuxfoundation.org/press/linux-foundation-appoints-michael-hursta-as-executive-director-of-the-x402-foundation) - [Cloudflare, announcing the x402 Foundation (September 23, 2025)](https://blog.cloudflare.com/x402/) - [Technical Steering Committee, x402 repository](https://github.com/x402-foundation/x402/blob/main/TSC.md) - [Licence, x402 repository](https://github.com/x402-foundation/x402/blob/main/LICENSE) --- Facts checked against the sources above on 2026-11-20. Canonical page: https://www.ask402.ai/x402/who-runs-x402 ======================================================================== # 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. ## Side by side | | Version 1 | Version 2 | |---|---|---| | Where the price is | JSON response body | `PAYMENT-REQUIRED` header, base64 JSON | | Header carrying the payment | `X-PAYMENT` | `PAYMENT-SIGNATURE` | | Header carrying the receipt | `X-PAYMENT-RESPONSE` | `PAYMENT-RESPONSE` | | Network names | Plain names: `base`, `base-sepolia`, `avalanche` | CAIP-2: `eip155:8453`, `eip155:84532` | | Price field | `maxAmountRequired` | `amount` | | Resource details | Repeated inside every offer | One `resource` object at the top | | Payment echoes the chosen offer | No | Yes, in `accepted` | | Extensions | None | An `extensions` object, used for things like discovery | | npm packages | `x402`, `x402-express`, `x402-fetch` and others | The `@x402/*` scope | The version 2 specification is dated December 9, 2025. ## Why the changes were made - **Headers instead of body.** In version 2 all protocol information travels in headers, which leaves the response body free for whatever the server wants to say to a person or a non-paying client. - **CAIP-2 network names.** `eip155:8453` is an unambiguous, standard identifier. A name like `base` only works if every implementation agrees on the same list of names. - **Extensions.** New features such as the Bazaar discovery listing can be added without changing the core format. ## How to tell which version an endpoint uses Make an unpaid request and look at the reply: - A `PAYMENT-REQUIRED` header means version 2. - No such header, and a JSON body containing `"x402Version": 1` and an `accepts` list, means version 1. The [402 checker](https://www.ask402.ai/tools/402-checker) reports the version for you. ## Do old clients and servers still work? The reference SDKs are described as fully backward compatible with version 1, so a version 2 client can pay a version 1 endpoint. The reverse is not guaranteed: a client that only knows version 1 will not find the price in a version 2 reply, and some services state that they accept version 2 only. If you are starting today, build on version 2. ## One thing that catches people out Because version 2 puts its three headers outside the small set browsers expose by default, a server that wants to be called from a web page must list them in `Access-Control-Expose-Headers` and `Access-Control-Allow-Headers`. Without that, browser code cannot read the price even though the server sent it. ## Sources - [Migration guide, version 1 to version 2](https://docs.x402.org/guides/migration-v1-to-v2) - [x402 version 2 launch post](https://www.x402.org/writing/x402-v2-launch) - [x402 version 1 specification](https://github.com/x402-foundation/x402/blob/main/specs/x402-specification-v1.md) - [x402 version 2 specification](https://github.com/x402-foundation/x402/blob/main/specs/x402-specification-v2.md) --- Facts checked against the sources above on 2026-11-20. Canonical page: https://www.ask402.ai/x402/x402-v1-vs-v2 ======================================================================== # 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. ## What it does When a seller's server receives a request with a payment attached, two things must happen: someone has to confirm the payment is valid, and someone has to put the transfer on the blockchain. A facilitator does both. | Endpoint | Purpose | |---|---| | `POST /verify` | Checks the signed payment against the seller's requirements. Returns whether it is valid, the reason if not, and the payer's address | | `POST /settle` | Submits the transfer to the blockchain and reports the transaction | | `GET /supported` | Lists the schemes and networks this facilitator handles | Facilitators that support discovery also expose `GET /discovery/resources` and `GET /discovery/search`, which list the paid endpoints they have seen. See [the Bazaar](https://www.ask402.ai/x402/x402-bazaar-discovery). ## What it cannot do The x402 documentation is explicit that a facilitator "does not hold funds or act as a custodian". The buyer signs a transfer from their own wallet straight to the seller's address. For the `exact` scheme on EVM networks, the specification states that the facilitator cannot modify the amount or the destination. Its power is limited to submitting, or declining to submit, the exact transfer the buyer signed. ## Who pays the network fee On EVM networks with the `exact` scheme, the facilitator pays the gas. On Solana, a sponsor named in the offer, usually the facilitator or the merchant, pays the transaction fee. Either way the buyer does not need to hold the network's own coin. More in [x402 fees and gas](https://www.ask402.ai/x402/x402-fees-and-gas). ## Do I have to use one? No. A seller can verify signatures and submit transactions with their own code. Most do not, because a facilitator removes the need to run a blockchain node, hold gas money and handle retries. ## How to choose one - **Networks.** Check that it supports the networks and tokens you want to accept. `GET /supported` gives the definitive list. - **Schemes.** Not every facilitator handles every scheme. See [payment schemes](https://www.ask402.ai/x402/x402-payment-schemes). - **Price.** x402 itself has no fees, but a facilitator may charge. Coinbase's CDP facilitator, for example, lists the first 1,000 on-chain transactions a month as free and $0.001 for each one after that. - **Screening.** Some facilitators apply sanctions or transaction screening and can decline a payment for that reason. - **Test or production.** The public facilitator at `x402.org/facilitator` is for test networks and quickstarts only. The [facilitator directory](https://www.ask402.ai/directory/facilitators) lists the ones we have verified. ## Sources - [Facilitator concept, x402 documentation](https://docs.x402.org/core-concepts/facilitator) - [Facilitator list, x402 documentation](https://docs.x402.org/dev-tools/facilitators) - [Coinbase CDP facilitator documentation](https://docs.cdp.coinbase.com/x402/seller/facilitator) - [The exact scheme on EVM networks](https://github.com/x402-foundation/x402/blob/main/specs/schemes/exact/scheme_exact_evm.md) --- Facts checked against the sources above on 2026-11-20. Canonical page: https://www.ask402.ai/x402/what-is-an-x402-facilitator ======================================================================== # 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. ## Three different questions "Does x402 support network X?" has three separate answers, and the one that matters to you is the last. 1. **Does the specification cover it?** The x402 documentation lists any EVM chain, Solana, TON, Algorand, Stellar, Aptos, Hedera, Keeta, NEAR, Canton, Concordium, XRPL, Cardano and Sui. The repository also holds specifications for Casper, Starknet and Bitcoin Lightning. 2. **Does a facilitator settle on it?** Each facilitator supports its own set. Coinbase's CDP facilitator, for instance, lists Base, Polygon, Arbitrum, Monad, World and Solana, plus test networks. 3. **Does this seller accept it?** Only the networks listed in the seller's 402 reply can be used. This is the answer that counts. To see what a particular endpoint accepts, paste it into the [402 checker](https://www.ask402.ai/tools/402-checker). ## Tokens - **On EVM chains:** any ERC-20 token that supports EIP-3009 or works through Permit2. - **On Solana:** any SPL or Token-2022 token. - **In practice:** USDC is the default. When a seller writes a price like `"$0.01"` in the reference SDKs, it means USDC on Base, Ethereum, Avalanche, Polygon, Arbitrum or Monad. USDC has six decimal places, and x402 prices are written in the token's smallest unit. So `"amount": "10000"` in USDC is $0.01, and `"1000000"` is $1.00. ## How networks are named Version 2 uses CAIP-2 identifiers. Version 1 used plain names. | Network | Version 2 | Version 1 | |---|---|---| | Base | `eip155:8453` | `base` | | Base Sepolia (test) | `eip155:84532` | `base-sepolia` | | Solana | `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` | `solana` | For EVM chains the number after `eip155:` is the chain ID. ## Can x402 take dollars or cards? Not natively. The version 2 specification leaves room for traditional currencies in its fields, but the x402 FAQ says fiat and cards are not natively supported. If you want to pay by card, look at services that also offer [MPP](https://www.ask402.ai/x402/x402-vs-mpp), which has card payment built in, or see [using x402 services without a crypto wallet](https://www.ask402.ai/x402/use-x402-without-a-crypto-wallet). ## Test networks Base Sepolia and Solana Devnet are the usual places to try x402 with tokens that have no real value. A 402 reply that lists only test networks is a demo, not a live service. ## Sources - [Network and token support, x402 documentation](https://docs.x402.org/core-concepts/network-and-token-support) - [Scheme specifications, x402 repository](https://github.com/x402-foundation/x402/tree/main/specs/schemes) - [Coinbase CDP facilitator documentation](https://docs.cdp.coinbase.com/x402/seller/facilitator) - [x402 FAQ](https://docs.x402.org/faq) --- Facts checked against the sources above on 2026-11-20. Canonical page: https://www.ask402.ai/x402/x402-networks-and-tokens ======================================================================== # 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. ## The four schemes | Scheme | What it does | Good for | Where it works today | |---|---|---|---| | `exact` | Pays one fixed amount | A lookup, a search, a file: anything with a known price | Widely. Specified for 18 network families | | `upto` | Buyer authorizes a ceiling, seller settles the actual cost, once | Model calls and other work whose cost is only known afterwards | EVM (through Permit2) and Solana | | `batch-settlement` | Buyer funds an escrow or channel and signs small vouchers that are redeemed together | Very many tiny payments, where a transaction per call would cost too much | EVM and Solana in the SDKs | | `auth-capture` | Places a hold that the seller can capture, void or refund | Purchases that may be cancelled or adjusted | Specified for EVM only, in the TypeScript and Go SDKs | Each offer in a 402 reply names its scheme in the `scheme` field. A server can offer the same resource under more than one. Not every facilitator handles every scheme. Coinbase's CDP facilitator, for example, lists `exact`, `upto` and `batch-settlement`. ## How "exact" works on EVM chains The buyer signs a message authorizing a transfer of a specific amount to a specific address, valid for a short time window, with a one-time number so it cannot be replayed. No transaction is sent by the buyer. The facilitator submits it and pays the gas. There are three ways the transfer can be authorized: - **EIP-3009** (the default). The token itself supports signed transfers. USDC does. - **Permit2.** For tokens without EIP-3009. It needs a one-time approval first. - **ERC-7710.** Delegation from a smart account. With `exact`, the amount must match the price exactly. Paying more than the price fails, the same as paying less. ## How "exact" works on Solana The buyer builds a token transfer transaction and signs their part of it. A sponsor named in the offer adds the fee-payer signature and submits it. The buyer does not need SOL for fees. ## When the money moves Version 2 also names three payment flows, which describe the order of events: - **authorization** (the default): verify the payment, deliver the resource, then settle. - **upfront**: settle first, then deliver. - **escrow**: settle into escrow, deliver, then settle the final amount. ## What about "deferred"? A `deferred` scheme was proposed in 2025 and is mentioned as an example in the version 1 specification, but there is no scheme by that name in the repository today. Payments that settle later are handled by `batch-settlement`. ## Sources - [Schemes overview, x402 documentation](https://docs.x402.org/schemes/overview) - [SDK feature support, x402 documentation](https://docs.x402.org/sdk-features) - [The exact scheme on EVM networks](https://github.com/x402-foundation/x402/blob/main/specs/schemes/exact/scheme_exact_evm.md) - [The exact scheme on Solana](https://github.com/x402-foundation/x402/blob/main/specs/schemes/exact/scheme_exact_svm.md) - [Coinbase CDP facilitator documentation](https://docs.cdp.coinbase.com/x402/seller/facilitator) --- Facts checked against the sources above on 2026-11-20. Canonical page: https://www.ask402.ai/x402/x402-payment-schemes ======================================================================== # 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. ## Figures we could trace to a primary source Each figure below was read from the named source on November 20, 2026. Several of the sources do not date their own numbers, so treat them as "at least this much by that day". | Figure | Source | Notes | |---|---|---| | More than 100 million transactions | Coinbase CDP facilitator documentation | One facilitator, Base and Solana only. Undated | | $28 million in payment volume | Coinbase CDP facilitator documentation | Same scope. Undated | | More than 23,000 x402 resources listed | Coinbase CDP documentation, on its Bazaar catalog | Undated | | 40 member organizations at operational launch | Linux Foundation, July 14, 2026 | 17 of them premier members | | More than 50 active members | Linux Foundation, October 1, 2026 | | | Nearly 65% of x402 transaction volume "this year" on Solana | Solana Foundation, quoted in the Linux Foundation release of April 2, 2026 | A claim by an interested party | | About 6,800 GitHub stars on the specification repository | GitHub, November 20, 2026 | | ## How to read these numbers **Many transactions, little money.** Dividing $28 million by 100 million transactions gives an average of about 28 cents, and many payments are far smaller than that: fractions of a cent at a time. A high transaction count says the plumbing works at volume. It does not say much commerce is flowing yet. **One facilitator is not the whole network.** The Coinbase figures cover payments its own facilitator settled. Other facilitators, and sellers who settle for themselves, are not included. **Not all traffic is commerce.** Transaction counts on any new payment network include testing and demos. Secondary reports have argued that real commercial volume is a small share of the headline totals. We could not confirm those reports against a primary source, so we do not repeat their figures here. **Listings are not active sellers.** A catalog entry means an endpoint settled at least one paid call. It does not mean it is still running or has customers. ## Signs of adoption that are not numbers - **Governance.** The protocol moved from one company to a Linux Foundation body in 2026, with card networks, cloud providers and several blockchain foundations as members. See [who runs x402](https://www.ask402.ai/x402/who-runs-x402). - **Platform support.** Cloudflare, AWS, Stripe and Vercel document x402 support in their own products. See [platforms in the directory](https://www.ask402.ai/directory/platforms). - **Established APIs selling through it.** Data and search providers with existing businesses now offer x402 endpoints alongside their API-key plans. See [services in the directory](https://www.ask402.ai/directory/services). ## Where to find live figures Explorers track x402 activity as it happens. See [explorers and discovery](https://www.ask402.ai/directory/discovery). ## Corrections If you have a primary source for a figure that is newer or better than one above, write to us and we will update this page. ## Sources - [Coinbase CDP facilitator documentation](https://docs.cdp.coinbase.com/x402/seller/facilitator) - [Get discovered, Coinbase CDP documentation](https://docs.cdp.coinbase.com/x402/seller/get-discovered) - [Linux Foundation, operational launch of the x402 Foundation (July 14, 2026)](https://www.linuxfoundation.org/press/linux-foundation-announces-operational-launch-of-x402-foundation-to-standardize-internet-native-payments-for-ai-agents-and-applications) - [Linux Foundation, executive director appointment (October 1, 2026)](https://www.linuxfoundation.org/press/linux-foundation-appoints-michael-hursta-as-executive-director-of-the-x402-foundation) - [Linux Foundation, launch of the x402 Foundation (April 2, 2026)](https://www.linuxfoundation.org/press/linux-foundation-is-launching-the-x402-foundation-and-welcoming-the-contribution-of-the-x402-protocol) - [x402 repository](https://github.com/x402-foundation/x402) --- Facts checked against the sources above on 2026-11-20. Canonical page: https://www.ask402.ai/x402/x402-adoption-statistics ======================================================================== # 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. ## What you need 1. **A wallet with the right token.** Most endpoints charge in USDC. The wallet must hold it on a network the seller accepts. You do not normally need the network's own coin for fees, because the facilitator or a sponsor pays them. 2. **An x402 client library** for your language. 3. **The address of a paid endpoint.** Before writing code, paste the endpoint into the [402 checker](https://www.ask402.ai/tools/402-checker). It shows the price and which networks are accepted, so you know what to fund. ## Install a client ```bash # JavaScript or TypeScript npm install @x402/fetch @x402/evm # add @x402/svm for Solana # Python pip install "x402[httpx]" # or "x402[requests]" # Go go get github.com/x402-foundation/x402/go/v2 ``` ## Make a paid request (JavaScript) This is the pattern from the official quickstart. It wraps `fetch` so that a 402 reply is paid and retried automatically. ```typescript import { wrapFetchWithPayment } from "@x402/fetch"; import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { privateKeyToAccount } from "viem/accounts"; // Load the key from the environment. Never paste it into code. const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment("https://api.example.com/paid-endpoint"); console.log(await response.json()); ``` `"eip155:*"` means "any EVM network". The client will pay whichever offer in the 402 reply it has a scheme and funds for. The official documentation has the same flow for Axios, Python and Go, and for Solana and other networks. ## Ways to hold the wallet - **A private key in an environment variable.** Simplest, and fine for a test wallet holding a few dollars. - **A managed or embedded wallet.** A provider keeps the key and signs for you, often with spending rules. See [wallets in the directory](https://www.ask402.ai/directory/wallets). - **A wallet your AI assistant can use.** Some wallets connect to assistants through MCP with a budget. See [x402 with MCP](https://www.ask402.ai/x402/x402-with-mcp). ## Keep it safe - Use a separate wallet for paying APIs and keep only a small balance in it. - Set a maximum price per request in your client where it offers one, so a mispriced or hostile endpoint cannot drain the wallet. - Read [is x402 safe?](https://www.ask402.ai/x402/is-x402-safe) before giving an autonomous agent a funded wallet. ## If it fails A rejected payment comes back as another 402 with an error code. The usual causes are not enough tokens on that network, or an authorization that expired before it was settled. See [x402 error codes](https://www.ask402.ai/x402/x402-error-codes). ## No wallet? Some services can be used without one. See [using x402 services without a crypto wallet](https://www.ask402.ai/x402/use-x402-without-a-crypto-wallet). ## Sources - [Quickstart for buyers, x402 documentation](https://docs.x402.org/getting-started/quickstart-for-buyers) - [Quickstart for buyers, Coinbase CDP documentation](https://docs.cdp.coinbase.com/x402/quickstart-for-buyers) - [Client examples, x402 repository](https://github.com/x402-foundation/x402/tree/main/examples) --- Facts checked against the sources above on 2026-11-20. Canonical page: https://www.ask402.ai/x402/how-to-pay-an-x402-api ======================================================================== # 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. ## Why the question comes up The x402 FAQ says cards and traditional currencies are not natively supported. An x402 payment is a signed transfer of tokens, and signing needs a wallet. So a pure x402 endpoint cannot be paid with a card number. That does not mean you personally must set up a wallet. There are four ways around it. ## 1. Use a service that also takes cards MPP, a related protocol, has card payment built in. A server can offer x402 and MPP in the same 402 reply, and a client can pay whichever it supports. Stripe supports both and recommends MPP when cards are needed. Whether a card is accepted is up to each service and often each route. The [402 checker](https://www.ask402.ai/tools/402-checker) shows it: look for an MPP offer marked as a card payment. ## 2. Buy the finished product instead of the API call Some sellers put a normal web checkout in front of the same tools. You pay by card on a web page and receive the result, and the x402 plumbing stays out of sight. Agent402 does this for its reports: company dossiers, domain audits and research reports are sold through card checkout. See [report samples and previews](https://www.ask402.ai/reports). ## 3. Use the free tier, if there is one A few services let you run some tools without paying at all. Agent402 lets eligible tools, the ones that only need computation such as hashing or format conversion, run in exchange for a small proof-of-work puzzle that your machine solves. No wallet and no card are involved. You can try them in the [Agent402 playground](https://agent402.tools/playground). ## 4. Let someone else hold the wallet A managed wallet gives you an account while a provider looks after the keys and does the signing, often with a spending limit you set. Wallets built for AI assistants work this way: you approve a budget and the assistant pays within it. The wallet still has to be funded with tokens, but you do not handle private keys. See [wallets in the directory](https://www.ask402.ai/directory/wallets). ## Which should I pick? | You want to | Try | |---|---| | Get one report or result, once | A card checkout (option 2) | | Try a tool before deciding anything | A free tier (option 3) | | Have your AI assistant pay small amounts as it works | A managed wallet with a budget (option 4) | | Call an API from your own code and pay by card | A service that offers MPP card payment (option 1) | | Call any x402 endpoint, at any price, from code | A wallet of your own. See [how to pay an x402 API](https://www.ask402.ai/x402/how-to-pay-an-x402-api) | ## A caution If a site asks you to type a wallet's secret phrase or private key into a web form in order to "use x402", leave. Paying with x402 never requires giving your key to the seller. ## Sources - [x402 FAQ](https://docs.x402.org/faq) - [MPP payment methods](https://mpp.dev/payment-methods) - [Stripe, x402 and machine payments](https://docs.stripe.com/payments/machine/x402) - [Agent402 llms.txt (payment options)](https://agent402.tools/llms.txt) --- Facts checked against the sources above on 2026-11-20. Canonical page: https://www.ask402.ai/x402/use-x402-without-a-crypto-wallet ======================================================================== # 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. ## Who pays what | Cost | Who pays | How much | |---|---|---| | The price of the request | The buyer | Whatever the seller quotes in the 402 reply | | Protocol fee | Nobody | The x402 documentation states the standard "has 0 fees built in" | | Blockchain fee (gas) | The facilitator on EVM networks. A sponsor, usually the facilitator or merchant, on Solana | Depends on the network. Small on the networks x402 commonly uses | | Facilitator fee | The seller, if the facilitator charges | Varies by facilitator. Some are free | ## For buyers You pay the quoted amount, exactly. With the `exact` scheme the amount you sign must match the price to the unit: sending more fails just as sending less does. You do not need to hold ETH, SOL or any other network coin to pay with the `exact` scheme. You sign a message, and someone else submits the transaction and covers its fee. The one exception is tokens that go through Permit2, which need a one-time approval transaction. That approval can be sponsored too, but if it is not, you pay gas for it once. So a wallet holding only USDC is enough for most x402 payments. ## For sellers You receive the full amount the buyer paid, in your own wallet. Your costs are: - **A facilitator fee, if any.** Coinbase's CDP facilitator lists the first 1,000 on-chain transactions each month as free, then $0.001 per transaction, with verification free. Other facilitators state that they charge nothing. Check each one's own pricing. - **Gas, if you settle yourself.** If you run without a facilitator you pay the network fee for each settlement. ## Why very small prices can be a problem Each `exact` payment is one blockchain transaction. If a request costs a tenth of a cent, the cost of settling it can be a noticeable share of the price, even when the buyer never sees that cost. The `batch-settlement` scheme exists for this: the buyer funds a balance once and then signs small off-chain vouchers that are settled together. See [payment schemes](https://www.ask402.ai/x402/x402-payment-schemes). ## What the price is written in Prices in a 402 reply are whole numbers in the token's smallest unit. For USDC, which has six decimal places: | `amount` | In dollars | |---|---| | `1000` | $0.001 | | `10000` | $0.01 | | `1000000` | $1.00 | The [402 checker](https://www.ask402.ai/tools/402-checker) does this conversion for tokens it recognizes. ## Sources - [x402 documentation](https://docs.x402.org/) - [Facilitator concept, x402 documentation](https://docs.x402.org/core-concepts/facilitator) - [Coinbase CDP facilitator documentation](https://docs.cdp.coinbase.com/x402/seller/facilitator) - [The exact scheme on EVM networks](https://github.com/x402-foundation/x402/blob/main/specs/schemes/exact/scheme_exact_evm.md) - [The exact scheme on Solana](https://github.com/x402-foundation/x402/blob/main/specs/schemes/exact/scheme_exact_svm.md) --- Facts checked against the sources above on 2026-11-20. Canonical page: https://www.ask402.ai/x402/x402-fees-and-gas ======================================================================== # 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. ## What the protocol protects you from With the standard `exact` scheme on EVM networks, the buyer signs a message that says: move this exact amount of this token to this address, valid only between these two times, with this one-time number. That gives four built-in limits: - **The amount is fixed.** The specification states the facilitator cannot modify the amount or the destination. - **It works once.** The one-time number means the same signature cannot be used for a second transfer. - **It expires.** Outside its time window the authorization is worthless. The offer's `maxTimeoutSeconds` sets how long that window is. - **Nobody else holds your money.** The facilitator "does not hold funds or act as a custodian". The transfer goes from your wallet to the seller. A seller never receives your private key or any standing permission to take more. ## What it does not protect you from **Payments are final.** A settled `exact` payment is a completed token transfer. There is no card-style chargeback. Refunds happen only if the seller chooses to send one. (The `auth-capture` scheme defines holds and refunds, but it is not yet widely available.) **You may not get what you paid for.** x402 moves the money. It does not judge the quality of the answer. A dishonest or broken endpoint can take a payment and return nothing useful. **The price is whatever the server says.** A client that pays any 402 it sees will pay a wrong or hostile price. Good clients let you set a maximum. **Agents can be manipulated.** An AI agent that reads web pages and also holds a funded wallet can be talked into spending by text it reads. This is a risk of the agent, not of x402, but x402 is what makes the spending possible. **Keys can leak.** A private key in a config file, a log or a chat window is a lost wallet. ## Sensible habits 1. **Use a dedicated wallet** for paying APIs, with a small balance. Top it up as needed. Its balance is your worst-case loss. 2. **Set a price ceiling** per request, and a budget per day if your client or wallet supports one. 3. **Check before you pay.** The [402 checker](https://www.ask402.ai/tools/402-checker) shows the price and recipient of any endpoint without paying. 4. **Prefer sellers you can identify,** with documentation, a named operator and published terms. 5. **Keep keys out of prompts and chats.** Load them from the environment or use a managed wallet with signing rules. 6. **Start on a test network.** Base Sepolia and Solana Devnet use tokens with no value. ## For sellers The default flow is verify, deliver, then settle. A buyer's funds can move between verification and settlement, so a payment that verified can still fail to settle. Decide whether that small risk is acceptable for your prices, or use the `upfront` flow, which settles before delivering. ## Screening Some facilitators run sanctions and transaction screening and may decline a payment. That is a property of the facilitator, not of the protocol. ## Sources - [The exact scheme on EVM networks](https://github.com/x402-foundation/x402/blob/main/specs/schemes/exact/scheme_exact_evm.md) - [Facilitator concept, x402 documentation](https://docs.x402.org/core-concepts/facilitator) - [x402 version 2 specification](https://github.com/x402-foundation/x402/blob/main/specs/x402-specification-v2.md) - [Schemes overview, x402 documentation](https://docs.x402.org/schemes/overview) --- Facts checked against the sources above on 2026-11-20. Canonical page: https://www.ask402.ai/x402/is-x402-safe ======================================================================== # 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. ## The two pieces **MCP** (Model Context Protocol) is how assistants such as Claude discover and call tools: a search tool, a database, a browser. **x402** is how a service gets paid per request. An assistant with both can use a tool it has never seen before and pay for it on the spot, with no account and no API key for a person to set up first. ## Two ways they connect ### 1. An MCP server that pays x402 APIs for you The MCP server holds a wallet. When the assistant calls one of its tools, the server makes an ordinary x402 request to a paid HTTP API, pays, and hands back the result. The assistant never sees the payment. This works with any MCP client, because all the x402 logic sits in the server. ### 2. Paid MCP tools, with payment inside MCP itself Here the tool itself charges, and the payment travels in MCP messages instead of HTTP headers. The x402 specification defines how: 1. The assistant calls the tool with no payment. 2. The tool returns an error result that carries the payment requirements. 3. The client signs a payment and calls the tool again, with the payment in the request's `_meta` field under `x402/payment`. 4. The tool returns its result, with the receipt under `x402/payment-response`. The content of those messages is the same as in HTTP. Only the envelope differs. This route needs an MCP client that understands x402. There is also a transport for A2A, the agent-to-agent protocol. ## What to use | You are | Look at | |---|---| | Building a paid MCP tool | `@x402/mcp`, or Cloudflare's Agents SDK, which has a `paidTool` helper | | Building an agent that pays | An x402-aware MCP client: `@x402/mcp` or the Cloudflare Agents SDK | | A person who wants their assistant to use paid tools | A wallet that connects through MCP with a budget, or a hosted MCP server from a tool provider | See [SDKs](https://www.ask402.ai/directory/sdks) and [wallets](https://www.ask402.ai/directory/wallets) in the directory. ## Hosted MCP servers from tool catalogs Some catalogs of x402 tools publish their own MCP server, so one connection gives an assistant the whole catalog. Agent402, for example, has a hosted server at `https://agent402.tools/mcp`. Adding it gives an assistant tool discovery and the free tools. Paid tools need a payment method configured separately. See the [setup guide](https://www.ask402.ai/setup). ## Before you let an agent spend An assistant that can pay will pay for whatever it is persuaded to call. Give it a wallet with a small balance and a per-call ceiling, and prefer setups where you approve spending above a threshold. More in [is x402 safe?](https://www.ask402.ai/x402/is-x402-safe). ## Sources - [x402 MCP transport specification](https://github.com/x402-foundation/x402/blob/main/specs/transports-v2/mcp.md) - [MCP server with x402, x402 documentation](https://docs.x402.org/guides/mcp-server-with-x402) - [Cloudflare Agents, x402](https://developers.cloudflare.com/agents/x402/) - [Coinbase agentic wallet documentation](https://docs.cdp.coinbase.com/agentic-wallet/welcome) --- Facts checked against the sources above on 2026-11-20. Canonical page: https://www.ask402.ai/x402/x402-with-mcp ======================================================================== # 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 you need - **A wallet address** to receive payments. You only need the address on the server, not its private key. - **A facilitator** to verify and settle payments. See [what a facilitator is](https://www.ask402.ai/x402/what-is-an-x402-facilitator). - **Middleware** for your framework. ## A minimal Express server This follows the official quickstart. It charges $0.001 in USDC for `GET /weather` on Base Sepolia, a test network. ```typescript import express from "express"; import { paymentMiddleware, x402ResourceServer } from "@x402/express"; import { ExactEvmScheme } from "@x402/evm/exact/server"; import { HTTPFacilitatorClient } from "@x402/core/server"; const app = express(); const payTo = "0xYourEvmAddress"; // Test facilitator. Replace with a production facilitator before going live. const facilitator = new HTTPFacilitatorClient({ url: "https://x402.org/facilitator" }); app.use( paymentMiddleware( { "GET /weather": { accepts: [{ scheme: "exact", price: "$0.001", network: "eip155:84532", payTo }], description: "Weather data", mimeType: "application/json", }, }, new x402ResourceServer(facilitator).register("eip155:84532", new ExactEvmScheme()), ), ); app.get("/weather", (req, res) => res.json({ weather: "sunny", temperature: 70 })); app.listen(4021); ``` Install with `npm install @x402/express @x402/core @x402/evm`. Unpaid requests to `/weather` now get a 402 with the price. Paid requests reach your handler. The quickstart has the same example for Next.js, Hono, Fastify, FastAPI, Flask and Go, and shows how to add Solana and other networks by listing more entries in `accepts`. ## Going live 1. **Switch facilitator.** `x402.org/facilitator` is for test networks only. Choose a production one from the [facilitator directory](https://www.ask402.ai/directory/facilitators) and check that it supports your networks. 2. **Switch network.** Change `eip155:84532` (Base Sepolia) to a real network such as `eip155:8453` (Base). 3. **Offer more than one network** if you can. Buyers hold funds in different places, and each extra entry in `accepts` widens who can pay you. 4. **Write a clear `description`.** Agents read it to decide whether your endpoint does what they need. ## Things that go wrong - **Browser clients cannot see the price.** The three x402 headers are not exposed to browser code by default. Add `PAYMENT-REQUIRED` and `PAYMENT-RESPONSE` to `Access-Control-Expose-Headers`, and `PAYMENT-SIGNATURE` to `Access-Control-Allow-Headers`. - **A proxy strips or truncates headers.** The price is in a header, and with many offers it gets long. Make sure your proxy or CDN passes large headers through. - **The price is cached.** A cached 402, or a cached paid response served to a non-payer, breaks the flow. Mark paid routes as not cacheable. - **Free and paid mixed on one route.** Decide per route and method. `GET /weather` and `POST /weather` are configured separately. ## Check your work Paste your endpoint into the [402 checker](https://www.ask402.ai/tools/402-checker). It shows exactly what a client sees: the version, each offer, the price in dollars where the token is recognized, and warnings such as a test network on a production address. ## Being found Once you are live, buyers and agents need to discover you. See [the Bazaar and how to get listed](https://www.ask402.ai/x402/x402-bazaar-discovery). ## Sources - [Quickstart for sellers, x402 documentation](https://docs.x402.org/getting-started/quickstart-for-sellers) - [Facilitator list, x402 documentation](https://docs.x402.org/dev-tools/facilitators) - [x402 version 2 HTTP transport specification](https://github.com/x402-foundation/x402/blob/main/specs/transports-v2/http.md) - [Server examples, x402 repository](https://github.com/x402-foundation/x402/tree/main/examples) --- Facts checked against the sources above on 2026-11-20. Canonical page: https://www.ask402.ai/x402/how-to-accept-x402-payments ======================================================================== # 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. ## The three headers | Header (version 2) | Sent by | With | Holds | Version 1 equivalent | |---|---|---|---|---| | `PAYMENT-REQUIRED` | Server | A 402 reply | The price and payment options | The JSON response body | | `PAYMENT-SIGNATURE` | Client | The repeated request | The signed payment | `X-PAYMENT` | | `PAYMENT-RESPONSE` | Server | The result | The settlement receipt | `X-PAYMENT-RESPONSE` | Every value is a JSON object encoded as base64. In version 2 all protocol information is in headers, and the response body belongs to the server. ## PAYMENT-REQUIRED The top-level object: | Field | Required | Meaning | |---|---|---| | `x402Version` | Yes | `2` | | `resource` | Yes | What is being sold. See below | | `accepts` | Yes | A list of offers. The client picks one | | `error` | No | Why payment is needed, or why the last payment failed | | `extensions` | No | Extra features, such as the Bazaar listing | The `resource` object: | Field | Required | Meaning | |---|---|---| | `url` | Yes | The address being paid for | | `description` | No | What it does, in words | | `mimeType` | No | The type of the result, such as `application/json` | | `serviceName`, `tags`, `iconUrl` | No | Display details | Each offer in `accepts`: | Field | Required | Meaning | |---|---|---| | `scheme` | Yes | How payment is made: `exact`, `upto` and so on | | `network` | Yes | Which network, in CAIP-2 form such as `eip155:8453` | | `amount` | Yes | The price, as a whole number in the token's smallest unit | | `asset` | Yes | The token's contract or mint address | | `payTo` | Yes | The address that receives the payment | | `maxTimeoutSeconds` | Yes | How long the payment may take to complete | | `extra` | No | Details the scheme needs. For EVM tokens, `name` and `version` identify the token for signing | ## PAYMENT-SIGNATURE | Field | Required | Meaning | |---|---|---| | `x402Version` | Yes | `2` | | `accepted` | Yes | A copy of the offer the client chose | | `payload` | Yes | The signed payment. Its shape depends on the scheme and network | | `resource` | No | The resource being paid for | | `extensions` | No | Extension data | For `exact` on an EVM network, `payload` holds a `signature` and an `authorization` with `from`, `to`, `value`, `validAfter`, `validBefore` and `nonce`. ## PAYMENT-RESPONSE | Field | Required | Meaning | |---|---|---| | `success` | Yes | Whether settlement succeeded | | `transaction` | Yes | The blockchain transaction identifier | | `network` | Yes | The network it settled on | | `payer` | No | The paying address | | `amount` | No | The amount settled | | `errorReason`, `errorMessage` | No | Why it failed. See [error codes](https://www.ask402.ai/x402/x402-error-codes) | ## Version 1 differences Version 1 sent the requirements as the 402 response body: `x402Version`, `error` and `accepts`. Each offer carried `maxAmountRequired` instead of `amount`, plain network names such as `base`, and its own `resource`, `description` and `mimeType`, because there was no top-level `resource` object. ## Reading a header by hand ```bash curl -si "https://agent402.tools/api/search?q=test" \ | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 -d ``` Or use the [402 checker](https://www.ask402.ai/tools/402-checker), which decodes the header and explains each offer. ## In browsers None of the three headers is on the list browsers expose to scripts by default. A server that expects browser clients must name them in `Access-Control-Expose-Headers` and `Access-Control-Allow-Headers`. ## Sources - [x402 version 2 specification](https://github.com/x402-foundation/x402/blob/main/specs/x402-specification-v2.md) - [x402 version 2 HTTP transport specification](https://github.com/x402-foundation/x402/blob/main/specs/transports-v2/http.md) - [x402 version 1 specification](https://github.com/x402-foundation/x402/blob/main/specs/x402-specification-v1.md) - [x402 version 1 HTTP transport specification](https://github.com/x402-foundation/x402/blob/main/specs/transports-v1/http.md) --- Facts checked against the sources above on 2026-11-20. Canonical page: https://www.ask402.ai/x402/x402-headers-and-fields ======================================================================== # 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. ## Official SDKs | Language | Package | Covers | |---|---|---| | JavaScript, TypeScript | `@x402/*` on npm | Clients, server middleware, facilitator, many networks | | Python | `x402` on PyPI | FastAPI and Flask servers, httpx and requests clients | | Go | `github.com/x402-foundation/x402/go/v2` | Client, server and facilitator | All three are developed in the x402 Foundation's repository and released often. ## The JavaScript packages, by job | You want to | Install | |---|---| | Pay from `fetch` | `@x402/fetch` | | Pay from Axios | `@x402/axios` | | Charge in Express | `@x402/express` | | Charge in Next.js | `@x402/next` | | Charge in Hono | `@x402/hono` | | Charge in Fastify | `@x402/fastify` | | Show a payment page to people in a browser | `@x402/paywall` | | Use x402 inside MCP | `@x402/mcp` | | Add the Bazaar listing and other extensions | `@x402/extensions` | Each also needs `@x402/core` and one package per network family: `@x402/evm` for Ethereum-style chains, `@x402/svm` for Solana, and others for Algorand, Aptos, Stellar and more. ## Community libraries | Language | Library | Notes | |---|---|---| | Rust | `x402-rs` (`x402-axum`, `x402-reqwest`) | Listed in the official third-party SDK page. Includes a self-hostable facilitator | | Ruby | `x402-rails` | Rails paywall helper from Quicknode | | Java | Mogami `x402-java-client` and Spring Boot starter | Third-party. The x402 repository has a Java module, but we could not confirm a published release | | Elixir | `raxol_payments` | x402 and MPP client with spend limits | There is no official Rust SDK. ## Version 1 packages are legacy Before version 2, the npm packages were un-scoped: `x402`, `x402-express`, `x402-axios`, `x402-fetch`, `x402-hono`, `x402-next`. Tutorials from 2025 use them. For new work use the `@x402/*` scope, which supports version 2 and can still read version 1. See [version 1 and version 2 compared](https://www.ask402.ai/x402/x402-v1-vs-v2). ## Not every SDK supports every feature The schemes beyond `exact` are unevenly supported. `auth-capture`, for example, is only in the TypeScript and Go SDKs. If you need `upto` or `batch-settlement`, check the SDK feature table in the official documentation before choosing a language. ## Libraries that cover more than x402 Some tools speak x402 and MPP both, which helps if you buy from sellers on either: Faremeter, the Solana Foundation's `pay` command-line tool, and platform SDKs from Cloudflare and thirdweb. The [SDK directory](https://www.ask402.ai/directory/sdks) lists these with links. ## Sources - [x402 repository](https://github.com/x402-foundation/x402) - [Third-party SDKs, x402 documentation](https://docs.x402.org/dev-tools/third-party-sdks) - [SDK feature support, x402 documentation](https://docs.x402.org/sdk-features) - [x402 on PyPI](https://pypi.org/project/x402/) --- Facts checked against the sources above on 2026-11-20. Canonical page: https://www.ask402.ai/x402/x402-sdks ======================================================================== # 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. ## What it is An agent that can pay still has to find something worth paying for. The Bazaar answers "what x402 services exist, and how do I call them?" in a form software can read. It is not one website. It is an extension to x402 version 2, plus search endpoints that facilitators expose. Each facilitator that supports it has its own catalog of the endpoints it has processed. ## How a listing is made 1. **The seller describes the endpoint.** The 402 reply includes `extensions.bazaar`, with an `info` section and a JSON schema covering the HTTP method (or MCP tool), the inputs it takes, and an example of the output. 2. **A facilitator indexes it.** When the facilitator handles a payment for that endpoint, it records the description. 3. **Buyers search the catalog** through the facilitator's discovery endpoints, `GET /discovery/resources` and `GET /discovery/search`. A facilitator can tell the seller how indexing went through an `EXTENSION-RESPONSES` header, with a `bazaar.status` of `success`, `processing` or `rejected`. ## Getting listed on Coinbase's catalog Coinbase's documentation describes the rule plainly: there is no registration form. An endpoint is indexed after the CDP facilitator settles a paid call to it. So: 1. Use the CDP facilitator for settlement. 2. Include the `bazaar` extension in your 402 reply. The server SDKs have a helper for it. 3. Make one real paid call to the endpoint. The same documentation says the catalog lists more than 23,000 x402 resources. It is public and needs no API key to search. ## Writing a listing that gets used Agents choose tools by reading descriptions. Make yours specific: - Say what goes in and what comes out, in one sentence. - Give a realistic example input and output. - Name the unit of work the price covers: per search, per page, per thousand rows. - Describe when *not* to use it. It saves agents wasted payments and you wasted support. ## Other places to be found The Bazaar is one channel. Independent directories and explorers crawl x402 endpoints too, and some verify listings with real payments. See [explorers and discovery](https://www.ask402.ai/directory/discovery) in the directory. It also helps to be found the ordinary way: clear public documentation, an `llms.txt` file, and an OpenAPI description, so that search engines and AI assistants can read what you offer. ## How mature is it? The x402 documentation describes the Bazaar as in early development. Expect the format and the catalogs to keep changing, and do not rely on one catalog as your only route to customers. ## Sources - [Bazaar extension specification](https://github.com/x402-foundation/x402/blob/main/specs/extensions/bazaar.md) - [Bazaar, x402 documentation](https://docs.x402.org/extensions/bazaar) - [Get discovered, Coinbase CDP documentation](https://docs.cdp.coinbase.com/x402/seller/get-discovered) - [Bazaar, Coinbase CDP documentation](https://docs.cdp.coinbase.com/x402/bazaar) --- Facts checked against the sources above on 2026-11-20. Canonical page: https://www.ask402.ai/x402/x402-bazaar-discovery ======================================================================== # 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. ## The one-table answer | | x402 | MPP | L402 | AP2 | ACP | |---|---|---|---|---|---| | Job | Pay per request | Pay per request, session or subscription | Pay per request or for access | Prove a purchase was authorized | Shopping checkout | | From | Coinbase | Tempo and Stripe | Lightning Labs | Google | OpenAI and Stripe | | Governed by | x402 Foundation (Linux Foundation) | Authors, with an IETF draft | Lightning Labs | FIDO Alliance | OpenAI and Stripe | | Uses HTTP 402 | Yes | Yes | Yes | No | No | | Pays with | Blockchain tokens, mostly USDC | Stablecoins, cards, Lightning | Bitcoin Lightning | Cards first | The buyer's existing payment method | | Needs an account with the seller | No | No | No | Depends on the merchant | Merchant integration | | Typical amount | Under a cent to a few dollars | Under a cent upwards | A few satoshis upwards | A normal purchase | A normal purchase | ## Two families **Paying for a request.** x402, MPP and L402 all answer the same question: how does a program pay for this one HTTP call, right now, without signing up? All three reply `402 Payment Required` and expect the request to be repeated with proof of payment. They differ in the header that carries the price and in the money they accept. **Buying on someone's behalf.** AP2 and ACP deal with an agent making a purchase for a person: who approved it, what is in the order, how the merchant gets paid and who is responsible afterwards. They involve carts, mandates and merchants, not single HTTP calls. The two families work together more than they compete. An agent can prove authorization with AP2 and settle with x402. ## How to tell what an endpoint speaks | You see | It is | |---|---| | Status 402 and a `PAYMENT-REQUIRED` header | x402 version 2 | | Status 402 and a JSON body with `x402Version` and `accepts` | x402 version 1 | | Status 402 and `WWW-Authenticate: Payment ...` | MPP | | Status 402 and `WWW-Authenticate: L402 ...` (or `LSAT`) | L402 | | More than one of the above | The endpoint accepts several. Pay with whichever your client supports | The [402 checker](https://www.ask402.ai/tools/402-checker) reads all of these and lists every offer. ## Quick picks | You want to | Use | |---|---| | Charge agents for API calls in stablecoins | x402 | | Charge for API calls and accept cards too | MPP, or x402 and MPP together | | Charge in bitcoin over Lightning | L402 | | Let an agent shop at a merchant with a card | ACP for checkout, with AP2-style authorization | | Pay for many tools from one agent wallet | x402, which has the most wallets and catalogs today | ## Others worth knowing - **UCP (Universal Commerce Protocol)** is a discovery-to-checkout standard co-developed by Google, Shopify and others. It builds on AP2, A2A and MCP. - **Verifiable Intent**, co-developed by Mastercard and Google, was donated to the FIDO Alliance in April 2026 alongside AP2. ## Each comparison in detail - [x402 vs MPP](https://www.ask402.ai/x402/x402-vs-mpp) - [x402 vs L402](https://www.ask402.ai/x402/x402-vs-l402) - [x402 vs AP2](https://www.ask402.ai/x402/x402-vs-ap2) - [x402 vs ACP](https://www.ask402.ai/x402/x402-vs-acp) ## Sources - [x402 version 2 specification](https://github.com/x402-foundation/x402/blob/main/specs/x402-specification-v2.md) - [MPP compared with x402, mpp.dev](https://mpp.dev/mpp-vs-x402) - [L402 protocol specification](https://github.com/lightninglabs/L402/blob/master/protocol-specification.md) - [AP2 protocol site](https://ap2-protocol.org/) - [Agentic Commerce Protocol repository](https://github.com/agentic-commerce-protocol/agentic-commerce-protocol) - [Universal Commerce Protocol site](https://ucp.dev/) --- Facts checked against the sources above on 2026-11-20. Canonical page: https://www.ask402.ai/x402/agent-payment-protocols-compared ======================================================================== # 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. ## Side by side | | x402 | MPP | |---|---|---| | Full name | x402 | Machine Payments Protocol | | Started by | Coinbase, May 2025 | Tempo and Stripe, announced March 18, 2026 | | Governed by | x402 Foundation (Linux Foundation) | Its authors, with the core submitted to the IETF as an Internet-Draft | | HTTP status | 402 | 402 | | Price is sent in | `PAYMENT-REQUIRED` header | `WWW-Authenticate: Payment` header | | Payment is sent in | `PAYMENT-SIGNATURE` header | `Authorization: Payment` header | | Receipt | `PAYMENT-RESPONSE` header | `Payment-Receipt` header | | Pays with | Tokens on many blockchains, usually USDC | Tempo stablecoins, Stripe, cards and Lightning in production. EVM, Solana and other networks available | | Cards | Not natively | Yes | | Kinds of payment | Schemes: `exact`, `upto`, `batch-settlement`, `auth-capture` | Intents: charge, session, subscription | | Error format | Its own error codes | RFC 9457 Problem Details | ## How they are alike Both start the same way: an unpaid request gets a 402 that says what to pay. Both are open, both aim at AI agents and APIs, and both avoid accounts and API keys. A one-off x402 `exact` payment corresponds closely to an MPP `charge`. ## How they differ **Where they come from.** x402 began in crypto and is designed around signed token transfers. MPP comes from a payments company and treats a stablecoin transfer as one payment method among several, next to cards. **How they fit into HTTP.** MPP reuses HTTP's existing authentication headers, `WWW-Authenticate` and `Authorization`, with a new `Payment` scheme, and is being put through the IETF as a draft standard. It is an individual draft, not a finished RFC. x402 defines its own headers. **What you can pay with.** If a buyer needs to pay by card, MPP has that built in and x402 does not. If a buyer holds USDC on a network such as Base or Solana, both can work. ## You do not have to choose A server can put both sets of headers in the same 402 reply. An x402 client reads `PAYMENT-REQUIRED`, and an MPP client reads `WWW-Authenticate: Payment`. MPP's own tooling can serve both from one endpoint, and Stripe supports both, recommending MPP when cards are needed. Agent402 is one example of an endpoint that answers with both. You can see it in the [402 checker](https://www.ask402.ai/tools/402-checker): the result lists x402 offers and MPP offers for the same request. ## Which should I use? - **Buying:** use whichever your client and funds support. If you want to pay by card, look for MPP. - **Selling to crypto-native agents:** x402 has the larger set of wallets, facilitators and catalogs today. - **Selling to buyers who want cards:** offer MPP, or both. - **Not sure:** offer both. The cost is one more header. ## A note on sources The most detailed comparison available is published at mpp.dev by MPP's authors, so it is not neutral. The facts in the table above are ones we could confirm against each protocol's own specification. ## Sources - [Stripe, introducing the Machine Payments Protocol (March 18, 2026)](https://stripe.com/blog/machine-payments-protocol) - [MPP compared with x402, mpp.dev (written by MPP's authors)](https://mpp.dev/mpp-vs-x402) - [MPP payment methods](https://mpp.dev/payment-methods) - [IETF draft, the Payment HTTP authentication scheme](https://datatracker.ietf.org/doc/draft-httpauth-payment/) - [Using MPP with x402, mpp.dev](https://mpp.dev/guides/use-mpp-with-x402) - [Stripe, x402 and machine payments](https://docs.stripe.com/payments/machine/x402) --- Facts checked against the sources above on 2026-11-20. Canonical page: https://www.ask402.ai/x402/x402-vs-mpp ======================================================================== # 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. ## Side by side | | x402 | L402 | |---|---|---| | Developed by | Coinbase, now the x402 Foundation | Lightning Labs | | Pays with | Tokens on many blockchains, usually USDC | Bitcoin, over the Lightning Network only | | Price is sent in | `PAYMENT-REQUIRED` header | `WWW-Authenticate: L402` header, with a Lightning invoice | | Proof of payment | A signed transfer authorization | The invoice's preimage, sent with a macaroon | | What the buyer ends up with | A receipt for one request | A token that can be reused for later requests | | Price is in | A dollar stablecoin, typically | Satoshis | | After a failed payment | Another 402 | 401 for a bad credential. 402 only for the first challenge | ## How L402 works 1. The server replies 402 with `WWW-Authenticate: L402 macaroon="...", invoice="..."`. 2. The client pays the Lightning invoice. Paying reveals a secret called the preimage. 3. The client repeats the request with `Authorization: L402 :`. The macaroon is a token tied to that invoice. The server can check it without looking anything up, and it can carry limits such as an expiry or a number of uses. So one payment can buy a credential that works for many requests. L402 was earlier known as LSAT, and some servers still send that name. ## The practical differences **The money.** L402 means holding bitcoin and running or using a Lightning wallet. x402 usually means holding a dollar stablecoin. For pricing an API in dollars, a stablecoin avoids exchange-rate movement between quote and payment. **Pay per request or pay for access.** An x402 `exact` payment covers one request. An L402 macaroon is closer to a paid pass: buy once, use it until it runs out. x402 has other schemes for metered and batched use, but its common case is one payment per call. **Reach.** x402 has official SDKs in three languages, many facilitators, and catalogs of services. L402 has a smaller, Bitcoin-focused ecosystem. ## They now overlap x402's repository includes a specification for the `exact` scheme on Bitcoin Lightning, where the proof of payment is also the invoice preimage. So a Lightning payment can be made inside x402's format. MPP lists Lightning as a payment method too. ## Which should I use? - **Your buyers hold bitcoin and use Lightning:** L402 is built for exactly that. - **You price in dollars and want the widest set of agent wallets:** x402. - **You want a reusable access token as the product:** L402's macaroons do this natively. To tell which one an endpoint speaks, paste it into the [402 checker](https://www.ask402.ai/tools/402-checker). It recognizes x402, MPP and L402 replies. ## Sources - [L402 protocol specification, Lightning Labs](https://github.com/lightninglabs/L402/blob/master/protocol-specification.md) - [L402, Lightning Labs documentation](https://docs.lightning.engineering/the-lightning-network/l402) - [x402 version 2 specification](https://github.com/x402-foundation/x402/blob/main/specs/x402-specification-v2.md) - [Scheme specifications, x402 repository](https://github.com/x402-foundation/x402/tree/main/specs/schemes) --- Facts checked against the sources above on 2026-11-20. Canonical page: https://www.ask402.ai/x402/x402-vs-l402 ======================================================================== # 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. ## Side by side | | x402 | AP2 | |---|---|---| | Full name | x402 | Agent Payments Protocol | | Started by | Coinbase, May 2025 | Google, announced September 16, 2025 | | Governed by | x402 Foundation (Linux Foundation) | FIDO Alliance, since April 28, 2026 | | Main question it answers | How does this request get paid for? | Did the person really authorize this purchase? | | How | A 402 reply and a signed token transfer | Signed mandates, issued as verifiable credentials | | Uses HTTP 402 | Yes | No | | Travels over | HTTP, MCP, A2A | An extension for A2A and MCP | | Pays with | Blockchain tokens | Cards first. Digital currencies are on the roadmap | | Typical purchase | A fraction of a cent for an API call | A shopping order placed by an agent | ## The problem each one solves **x402 is about settlement.** A server names a price, a client pays it, and the money moves. The protocol does not ask who the client is or whether a person approved the spend. That is left to the wallet and its limits. **AP2 is about authorization and accountability.** When an agent buys something on a person's behalf, the merchant, the card network and the bank all want evidence that the person asked for it. AP2 provides that with mandates: signed records of what the person approved, such as a Checkout Mandate and a Payment Mandate. If there is a dispute later, the mandates show who agreed to what. So AP2 sits a layer above the payment. It says a purchase is authorized. Something else still has to move the money. ## How they fit together They are designed to combine. An agent can hold an AP2 mandate that proves its user approved a purchase, and then settle that purchase with x402. Google's agentic commerce organization publishes an extension that carries x402 payments over the A2A protocol, and AP2 ships an x402 sample. ## When each matters - **An agent calling paid APIs and tools:** x402. The amounts are tiny, the buyer is software, and a spending limit on the wallet is enough control. - **An agent placing an order with a merchant on a card:** AP2-style authorization matters, because card payments can be disputed and someone has to show consent. - **Both at once:** an agent that shops on your behalf and pays in stablecoins would use AP2 for the consent record and x402 for the transfer. ## Related work AP2 version 0.2 was published alongside the donation to FIDO. Verifiable Intent, a related specification co-developed by Mastercard and Google, was donated to FIDO at the same time. ## Sources - [Google, AP2 and the FIDO Alliance (April 28, 2026)](https://blog.google/products-and-platforms/platforms/google-pay/agent-payments-protocol-fido-alliance/) - [AP2 protocol site](https://ap2-protocol.org/) - [AP2 repository](https://github.com/google-agentic-commerce/AP2) - [A2A x402 extension](https://github.com/google-agentic-commerce/a2a-x402) --- Facts checked against the sources above on 2026-11-20. Canonical page: https://www.ask402.ai/x402/x402-vs-ap2 ======================================================================== # 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. ## Side by side | | x402 | ACP | |---|---|---| | Full name | x402 | Agentic Commerce Protocol | | Maintained by | x402 Foundation (Linux Foundation) | OpenAI and Stripe | | Licence | Apache-2.0 | Apache-2.0 | | What is bought | One request: a search, a file, a model call | An order: products, shipping, tax, fulfilment | | Shape | Request, 402, pay, result | Create a checkout, update it, complete it, track the order | | Uses HTTP 402 | Yes | No | | Who is the seller of record | The API being called | The merchant, who stays merchant of record | | Pays with | Blockchain tokens, usually USDC | The buyer's existing payment method, passed as a delegated credential | | Needs a merchant integration | No, any server can answer 402 | Yes, the merchant implements checkout endpoints | | Status | Version 2 | Described by its maintainers as beta. Versions are dated, first 2025-09-29 | ## Different kinds of buying **x402 is for machine-sized purchases.** The thing bought is the HTTP response itself. There is no cart, no shipping address, no order to track. The price is usually well under a dollar, and the whole exchange takes one extra round trip. **ACP is for shopping.** A person asks an assistant to buy something. The assistant and the merchant exchange structured messages about items, quantities, delivery and totals, over REST or MCP. When the person confirms, the assistant passes a payment credential that the merchant charges through its own payment processor. The merchant handles fulfilment, returns and support as usual. ACP was first implemented by OpenAI, in ChatGPT, and by Stripe, whose Shared Payment Token is the delegated credential. ## Do they compete? Mostly not. Asking which is better is like asking whether a vending machine or a shop counter is better. A weather API has no use for a cart. A furniture store cannot be reduced to a single paid request. They could meet in the middle: an agent doing a shopping task through ACP might call paid data APIs through x402 along the way. ## Which applies to me? - **You run an API, a dataset or a tool:** x402. Add middleware and name a price. See [how to accept x402 payments](https://www.ask402.ai/x402/how-to-accept-x402-payments). - **You run a shop with physical or digital products:** ACP, or a similar checkout standard. - **You build agents:** probably both in time, depending on what your agent buys. For the wider picture, including [AP2](https://www.ask402.ai/x402/x402-vs-ap2), [MPP](https://www.ask402.ai/x402/x402-vs-mpp) and [L402](https://www.ask402.ai/x402/x402-vs-l402), see the [comparison table](https://www.ask402.ai/x402/agent-payment-protocols-compared). ## Sources - [Agentic Commerce Protocol repository](https://github.com/agentic-commerce-protocol/agentic-commerce-protocol) - [Agentic Commerce Protocol site](https://www.agenticcommerce.dev/) - [x402 version 2 specification](https://github.com/x402-foundation/x402/blob/main/specs/x402-specification-v2.md) --- Facts checked against the sources above on 2026-11-20. Canonical page: https://www.ask402.ai/x402/x402-vs-acp ======================================================================== # What do x402 error codes mean, and how do I fix a failed payment? > A failed x402 payment returns status 402 again with a machine-readable code. The most common are insufficient_funds (the wallet lacks the token on that network), an expired or not-yet-valid authorization (usually a clock or timeout problem), and a signature or amount mismatch. Clients should act on the code, never on the message text. ## Where the error appears - **Before payment is accepted:** the server replies 402 again. In version 2 the `error` field is inside the `PAYMENT-REQUIRED` header. In version 1 it is in the JSON body. - **From a facilitator's `/verify`:** `invalidReason` gives the code. - **From settlement:** `errorReason` in the `PAYMENT-RESPONSE` header gives the code. The specification says clients must use the code and must not rely on the wording of the message, which can change. ## The codes The meanings and fixes below are our plain-English reading of each code in the specification. | Code | What it means | What to do | |---|---|---| | `insufficient_funds` | The paying wallet does not hold enough of the token on that network | Fund the wallet with the right token on the right network. USDC on one network cannot pay an offer on another | | `invalid_exact_evm_payload_authorization_valid_before` | The authorization had expired by the time it was checked | Sign a fresh payment and send it straight away. Check your machine's clock | | `invalid_exact_evm_payload_authorization_valid_after` | The authorization is not valid yet | Almost always a clock running ahead. Sync the clock | | `invalid_exact_evm_payload_authorization_value_mismatch` | The signed amount is not the amount asked for | Sign exactly the `amount` in the offer. With `exact`, paying more fails too | | `invalid_exact_evm_payload_recipient_mismatch` | The signed recipient is not the offer's `payTo` address | Pay the address in the offer you chose, unchanged | | `invalid_exact_evm_payload_signature` | The signature does not check out | Check you signed with the paying wallet's key and used the token details from the offer's `extra` field (`name` and `version`) | | `invalid_network` | The payment names a network the server or facilitator does not accept for this offer | Use a network listed in `accepts` | | `invalid_scheme` / `unsupported_scheme` | The scheme is wrong for this offer, or not supported | Use a scheme listed in `accepts`. Not every facilitator handles every scheme | | `invalid_x402_version` | The version number is not one the server accepts | Match the version of the 402 reply. Update old client libraries | | `invalid_payload` | The payment could not be read | Usually a client bug: bad base64, missing fields, or a version 1 payload sent to a version 2 server | | `invalid_payment_requirements` | The seller's own requirements are malformed | A seller-side problem. Report it to the service | | `invalid_transaction_state` | The settlement transaction did not end in a successful state | Check the transaction on a block explorer before retrying, so you do not pay twice | | `unexpected_verify_error` / `unexpected_settle_error` | The facilitator hit an error of its own | Wait and retry. If it persists, the facilitator or network is having trouble | | `settlement_pending` | The transaction was sent but is not confirmed yet. Version 2 only | Not a failure. Wait for confirmation and do not pay again | In version 1 the amount-mismatch code is spelled `invalid_exact_evm_payload_authorization_value`. ## The three that cause most failures **1. Funds on the wrong network.** A wallet with USDC on Ethereum cannot pay an offer on Base. Look at which networks the endpoint accepts in the [402 checker](https://www.ask402.ai/tools/402-checker), then fund that network. **2. Timing.** An `exact` payment is valid only inside a short window, set by `maxTimeoutSeconds`. A slow client, a queue, or a wrong system clock pushes it outside the window. Sign and send in one step. **3. Reusing a signed payment.** Each authorization works once. Retrying a request with the same payment header fails. Sign a new one for each attempt. ## Other reasons a payment is refused - **Screening.** Some facilitators run sanctions and transaction checks and can decline a payment on those grounds. - **Rate limits.** A `429` is not an x402 error. Slow down and retry after the time the server gives. - **A plain `400`.** The payment header was malformed before any x402 check ran. ## Avoiding a double charge If a request times out after you sent a payment, you may not know whether it settled. Before paying again, check the wallet's recent transfers or the transaction named in the receipt. Some services also accept an idempotency key so that a retry does not charge twice. Check the service's documentation. ## Sources - [x402 version 2 specification (error codes)](https://github.com/x402-foundation/x402/blob/main/specs/x402-specification-v2.md) - [x402 version 2 HTTP transport specification](https://github.com/x402-foundation/x402/blob/main/specs/transports-v2/http.md) - [x402 FAQ](https://docs.x402.org/faq) - [Coinbase CDP facilitator documentation](https://docs.cdp.coinbase.com/x402/seller/facilitator) --- Facts checked against the sources above on 2026-11-20. Canonical page: https://www.ask402.ai/x402/x402-error-codes