What is x402?
Last Updated: April 28, 2026
x402 is an HTTP payment standard. A server returns the standard HTTP 402 Payment Required status with a structured payment requirements payload. The caller signs a USDC payment locally and retries with a payment header. The server verifies the signature, fulfills the request, and settles on-chain.
The full request flow
- Client makes a normal HTTP request:
POST /api/v1/chat/completions - Server replies
402 Payment Requiredwith payment requirements (amount, asset, recipient, network). - Client signs an EIP-3009
TransferWithAuthorizationpayload locally. The private key never leaves the device. - Client retries the same request with
X-Paymentheader containing the signed authorization. - Server verifies the signature, fulfills the request, and settles the USDC transfer on-chain. Settlement happens in the same request — non-custodial and instant.
Why does this exist?
AI agents can hold USDC. AI agents cannot hold a credit card. Subscriptions and prepaid credits assume a human is on the other end of the billing relationship — they break for autonomous agents that need to pay for one API call right now without an account, a signup form, or a billing email.
x402 reuses HTTP's existing 402 status code (it has been reserved for “future use” since 1997) and pairs it with stablecoin settlement. Per-request, no account, no minimum spend.
x402 on BlockRun
Every endpoint on BlockRun is x402-native. Send a request without a payment header, get a 402 response with the price for that exact call. Sign with your wallet, retry, get the response. No API key, no signup, no subscription.
We support x402 on Base mainnet, Solana mainnet, and XRPL. Settlement uses the Coinbase CDP facilitator (with PayAI as fallback). The full protocol spec lives at x402.org.