Glitch-art illustration of a stylised X shape constructed from green and purple geometric blocks, connected to a chain link, with purple data streaks and pixel distortion.
x402 turns HTTP's long-dormant "Payment Required" status code into a working payment rail for machines.

Coinbase's x402 protocol embeds stablecoin payments directly into HTTP requests, letting AI agents pay for APIs, data, and compute without human intervention. Here's how it works and why Stripe, Cloudflare, and others are backing it.

What Is Coinbase's x402 Protocol? | Nakamoto Daily

AI agents are getting good at complex tasks. They can research, write code, analyse data, and manage workflows. But the moment they need to pay for something, they hit a wall. They can't open bank accounts, they can't enter card details, and traditional payment processors weren't built for machines making thousands of tiny transactions per hour.

Coinbase built the x402 protocol to fix that. It's an open-source payment standard that bakes stablecoin payments directly into the web's existing infrastructure. Since launching in May 2025, it has processed tens of millions of transactions and attracted backing from Cloudflare, Stripe, Circle, and AWS.

This guide covers how x402 works, what it's being used for, and why it matters beyond just crypto.

The Problem x402 Solves

Traditional payment systems were designed for humans. You browse a website, add items to a cart, type in your card number, click pay. That flow assumes a person with a bank account is on the other end. It doesn't work when the buyer is a piece of software.

AI agents need to pay for things constantly: API calls, compute time, data feeds, content access. These transactions are often tiny (fractions of a penny) and frequent (thousands per hour). Credit card fees alone make micropayments unviable through traditional rails. And the setup process, creating accounts, managing subscriptions, entering credentials, requires human intervention that defeats the purpose of autonomous agents.

x402 removes those barriers. It lets any HTTP request carry a payment. No accounts, no subscriptions, no card details. Just a stablecoin transfer baked into the same protocol your browser already uses to load web pages.

How x402 Works

The name comes from HTTP status code 402, which has been part of the web's specification since the late 1990s. The code was originally reserved for "Payment Required" but was never properly implemented. x402 finally puts it to use.

The protocol works by inserting a payment gate into standard web interactions. When a client (human or AI agent) requests a resource that costs money, the server responds with a 402 status code and payment instructions. The client signs a stablecoin transaction from its wallet, attaches the proof to a new request, and gets access. The whole process takes about two seconds.

There are no processing fees from the protocol itself. Users pay only the blockchain transaction fee, which on Layer 2 networks like Base is often less than a penny. The protocol is also chain-agnostic, supporting payments across Base, Solana, Ethereum, Polygon, and others.

The Payment Flow

x402 follows the same request-response pattern as any normal web interaction, just with a payment step in the middle.

