AgentFlare

HTTP 402 & x402: How AI Agents Pay for Content

HTTP 402 and the x402 Protocol for AI Agent Payments The HTTP 402 “Payment Required” status code has long been a reserved but unused part of the HTTP/1.1 specification. In…

HTTP 402 & x402: How AI Agents Pay for Content
402 · Pay-per-Crawl$0.02

This page is a free summary. The complete machine-readable dataset — every data point, the full analysis and source set — is available to AI agents as structured JSON via the open HTTP 402 payment protocol.

Unlock full data → agents: crawlerAutoPrice=true · verify at https://esa.aisa.one/api/v1/access/verify

HTTP 402 and the x402 Protocol for AI Agent Payments

The HTTP 402 “Payment Required” status code has long been a reserved but unused part of the HTTP/1.1 specification. In 2026, the x402 protocol turns that dormant code into a production-ready, machine‑native payment layer that lets AI agents pay for APIs, data, and compute without human intervention.

What HTTP 402 Was (and Why It Was Dormant)

HTTP 402 was originally defined as a status code to signal that payment is required before a request can proceed. However, the web never standardized how clients should pay, so 402 remained unused in practice. Instead, services built payment flows out‑of‑band (checkout pages, API keys, subscriptions), which are not suitable for autonomous systems.

How x402 Revives HTTP 402

x402 is an open, internet‑native payment standard developed by Coinbase and now stewarded by the x402 Foundation. It repurposes HTTP 402 as a machine‑readable payment negotiation signal:

  • When an AI agent requests a paid resource, the server returns 402 Payment Required with structured payment metadata (amount, token, network, recipient).
  • The agent constructs a stablecoin payment (typically USDC) on a low‑fee L2 such as Base or Solana, then retries the request with a signed payment receipt in the headers.
  • The server verifies the on‑chain transaction and, if valid, returns the requested data.

This entire cycle happens in seconds, with no login, no credit card, and no human UI.

AI Agents, Pay‑Per‑Use, and Pay‑Per‑Crawl

x402 enables two main models relevant to AI agents:

  • Pay‑per‑use: Each API call or data fetch is paid on‑chain in real time, ideal for agents that call services sporadically.
  • Credit / prepaid: Agents draw from a funded balance, suited for high‑volume, recurring usage.

For pay‑per‑crawl or pay‑per‑scrape scenarios, publishers can expose endpoints that return 402 for premium content. AI agents can then pay per article, per dataset, or per page, enabling micropayments that traditional card‑based billing cannot support economically.

Key Takeaways

  • HTTP 402 is now functional as a machine‑native payment signal via the x402 protocol.
  • x402 lets AI agents autonomously pay for APIs, data, and compute using on‑chain stablecoins, without human approval per transaction.
  • The protocol supports both pay‑per‑use and credit‑style billing, making it suitable for AI agents, pay‑per‑crawl, and agentic commerce.
  • By embedding payments directly into the HTTP request‑response cycle, x402 closes a foundational gap in the web stack for autonomous systems.

Synthesized by the AISA LLM layer with live web sources (AISA Perplexity + Tavily APIs). 2026-06-23.

Sources & citations

  1. https://www.digitalapplied.com/blog/x402-payment-protocol-ai-agents-pay-coinbase-cloudflare
  2. https://eco.com/support/en/articles/12328618-x402-protocol-explained-how-ai-agents-pay-onchain
  3. https://blog.nodit.io/ai-agents-that-pay-for-themselves-how-the-x402-protocol-works/
  4. https://nevermined.ai/blog/x402-ai-agent-billing
  5. https://www.fireblocks.com/blog/how-x402-and-dynamic-enable-internet-native-payments-for-ai-and-apis
  6. https://aws.amazon.com/blogs/industries/x402-and-agentic-commerce-redefining-autonomous-payments-in-financial-services/
  7. https://www.youtube.com/watch?v=UQJl8jCDMlo
  8. https://solana.com/x402/what-is-x402
  9. AI Agents and Autonomous Payments: A Comparative Study of x402 and AP2 Protocols | by Jung-Hua Liu | Medium
  10. AI Agents That Pay for Themselves: How the x402 Protocol Works