Monday, October 19, 2026
Learn / Crypto basics

What is x402 and how does it work?

x402 is an open payment protocol that uses the HTTP 402 Payment Required code so apps and AI agents can pay for web content or APIs, often in stablecoins.

Crypto basics Illustration: Cryptoweek

x402 is an open payment protocol that lets a website or API ask for payment inside a normal web request, and lets the client pay without an account, card form or subscription. It was built so that software, including AI agents, can pay small amounts automatically. Payments usually settle on a blockchain in stablecoins, though the standard is designed to support other currencies too.

What is the x402 protocol?

The name comes from HTTP status code 402, Payment Required. The code has been in web standards for decades but was reserved for future use, and MDN notes that no standard convention for it exists. x402 gives it one.

Coinbase incubated x402 and released it as open source in May 2025. The project describes itself as network, token and currency agnostic, and says facilitators and servers should not be able to move funds beyond what the paying client intended. A December 2025 version 2 added multi-chain support by default and hooks for traditional rails such as ACH and cards.

What is x402 payment and how does it work?

The flow in the project's documentation runs like this:

  1. A client requests a resource, such as an article or API call.
  2. The server replies with a 402 response listing accepted payment options.
  3. The client picks one, signs a payment, and resends the request with it attached.
  4. The server checks the payment itself or through a facilitator, a service that verifies and settles payments on-chain.
  5. The server delivers the resource with a receipt.

The first payment scheme, called exact, charges a fixed amount. Coinbase runs a hosted facilitator that, as of October 2026, supports Base, Polygon, Arbitrum, World and Solana among other networks. Our guides to what a stablecoin is and Base cover the assets and networks most often involved.

What is x402 used for?

The main pitch is machine-to-machine payments. An AI agent can pay per request for data, tools or content without a human entering card details. Publishers and API providers can charge tiny amounts per use instead of selling subscriptions. The Block reported that x402 processed over 100 million payments in roughly its first six months.

What is the x402 Foundation?

On September 23, 2025, Cloudflare announced it would create the x402 Foundation with Coinbase to advance x402 as an open internet standard for payments. Cloudflare also said it would add x402 tools to its Agents SDK and proposed a deferred payment scheme for batched or subscription-style charges. The main code repository has since moved to an x402-foundation organization on GitHub. For how businesses take crypto more broadly, see how businesses accept crypto payments.

This guide explains how things work. It is not financial, legal or tax advice. Last updated .