1
Request. A client sends a standard HTTP request. This could be a user loading an article, or an AI agent calling an API for price data.
2
402 Response. The server replies with a 402 Payment Required status, including the price, the stablecoin accepted, the wallet address, and which blockchain to use.
3
Payment. The client signs a transaction from its crypto wallet and resends the request with payment proof attached in the header.
4
Verification. A facilitator (like Coinbase's CDP) verifies the payment is valid and settles it on-chain.
5
Access. The server delivers the requested resource. Total time from request to delivery: roughly two seconds.

For developers, implementation is minimal. Coinbase provides middleware for Express, Hono, and Next.js. Vercel built an x402-next wrapper. In most cases, adding a payment gate to an API endpoint takes a few lines of code.


Use Cases: AI Agents

This is where x402 was designed to shine. As businesses delegate more complex work to AI agents, those agents need to transact independently. x402 makes that possible without requiring human support for each payment.

Pay-per-call API access

Developers can turn any API into a pay-as-you-go resource. An AI agent tracking asset prices or supply chain data pays per request instead of committing to a monthly subscription. This is particularly useful for agents that need data from dozens of different sources, each for a short period.

Self-funding compute

Instead of relying on pre-purchased compute credits, agents can pay per inference. They scale up during heavy workloads and scale down when idle. GPU provider Hyperbolic has already implemented pay-per-inference access through x402.

Agent-to-agent commerce

x402's framework allows AI agents to transact with each other. This opens the door to machine marketplaces where agents trade data, services, and compute among themselves without human intermediaries.

Web services access

Agents can pay for access to software tools, email services, private datasets, and research databases. CoinGecko, for example, uses x402 to manage access to its on-chain data feeds.

Use Cases: Humans

x402 was built for machines, but humans benefit too. The protocol enables payment models that haven't been practical until now.

Per-article access

Publications can charge per article instead of forcing monthly subscriptions. A reader pays a fraction of a cent to read one piece, without creating an account or entering payment details.

Metered services

Web services can switch to genuine pay-as-you-go pricing. Instead of a flat monthly fee, users pay proportionally to what they actually use. Think a dating app charging per swipe instead of $20/month, or a design tool charging per export.

Creator monetisation

Creators can place one-click payment gates on content, social media groups, or premium resources. No platform middleman taking a cut. Payment goes directly to the creator's wallet.

Privacy

x402 payments don't require entering bank details or creating accounts on every platform you use. That's a meaningful improvement for users concerned about data exposure across dozens of services.


Who's Using It

Adoption has been growing steadily since the May 2025 launch. Here are some of the notable integrations.

Partner Integration Status
Stripe USDC payments for AI agents on Base via PaymentIntents API Live
Cloudflare x402 transaction support, co-founded x402 Foundation Live
Hyperbolic Pay-per-inference GPU access for AI agents Live
CoinGecko Pay-per-call access to on-chain data feeds Live
Vercel x402-next middleware for paywall-protected API routes Live
Circle AI agent demo paying USDC for blockchain risk reports Demo
Chainlink USDC payment required for VRF-powered NFT minting on Base Demo

Coinbase and Cloudflare have also announced the x402 Foundation, an independent body to govern the protocol as an open, neutral standard. The foundation is designed to prevent any single company from controlling the protocol's direction.

x402 V2 and What's New

V2 of the protocol launched in December 2025 after a community feedback period. It addresses several limitations from the original version.

Key V2 Updates
  • Wallet-based identity. Clients can now skip the full payment flow on repeat visits if the resource was previously purchased. This enables subscription-like and session-based access patterns.
  • Any ERC-20 token. Using Uniswap's Permit2 system, x402 now supports payments in nearly any ERC-20 token, not just USDC. Coinbase's facilitator handles gas sponsorship so users never need to hold a gas token.
  • Plugin-driven architecture. Adding support for new blockchains or payment models no longer requires changes to the core protocol. Developers register chains, assets, and schemes as standalone packages.
  • Dynamic payment recipients. Payments can now be routed to different wallets based on the request, enabling marketplace-style applications where revenue is split between multiple parties.
  • Multi-chain via CAIP standards. The protocol now uses Chain Agnostic Improvement Proposals for network identification, making it easier to support new chains without protocol changes.

The V2 SDK is fully backward-compatible with V1 integrations. Coinbase's hosted facilitator supports ERC-20 payments on Base, Polygon, and Solana with a free tier of 1,000 transactions per month.


The Competitive Landscape

x402 isn't the only protocol trying to solve machine payments. As of March 2026, there are several competing standards, each with different strengths.

Protocol Approach Backed By
x402 Per-request stablecoin payments over HTTP. Open, permissionless, zero protocol fees. Coinbase
MPP Session-based streaming payments. Supports both stablecoins and fiat. Launched March 2026. Stripe
ACP Standardised checkout flows between AI agents and merchants. First deployed in ChatGPT. OpenAI
AP2 Trust and authorisation layer using cryptographically signed mandates. Supports card and crypto. Google

These protocols aren't necessarily competing head to head. x402 is strongest for per-request micropayments and permissionless API monetisation. Stripe's MPP handles higher-throughput scenarios with built-in compliance. OpenAI's ACP focuses on checkout flows. Google's AP2 covers trust delegation. Agents that operate across multiple domains will likely use elements of several.

Notably, Stripe supports both x402 and its own MPP through separate integration paths. That's a strong signal that the industry expects multiple standards to coexist rather than one protocol winning outright.

What's Next

The x402 Foundation is preparing to launch formally, with governance structures designed to keep the protocol vendor-neutral. Future plans include a discovery layer (called Bazaar) that lets buyers find available x402-gated services, support for additional payment flows like credit-based billing, and optional attestations for sellers to enforce KYC or geographic restrictions.

Coinbase reported that x402 enabled over $200 million in annualised transactions within its first 30 days of operation. On-chain analysis from March 2026 shows roughly 131,000 daily transactions with an average payment of around $0.20. Those numbers are modest by traditional payment standards, but for a protocol that's less than a year old and targeting a market (autonomous AI commerce) that barely existed before it, the trajectory matters more than the current volume.

The bigger picture is that payments infrastructure is being rebuilt for a world where machines are both the buyers and the sellers. x402 is one of the earliest and most credible attempts at that, and the coalition forming around it (Coinbase, Cloudflare, Stripe, Visa, Google) suggests it won't be the last we hear about it.

Disclaimer: This article is for educational purposes only and does not constitute financial or investment advice. Cryptocurrency investments carry significant risk, including the potential loss of all capital. Always conduct your own research and consult a qualified financial advisor before making investment decisions.