HTTP status code 402 has been "reserved for future use" since 1997. Twenty-eight years of sitting there in the spec, waiting for someone to figure out how to make payments work natively on the web.
The future finally showed up. And it looks different than most people expected.
What x402 Actually Is
Let me start with the basics because there's a lot of confusion floating around about this.
x402 is a protocol for per-request API payments. When a client makes an HTTP request to an x402-enabled endpoint, the server can respond with a 402 status code and a payment requirement. The client pays (in USDC on the Base network), includes proof of payment in the request header, and the server fulfills the request.
The whole cycle takes about two seconds. There are no API keys, no subscriptions, no invoices. You pay for what you use, at the moment you use it.
Here's what the flow looks like in practice:
- Client sends a request to
api.example.com/data - Server responds:
402 Payment Required, with a header specifying the price (say, $0.01 in USDC) and a payment address - Client's wallet signs a USDC transfer on Base
- Client re-sends the request with the payment receipt in the
X-Paymentheader - Server verifies payment, serves the response
That's it. Five steps. The payment is settled on-chain, verifiable by both parties, and costs a fraction of a cent in gas fees because Base is cheap.
Why This Is Different from Previous Micropayment Attempts
I'm old enough to remember when micropayments were going to save journalism. Then save music. Then save the web. They never did. The transaction costs were too high, the user experience was terrible, and nobody wanted to make a payment decision for every article they read.
So why is this time different? I'll be honest: I'm not 100% sure it is. But there are a few things that have changed.
The payers are agents, not humans. The user experience problem with micropayments was always about humans. People don't want to click "pay $0.02" a hundred times a day. But AI agents don't care. They can make payment decisions programmatically, at machine speed, without decision fatigue. The UX problem goes away when there's no U.
The transaction costs finally work. On Base (Coinbase's L2 on Ethereum), a USDC transfer costs a fraction of a cent in gas. That means a $0.01 payment is economically viable. Try that on Ethereum mainnet and you'd spend $3 in gas to send a penny. The infrastructure caught up.
USDC is stable and widely held. Previous micropayment schemes required you to buy some bespoke token that nobody wanted to hold. USDC is a dollar. It's boring, which is exactly what you want for a payment medium. No speculation, no volatility, just money.
What This Changes for APIs
I've been running API businesses in various forms for most of my career, and the pricing models have always been awkward. Monthly subscriptions penalize light users and subsidize heavy ones. Tiered pricing creates cliff effects where going from 999 to 1001 requests doubles your bill. Annual contracts lock people in and create churn spikes at renewal time.
Per-request pricing sounds simple, but it was always impractical because of the overhead. You needed billing infrastructure, usage tracking, invoice generation, payment processing. All of that infrastructure cost money, which set a floor on how cheap a request could be.
x402 collapses all of that. The payment is the request. There's no billing cycle, no usage tracking (the blockchain is the ledger), no invoice. The marginal cost of charging for a request approaches zero.
This means you can charge $0.001 for an API call and it's still profitable. That opens up services that were previously impossible to monetize. A weather data endpoint that charges a tenth of a cent per query. A code analysis tool that charges per file reviewed. A persona research query that charges two cents per interview question.
Why This Matters for Agents
Here's where it gets interesting. If you're building AI agent workflows, your agent needs to call external services. Some of those services cost money. How does the agent pay?
Today, the answer is: the human sets up API keys tied to billing accounts, pre-approves spending, and hopes the agent doesn't go overboard. It's clunky. It requires human setup for every new service. And it means agents can't autonomously discover and use new services without someone first creating an account and adding a payment method.
With x402, an agent can discover a new service, check the price (published in the agent card), decide whether the cost is justified, and pay for it, autonomously, within whatever bounds the human set ("you can spend up to $10/day on research services").
This is the difference between an agent that can use the five tools you configured and an agent that can use any tool on the network. That's a big difference.
Concrete Examples
Let me make this concrete with things we're actually doing at SocioLogic:
Persona queries: Our persona research API charges $0.02 per query via x402. An OpenClaw user can ask their AI assistant to "interview 10 personas about this product concept" and the assistant makes 10 x402 calls, paying $0.20 total. No account creation, no API key, no subscription. The user's USDC wallet funds it automatically.
Web research: Our web scraping service charges $0.005 per page scraped. An agent building a competitive analysis might scrape 50 pages, costing $0.25. Compare that to a $99/month scraping subscription that mostly sits idle.
Random number generation: Even our RNG service (cryptographically secure random numbers with verifiable entropy) charges per call via x402. A fraction of a cent per random number. Nobody would buy a subscription for random numbers. But paying per call? That makes sense.
The Hard Parts
I'd be dishonest if I didn't mention what's still hard.
Wallet management is still painful. Someone has to fund the USDC wallet and manage private keys. For developers this is tractable. For non-technical users, it's a real barrier. We're working on custodial options that abstract this away, but we're not there yet.
Refunds don't exist. On-chain payments are final. If a service takes your money and returns garbage, you have no recourse built into the protocol. You'd need a separate dispute mechanism. We handle this through verification (don't pay unverified services) and spending limits (cap your losses), but it's not as clean as credit card chargebacks.
Regulatory uncertainty. USDC payments for API services are in a gray area in many jurisdictions. We're not a money transmitter, we think, but the regulatory frameworks weren't designed for machines paying machines in stablecoins. This will shake out eventually, but "eventually" might be a while.
Cold start problem. For x402 to be useful, services need to accept it and clients need to support it. Right now, both sides are small. We're building both sides simultaneously (our services accept x402, our CLI pays with x402), but the ecosystem is still early.
Where I Think This Goes
Prediction is hard, especially about the future. But if x402 works the way I think it might, per-request pricing becomes the default for agent-to-agent services. Not because it's theoretically elegant, but because it's the only model that works when your customers are autonomous programs that need to make spending decisions in real time.
Subscriptions will still exist for human-facing products. Humans like predictable bills. But the agent-facing economy will be transactional. Pay per call. Every call.
HTTP 402 waited 28 years for its moment. I think the moment is now. But I've been wrong before, and the history of micropayments should make anyone cautious. We'll see.