Crypto
X402
Definition
X402 is an HTTP-native payments standard that uses HTTP 402 responses to request and verify programmatic payments for online resources.
What is x402?
x402 is an open payments protocol that makes paying for internet resources a built-in part of normal HTTP requests, using http 402 responses to signal that payment is required. Instead of creating accounts, managing API keys, or running a separate checkout flow, a client (including an AI agent) can be prompted to pay and then retry the same request with proof of payment attached. This design is increasingly relevant to the agent economy explained, where software agents need to buy data, tools, and compute autonomously through agentic payment flows.
x402 is a protocol for monetizing APIs, content, and services by embedding payment negotiation directly into HTTP. A typical flow looks like this: (1) a client requests a paid endpoint, (2) the server replies with an http 402 status and includes structured payment requirements (such as accepted networks or assets and the amount), (3) the client creates a payment and attaches a cryptographic proof to a follow-up request, and (4) the server validates that proof before returning the resource. Many implementations rely on a facilitator—an external component that helps verify, route, or settle the payment—so the server can focus on enforcing access rules without building a full payments stack.
X402 meaning
The “x402” meaning is best understood as “payments as a first-class HTTP interaction.” The name references the long-reserved HTTP status code 402 (Payment Required) and extends it into a practical, developer-friendly pattern: a server can respond with payment instructions, and a client can respond with a signed payment payload that the server can verify. In other words, x402 turns a paywall into a standard request/response loop rather than a separate billing system. This is especially useful for machine to machine payment scenarios, where the buyer is software that needs deterministic, automatable steps instead of human checkout pages.
X402 definition
A practical x402 definition is: a standardized way for HTTP servers to require payment and for HTTP clients to satisfy that requirement programmatically, typically using onchain value transfer and signed attestations. The “standardized” part matters: when the request and response headers follow a predictable format, generic clients (including agent frameworks) can pay many different services without bespoke integrations. That interoperability is what makes x402 more than a single vendor’s paywall—it’s a reusable interface for agentic payment, where the same client logic can purchase weather data, LLM tool calls, private feeds, or microservices on demand.
Why x402 matters
x402 matters because it reduces the friction between “I can reach this URL” and “I can pay for this resource,” which is a major bottleneck for automated commerce on the internet. Traditional monetization often forces users into accounts, subscriptions, prepaid credits, and API key management—patterns that are awkward for autonomous software and brittle at scale. By making payment a normal part of the HTTP lifecycle, x402 enables finer-grained pricing (including per-request access) and supports machine to machine payment without turning every service into a bespoke billing platform. As the agent economy explained expands, standards like x402 help agents discover, purchase, and use services safely and instantly, with fewer intermediaries and clearer, programmable rules.
Frequently Asked Questions
How does x402 use HTTP 402?
When a client requests a paid resource, the server can respond with an http 402 status to indicate payment is required. The response includes payment requirements, and the client retries the request with a signed payment proof that the server can verify.
Is x402 only for crypto payments?
X402 is designed to be network-agnostic and can support different rails, including crypto and potentially fiat-backed systems, depending on the implementation. In practice, many early integrations focus on stablecoins because they settle quickly and are easy to verify programmatically.
What is a facilitator in x402?
A facilitator is a service component that helps validate and/or settle the payment associated with an x402 request. It can reduce the burden on individual servers by providing shared verification logic, routing, and standardized settlement handling.
What is x402 used for?
X402 is commonly used to monetize APIs, paywall digital content, and charge for microservices on a per-request basis. It’s also well-suited to agentic payment use cases where AI agents need to buy tools or data automatically.
Why is x402 important for machine-to-machine payments?
Machine to machine payment requires deterministic, automatable steps rather than human checkout flows. x402 provides a predictable HTTP pattern—challenge with 402, then pay and retry—so software clients can purchase access across many services with minimal custom integration.
Related Terms
Stablecoin
A stablecoin is a type of cryptocurrency designed to maintain a stable value, typically pegged to a fiat currency like the US dollar, to mitigate the price…
Permit2
Permit2 is a Uniswap-built smart contract that lets users grant and use ERC-20 token approvals via signatures with expirations and safer, more flexible…