The internet was built on a simple economic model: either you pay with money, or you pay with attention (ads). But AI agents don't have eyeballs. They can't watch ads. So how do they pay for services?
Enter x402 — a protocol that lets AI agents make instant cryptocurrency micropayments to access APIs and services. It's HTTP 402 (Payment Required) finally fulfilling its destiny.
The Problem: Agents Need to Transact
Current payment methods don't work for agents:
- Credit cards require human identity verification
- Subscriptions assume a single user
- API keys with billing require human signup
- Free tiers are rate-limited and unreliable
What agents need is pay-per-request, instantly, without human intervention.
How x402 Works
- Agent requests a resource (standard HTTP)
- Server responds with 402 Payment Required — includes price and payment address
- Agent constructs and signs a crypto payment
- Agent retries with payment proof in the header
- Server verifies and serves the resource
The entire flow happens in milliseconds. No signup. No API keys. Just pay-per-use.
The Stack
x402 runs on Layer 2 blockchains (Base, Arbitrum) for sub-cent fees:
- Payment tokens: USDC (stable, predictable)
- Transaction costs: Sub-cent on L2s
-
Headers:
X-Paymentcarries the signed proof
A typical payment: $0.001 for an API call — impossible with credit cards, trivial on-chain.
Real Applications
API Marketplaces
Agents discover and pay for weather data, sentiment analysis, image generation on the fly. No pre-subscriptions.
Agent-to-Agent Commerce
A data-cleaning agent charges per record. A translation agent charges per word. The entire agent economy runs on micropayments.
GEO Connection
Services accessible to agents via x402 get used more, mentioned more, and become part of the AI knowledge ecosystem. Tools like XanLens track how brands appear in AI responses — accessible services show up more often.
The Bigger Picture
x402 enables:
- Permissionless commerce between agents
- Dynamic pricing based on real-time demand
- Direct monetization without intermediaries
- Composable services agents discover autonomously
We're moving from a web where humans browse and buy to one where agents transact autonomously. x402 is the plumbing.
The agents are coming. They have wallets. Is your service ready?
Top comments (0)