x402
An open payment protocol that uses the HTTP 402 Payment Required status code so clients, including AI agents, can pay for web resources with signed stablecoin authorizations.
x402 turns a paid API call into a short exchange over plain HTTP. The client requests a resource; the server answers with HTTP 402 Payment Required and the payment terms (amount, token, recipient). The client signs a payment authorization and resends the request with it in a header (X-PAYMENT in v1, PAYMENT-SIGNATURE in v2). An x402 facilitator then verifies the payment and settles it on chain. On EVM chains the authorization is an EIP-3009 transferWithAuthorization, not a transaction the client broadcasts itself.
Because no account or API key is needed, x402 suits AI agents that pay for data and tools on their own. Since July 2026 the protocol is run by the x402 Foundation at the Linux Foundation.
The security-relevant property is that verify, serve and settle are separate moments. A server that serves before settlement can be paid once and serve many times (a replay attack), and a server that checks a payment against request-carried terms instead of its own route terms has weak payment binding.
Related Terms
HTTP 402 Payment Required
The HTTP status code a server returns when a resource requires payment, which the x402 protocol uses to send payment terms to the client.
x402 Facilitator
The service in the x402 protocol that verifies a client's signed payment against the server's payment terms and settles it on chain, often paying the gas on the client's behalf.
EIP-3009
An Ethereum token standard, implemented by USDC, whose transferWithAuthorization function moves tokens on the strength of a signed message from the holder, with a validity window and a single-use nonce.
Payment Binding
The check that a payment matches the exact resource, amount, recipient and expiry of what is being bought, using the seller's own terms rather than terms supplied with the request.
AI Agent
Autonomous software system powered by a large language model that can perceive, reason, and execute actions — including signing blockchain transactions — without continuous human oversight.
Need expert guidance on x402?
Our team at Zealynx has deep expertise in blockchain security and DeFi protocols. Whether you need an audit or consultation, we're here to help.
Get a Quote