AI agents · OpenClaw · self-hosting · automation

Quick Answer

What Is the x402 Protocol? AI Agent Payments Explained

Published:

What Is the x402 Protocol?

x402 is an open-source, web-native payment standard created by Coinbase that lets AI agents and software pay for services using stablecoins — directly through HTTP requests. It operationalizes the long-reserved HTTP 402 Payment Required status code that has existed in the HTTP spec since the 1990s but was never widely implemented.

Last verified: March 2026

Quick Facts

DetailInfo
Created byCoinbase + Cloudflare
TypeOpen-source payment protocol
Payment methodUSDC and ERC-20 stablecoins
Use caseMachine-to-machine payments
StatusLive, expanding token support (March 2026)

How x402 Works

The protocol follows a simple request-response flow:

  1. AI agent requests a resource — Sends a normal HTTP request to an API or website
  2. Server returns HTTP 402 — Includes payment terms (amount, token, wallet address)
  3. Agent pays programmatically — Sends stablecoin payment on-chain
  4. Agent retries the request — Includes payment proof in headers
  5. Server delivers the resource — Verifies payment and responds normally

This all happens in a single interaction — no human clicks “confirm,” no credit card forms, no KYC checks.

Why x402 Matters

Traditional payment infrastructure was built for humans:

Traditional Paymentsx402
Requires human identityWorks for autonomous agents
Credit card formsProgrammatic stablecoin transfer
2-3 day settlementNear-instant on-chain settlement
Minimum transaction ~$0.50Micropayments possible
Requires payment processorPeer-to-peer via HTTP

As AI agents become more autonomous — browsing the web, calling APIs, purchasing services — they need a payment method that doesn’t require a human in the loop.

Real-World Use Cases

  • AI agents paying for API calls — Agent queries a premium data source and pays per request
  • Autonomous research — Agent pays to access paywalled content
  • Agent-to-agent commerce — One AI agent buys a service from another
  • Micropayments — Pay fractions of a cent per AI inference call

Ecosystem Integration

World AgentKit

Sam Altman’s World (formerly Worldcoin) launched AgentKit in March 2026, which integrates with x402 to add human identity verification — ensuring every AI agent transaction is backed by a verified human using World ID.

Coinbase Expansion

Coinbase expanded x402 in March 2026 to support any ERC-20 token, not just USDC, broadening the payment options for AI agents.

Competing Standards

ProtocolBackerApproach
x402Coinbase + CloudflareHTTP-native stablecoin payments
Machine Payments Protocol (MPP)Stripe + TempoBlockchain-native agent payments
Visa AI Agent ToolsVisaTraditional card rails for agents
Mastercard Agent PayMastercardCard-based agent payments

The emerging split: stablecoin protocols (x402, MPP) for agent-to-agent payments, and traditional card networks for agent-to-merchant payments.

Last verified: March 2026