Coinbase X402 Explained: HTTP-Native Payments for AI Agents

The HTTP 402 status code has existed since 1991. The original spec said it was “reserved for future use” — intended for paid web content that never quite arrived. In 2025, Coinbase figured out what to do with it.

X402 turns 402 into a real payment protocol. An agent requests a resource, gets back a 402 with payment instructions, pays, and retries. The entire transaction happens in the HTTP exchange — no checkout, no billing integration, no human in the loop.


X402 HTTP payment flow — agent sends request, receives 402 with payment instructions, pays via blockchain, retries and gets resource

How x402 works

The protocol is straightforward. Three steps:

  1. Agent requests a resource. Standard HTTP GET or POST to an API endpoint.
  2. Server returns 402. The response includes a machine-readable payment instruction: amount, currency, payment address, expiry.
  3. Agent pays and retries. The agent submits payment to the specified address, includes proof of payment in the retry request, and receives the resource.
GET /api/data HTTP/1.1

HTTP/1.1 402 Payment Required
X-Payment-Required: {"amount": "0.001", "currency": "USDC", "address": "0x...", "expires": 1741600000}

# Agent pays 0.001 USDC to 0x...
GET /api/data HTTP/1.1
X-Payment-Proof: "0xtxhash..."

HTTP/1.1 200 OK
Definition — X402
X402 is an HTTP-native payment protocol that uses the existing 402 Payment Required status code to negotiate machine-to-machine payments. A server returns a 402 with payment instructions; the paying agent settles on-chain and retries with proof. No intermediary, no billing integration, no human approval required. Settlement is cryptographic and final.
— ATXP

What Coinbase built

The x402 protocol spec is open. What Coinbase built is the infrastructure that makes it practical:

Coinbase Developer Platform (CDP) — wallet provisioning for agents. An agent without a wallet can’t pay x402 invoices. CDP lets developers provision crypto wallets programmatically, fund them with USDC, and give agents signing keys. The wallet problem is the first thing you hit when trying to implement x402.

"You need a wallet and funds for any of the X402 services to work. We provision a wallet and can get you into the right currency and blockchain that support X402, but it's not entirely clear what's going to work — or not — until you try. And sometimes that confuses people because they don't know where to look or what went wrong."
Louis AmiraLouis Amira, co-founder, Circuit & Chisel

Base + USDC — the settlement layer. X402 payments in Coinbase’s implementation settle in USDC on Base, Coinbase’s Ethereum L2. Transaction costs are low enough that sub-cent payments are economically viable. A $0.001 data query is feasible; paying the same amount on Ethereum mainnet would cost more in gas than the transaction itself.

Developer tooling — SDKs for both sides of the exchange. The x402-axios package wraps HTTP requests with automatic payment handling. The server-side middleware validates payment proofs. Both sides need to opt in for the protocol to work.


What x402 is good for

The protocol is well-suited for API-to-API micropayments where both sides are developer services:

Use caseWhy x402 fits
Data API (per query)Sub-cent per call, no billing integration needed
AI model endpointsToken-priced access without API key management
Compute-as-a-servicePer-millisecond billing with programmatic settlement
Content APIsPer-article or per-request access without subscriptions

The common thread: small amounts, high frequency, both sides programmable. Human billing cycles (monthly invoices, credit card charges) don’t fit these patterns. X402 does.


What x402 is not good for

General merchant commerce. No SaaS subscription billing via x402. No e-commerce. Merchants won’t accept USDC on Base for a software license or a hotel booking. Virtual cards remain the only model with universal merchant acceptance.

Broad agent commerce today. The x402 ecosystem in 2026 is measured in hundreds of services, not millions. An agent tasked with purchasing from arbitrary merchants will need a virtual card for the vast majority of transactions.

Non-crypto stacks. X402 settlement is on-chain. If your agent infrastructure doesn’t include wallet management, x402 requires an additional integration layer.


X402 and ATXP

X402 and ATXP’s IOU model are complementary, not competing. They solve different problems at different layers:

DimensionX402IOU tokens
Payment layerRequest-level (per HTTP call)Function-level (per tool call)
SettlementOn-chain (USDC/Base)Internal balance
AdoptionHundreds of servicesATXP tool catalog (14+)
Min transactionSub-cent (gas permitting)Sub-cent
Card feesNoneNone
External merchant supportNoNo

ATXP supports x402 routing for services that accept it, alongside IOU tokens for ATXP’s own tool catalog. An agent can use both in the same run.


npx atxp

IOU tokens for tool calls, x402 routing where supported. Agent payment protocols compared → · Three payment models → · Virtual cards vs IOU tokens →


Frequently asked questions

What is x402?

An HTTP-native payment protocol using the existing 402 status code. Server returns payment instructions; agent pays and retries. Settlement is on-chain (USDC/Base in Coinbase’s implementation).

What did Coinbase contribute to x402?

Wallet provisioning (CDP), USDC/Base as the settlement layer, and developer SDKs for both paying agents and receiving servers. The protocol spec is open; Coinbase built what makes it practical.

Is x402 production-ready?

For developer API-to-API payments within the Base ecosystem, yes. For general agent commerce, no — adoption is still small. Most production agents still rely on virtual cards and IOU tokens for the majority of their needs.

How does x402 relate to IOU tokens?

Different layers. X402 handles external service payments (one payment per HTTP request). IOU tokens handle internal tool billing (per-call deduction from a pre-funded balance). Use both in the same stack.

Does x402 work with existing merchants?

No. X402 requires the merchant/server to implement the protocol. SaaS vendors, retailers, and most web services don’t support it yet. Three payment models →

What’s the minimum viable x402 transaction?

Sub-cent, depending on Base gas costs. USDC micropayments on Base are economically feasible at the $0.001 level where card network fees would exceed transaction value.