# x402 Protocol (HTTP 402 Payments for AI Agents)
Source: https://coinweb.com/wiki/x402-protocol/
Type: wiki | Publisher: Coinweb.com (Independent Web3 Research Platform)
Author: Julia Zakharchuk (Senior Crypto Author & Web3 Analyst)
Fact-Checked By: Phillip Lord (Crypto Payments & Banking Fact-Checker)
Last Updated: 2026-11-29
## Quick Definition
x402 is an open internet payment protocol that activates the long-unused HTTP 402 'Payment Required' status code, letting autonomous AI agents and browsers pay per API call instantly in stablecoins like USDC without accounts or API keys.

## Key Takeaway
x402 turns any standard HTTP API endpoint into a pay-per-request stablecoin rail: a server replies with HTTP 402 + price metadata, and an AI agent automatically signs a sub-cent USDC payment header to unlock the response in milliseconds.

What Is the x402 Protocol?

When HTTP was designed in the 1990s, status code 402 Payment Required was reserved for future digital cash—but credit cards could never profitably process $0.001 API calls or let software pay autonomously without human KYC. Introduced by Coinbase Developer Platform and adopted rapidly across the 2025–2026 AI-agent ecosystem, the x402 protocol finally activates HTTP 402 using low-fee stablecoin rails (such as USDC on Base and Solana) so AI agents, MCP servers, and browsers can pay for data, compute, or market access on demand.

How an x402 Micropayment Flow Works

 
 
 Request: An AI agent sends a normal HTTP GET or POST request to a paid API or data endpoint (e.g., live market odds or research feed).

 
 HTTP 402 Challenge: The server responds with status 402 Payment Required and machine-readable JSON specifying the exact asset (e.g., USDC), amount (e.g., $0.01), network, and destination address.

 
 Signed Payment Header: The agent's wallet signs an EIP-3009 / gasless stablecoin authorization and retries the exact same HTTP request with an X-PAYMENT header.

 
 Instant Verification & Delivery: A facilitator verifies and settles the on-chain transfer in under a second, and the server immediately returns 200 OK with the requested payload.

 

 
 
 

 Feature 
 Traditional API Billing (Stripe/Cards) 
 x402 Protocol (Stablecoin HTTP 402) 
 

 
 
 

 Minimum Viable Payment 
 ~$0.50+ (due to $0.30 + 2.9% card fee) 
 $0.0001+ sub-cent micropayments 
 

 

 Onboarding & Accounts 
 Human signup, credit card, API key management 
 Zero signup—any wallet-equipped AI agent pays per call 
 

 

 Settlement Speed 
 T+2 to T+7 days + chargeback risk 
 &lt;2 seconds final on-chain settlement, zero chargebacks 
 

 
 

Why x402 Matters for Autonomous AI Agents

Autonomous trading bots and forecasting agents increasingly combine prediction markets for AI agents , Model Context Protocol (MCP) tools, and real-time data feeds. With x402, an agent no longer needs a human to pre-register credit cards on 50 different SaaS dashboards—it simply holds a budgeted USDC wallet with spending limits and pays pennies only for the exact inference calls, news scrapes, or odds feeds it actually uses.
## Frequently Asked Questions
### Does x402 work only on Base?
No. x402 is chain-agnostic—while Base USDC was the initial reference rail due to sub-cent gas and EIP-3009 gasless authorizations, x402 facilitators support multiple EVM Layer-2s and Solana.

### Do AI agents need ETH for gas to use x402?
With EIP-3009 ('transferWithAuthorization') supported by USDC, the AI agent signs an off-chain authorization and an x402 facilitator sponsors the minimal on-chain gas—meaning agents only need to hold USDC.

### How do operators prevent AI agents from overspending via x402?
Agent operators enforce hard per-call price ceilings, daily spend caps, and allowlisted vendor domains inside the agent's smart wallet or MCP payment middleware.
