What is x402? The HTTP 402 payment protocol explained

Published 2 Dec 2026 · Updated 3 Dec 2026 · By Editorial desk

Bar chart: Base is named by 105 of 142 x402 projects, Solana by 66, Ethereum by 30, Polygon by 22 and Arbitrum by 21

x402 is the payment step the web never had. A server that wants money for a request answers with status 402 Payment Required and a machine-readable price; the client pays and sends the same request again; the server returns the data. No sign-up, no API key, no invoice. This guide explains the parts, the exact sequence and the vocabulary, then shows what the ecosystem looks like across the 142 projects in this index.

Contents

Why HTTP 402 needed a protocol

Status code 402 has been reserved in HTTP since the 1990s with no agreed meaning. x402 gives it one. The x402 docs describe it as "the open payment standard" for charging for API access and content directly over HTTP, so that clients can pay "without accounts, sessions, or credential management". The specification lives in the x402-foundation/x402 repository under the Apache-2.0 licence.

That matters most for software that pays on its own. An AI agent calling a search API, a data feed or another agent cannot fill in a checkout form. With x402 the price arrives in the response it already parses.

The four roles in a payment

Role What it does Listed here
Client and wallet Holds funds, signs the payment, retries the request 21 x402 wallets
Resource server The API that names a price and returns data once paid 45 pay-per-call APIs
Facilitator Verifies the signed payment and settles it on chain 28 x402 facilitators
Libraries SDKs and middleware that implement the steps 31 SDKs and 15 middleware packages

13 of the 142 projects play more than one role, for example a facilitator that also ships an SDK, and a project can be filed in more than one list: 3 libraries sit in both SDKs and middleware. So the list counts in the table (140, plus 5 explorers) add up to 145, more than the 142 projects. The chart below counts every role a project plays, so its bars are larger again (47 paid APIs against 45 in the list).

Bar chart of the roles x402 projects play: paid APIs 47, SDKs 35, facilitators 28, wallets 23, server middleware 17, explorers 5

One payment, step by step

The x402 docs describe five steps between buyer and seller:

  1. The client requests a resource.
  2. If payment is required, the server responds with 402 and payment instructions: scheme, network, asset, amount and the address to pay.
  3. The client prepares a signed payment payload and sends the request again with it.
  4. The server verifies and settles the payment itself, or calls a facilitator's /verify and /settle endpoints.
  5. If the payment is valid, the server returns the resource.

In the current version the requirements, the signed payment and the settlement result travel in three headers, listed on the MPP comparison page as PAYMENT-REQUIRED, PAYMENT-SIGNATURE and PAYMENT-RESPONSE. Stripe's x402 guide shows the first one in practice: a curl -iv against a paid route returns HTTP/1.1 402 Payment Required with a payment-required header holding a base64 payload. You can see the same thing for any public endpoint with the 402 header debugger.

The exact scheme moves a fixed amount per request. The upto scheme authorises a ceiling and settles what was used. Of the 28 facilitators listed here, 13 name the exact scheme and 7 name upto.

What it costs

The docs are direct: "x402 as a standard has 0 fees built in." Costs come from the parts around it:

  • Facilitator fees, where a facilitator charges. Only 4 of the 28 facilitators here publish a pricing model, so read each one's docs.
  • Network fees on the chain that settles. 10 of the 28 facilitators name gas sponsorship, which moves that cost off the payer.
  • The price the API sets per call, which is the point of the exercise.

The ecosystem in figures

Counted from the 142 projects in this index on 3 December 2026, each from its own README, docs or Bazaar listing:

Chain Projects naming it (of 142)
Base 105
Solana 66
Ethereum 30
Polygon 22
Arbitrum 21
Monad 12

130 projects name at least one chain, so 12 name none. On assets, 116 of the 142 projects name USDC (118 name any asset); SOL (19) and ETH (17) follow. 61 of 142 are open source and 75 have a public repository. A name in a README is not a test: check the source link on each profile before you commit to a chain.

Glossary

402 Payment Required. The HTTP status a server returns when a request needs payment. x402 defines what goes with it.

Payment requirements. The machine-readable offer in the 402 response: scheme, network, asset, amount, pay-to address.

Facilitator. A service that verifies a signed payment and settles it on chain for the resource server. See the facilitator comparison guide.

Scheme. The rule for how much moves: exact for a fixed amount, upto for a ceiling with metered settlement.

Bazaar. The public discovery listing where x402 services publish their endpoints, networks and prices. This index shows its call counts as reported and never scores them.

Pay-to address. The on-chain address that receives the payment, set by the seller.

Agent wallet. A wallet an AI agent controls through code, usually with spend limits.

How every figure on this site is collected is on the methodology page.

Guides