x402 Protocol

The HTTP standard for AI agent payments. Coinbase's x402 protocol uses HTTP 402 Payment Required to enable pay-per-request API access using USDC on Base L2.

What is x402?

The x402 protocol revives the long-dormant HTTP 402 “Payment Required” status code, transforming it into a standardized mechanism for AI agents to pay for API access, digital content, and computational resources in real-time.

Developed by Coinbase, x402 enables any HTTP server to gate resources behind a payment wall that AI agents can autonomously negotiate and fulfill — no human intervention required.

How It Works

The x402 payment flow follows a simple challenge-response pattern:

  1. Agent requests a resource — sends a standard HTTP GET/POST request
  2. Server responds with 402 — includes payment requirements in headers (asset, amount, network, payTo address)
  3. Agent signs an EIP-3009 authorization — gasless USDC transfer on Base L2
  4. Agent resubmits request with payment proof — includes signed authorization in X-PAYMENT header
  5. Payment facilitator verifies and settles — confirms payment on-chain
  6. Server delivers the resource — responds with 200 OK

Key Technical Details

  • Payment Asset: USDC (USD Coin) on Base L2
  • Authorization Standard: EIP-3009 (gasless transferWithAuthorization)
  • Settlement Network: Base (Coinbase’s L2 on Ethereum)
  • Payment Schemes: exact (fixed price) and more planned
  • Facilitator Model: Third-party payment verification and settlement

Use Cases

  • API Monetization — charge per-request for data feeds, AI model inference, and compute
  • Content Paywalls — AI agents pay to access premium content and research
  • Agent-to-Agent Payments — autonomous services billing each other
  • Micropayments — sub-cent transactions viable on Base L2
  • Data Marketplace — pay-per-query access to proprietary datasets

Why It Matters

x402 is the first protocol to standardize machine-to-machine payments at the HTTP layer. By using an existing HTTP status code, it requires minimal server-side changes and works with any HTTP client — making it the most frictionless path to enabling AI agent payments.

The x402 protocol turns every API endpoint into a potential revenue stream for AI agents.

Our x402 Services

  • Protocol Assessment — evaluate your infrastructure’s readiness for x402 integration
  • Server Implementation — deploy x402-enabled endpoints with proper payment gating
  • Agent Integration — build AI agents that can autonomously pay for x402-gated resources
  • Facilitator Setup — configure payment verification and settlement infrastructure
  • Security Audit — ensure your x402 implementation is production-grade and secure

Get Started for Free

Schedule a free consultation with our payment infrastructure team. 30-minute call, actionable results in days.

Talk to an Expert