Skip to main content

Overview

By reviving the HTTP 402 Payment Required status code, x402 lets services monetize APIs and digital content onchain, allowing clients, both human and machine, to programmatically pay for access without accounts, sessions, or complex authentication.

Who is x402 for?

  • Sellers: Service providers who want to monetize their APIs or content. x402 enables direct, programmatic payments from clients with minimal setup.
  • Buyers: Human developers and AI agents seeking to access paid services without accounts or manual payment flows.
Both sellers and buyers interact directly through HTTP requests, with payment handled transparently through the protocol.

Use cases

x402 enables a range of use cases, including:
  • API services paid per request
  • AI agents that autonomously pay for API access
  • Paywalls for digital content
  • Microservices and tooling monetized via microtransactions
  • Proxy services that aggregate and resell API capabilities

How it works

x402 uses a simple request-response flow with programmatic payments. For a detailed explanation, see How x402 Works. At a high level:
  1. The buyer requests a resource from the server (e.g. an API call, see client/server roles)
  2. If payment is required, the server responds with a 402 Payment Required, including payment instructions
  3. The buyer constructs and sends a payment payload
  4. The server verifies and settles the payment via the facilitator. If valid, the server returns the requested resource

Beyond legacy limitations

x402 is designed for a modern internet economy, solving key limitations of legacy systems:
  • Reduce fees and friction: Direct onchain payments without intermediaries, high fees, or manual setup.
  • Micropayments & usage-based billing: Charge per call or feature with simple, programmable pay-as-you-go flows.
  • Machine-to-machine transactions: Let AI agents pay and access services autonomously with no keys or human input needed.