HTTP 402: Payment Required

CN
15 hours ago

Author: Token Dispatch, Nishil

Translation: Block unicorn

Introduction

Last week, my social media was filled with Monad boxes. Is there anyone else like me who can't help but log in every day to open one? It feels like going back to childhood, unboxing blind boxes, cricket cards, Pokémon card packs— all that thrill condensed into a few clicks of the mouse. We’ve grown up, but some habits never fade away.

Speaking of old things, I often wonder what it would be like if people from the 2000s tried to use payment apps and banking services today; they would hardly feel any difference. Why has instant messaging evolved to the point where anyone can send a message to anyone in the world with just a click, yet when I try to make a remittance, the internet suddenly feels outdated?

This is because the internet was originally intended for information sharing, while money has always been secondary. We fill the funding gap through ads, subscriptions, and payment gateways. These methods are clever, but they are not real fundamental solutions.

I have always found it strange that the internet has freed communication from geographical constraints, yet the flow of funds still has to go through outdated banking systems. We have developed AI agents smart enough to find the best flights in seconds, yet they still have to wait for slow human input of credit card numbers to complete a purchase.

Today, AI agents are taking on tasks we used to handle, and if we still expect them to use outdated financial systems, it will severely hinder the development of AI. Agents need a way to transfer funds over the network as easily as transmitting data, and we need to build that system for them.

This is the gap that Coinbase is trying to fill with x402.

Now, let’s get to the point.

The Forgotten Status Code

x402 is based on a long-forgotten part of the HTTP protocol—its original purpose was to make payments as easy and convenient as loading images or videos. But to understand what x402 is, we first need to delve into how HTTP itself works and the purpose of the 402 status code.

HTTP is the foundation of the modern web, defining the rules for data transfer between clients (like your browser) and servers. To manage this communication, HTTP uses status codes, which are short signals that tell the browser what happened when trying to access a page. You may have seen some of these status codes:

  • HTTP 200 – OK: The page loaded successfully.

  • HTTP 404 – Not Found: The resource does not exist.

  • HTTP 500 – Internal Server Error: There was a fault on the server side.

These codes help the browser understand the interaction process and communicate it clearly to the user.

vZiz4Eon18ANaAUfQpozlVWLmRUNPaUAZxO1hfMX.jpeg

In addition to the commonly known codes, the HTTP standard also includes some other defined but rarely used codes, one of which is HTTP 402: Payment Required.

The 402 standard itself is very straightforward. It opens up space for web pages to convey payment-related information through the HTTP standard, just like the img> tag tells the browser where to find an image.

Incredibly, this idea has been dormant for decades. I believe it just needs the right financial tools capable of scaling the internet, which is blockchain.

qvbrWpY3PduPWX84R2GuhLr1XDk5DulBwRN0qL4Y.jpeg

But the real question is: what happens after you click to pay?

According to the standard, the server will return "HTTP 402: Payment Required." On its own, this seems trivial, but when combined with infrastructure that can transfer funds as quickly and conveniently as transmitting web information, it could lead to disruptive changes.

Wait, isn’t Stripe and PayPal doing this? Making online payments possible?

No, the way Stripe operates is quite different from the proposal of x402.

While internet payment solutions like Stripe and PayPal have enabled one-click payments on web pages, there are still many obstacles in the process to achieve this.

These solutions bypass the HTTP server the user is interacting with and redirect the user to their own APIs and interfaces. This confines both merchants and users to a closed ecosystem, requiring KYC verification to enter, needing a credit card to pay, and charging various fees that make small payments difficult.

If I had to withdraw cash from a designated ATM every time I shopped in a store, I might as well not buy anything. This experience is very similar to what PayPal offers now, just an online version.

The core issue is not the design of PayPal, but the scalability of traditional banking itself, which is insufficient to support the liquidity of online commerce.

I can send an emoji to anyone in the world, and in terms of cost and time, it’s the same as sending an article. But online payments are a different story.

Most debit cards and services like PayPal charge about 3% in fees on top of fixed costs. This fee makes online small transactions nearly impossible. Sending $0.01 could cost more than $0.30, which is absurd.

Blockchain does not have these limitations. What excites me the most is that with the emergence of stablecoins and high-throughput networks capable of processing thousands of transactions per second, everything is finally in place. We now have the infrastructure to make transferring funds on the internet as easy as sending a text message.

HTTP Meets Blockchain - x402

Ultimately, x402 is just a modern upgrade of a long-forgotten status code from the 1990s. It supports native payments based on HTTP and is powered by the rails of blockchain.

Let me explain how it works:

Request: When a client (whether human or AI) requests something without valid payment, the server responds with an HTTP 402 Payment Required message and a JSON payload explaining what needs to be paid, how to pay, and to whom.

Payment: The client then makes the payment (usually using USDC on a supported network) and resends the request with a confirmation payment authorization header.

Verification: The payment service provider checks the on-chain payment, and if valid, the server releases the requested data.

YV7P9kMc4z9Nbgdh3d7QmL9UiwDrWO2uyXZfXVCr.png

Importantly, x402 itself does not handle funds; it merely defines the handshake protocol. Settlement is completed by the payment "service provider" (payment processor or on-chain contract) configured by the client.

The power of x402 lies in its ability to allow my Web 2.0 developer friends to add stablecoin payments to their existing websites without any new integrations or complex setups. It’s actually simpler than configuring Stripe or PayPal, making it much easier for me to introduce them to Web 3 technology.

Meanwhile, the AI systems I use finally allow me to browse and pay with one click, making online shopping as easy as sending and receiving emails. This is effortless for both me and my AI assistant.

What excites me most about this shift in online payment methods is that I can finally control how my funds flow on the network. I can create clear strategies and define exactly how my funds are used.

I just want to pay for that article I read in The Wall Street Journal, rather than subscribe monthly and accumulate spam. I want my streaming app to charge me only for the actual seconds I watch, free from the constraints of annual contracts. I want my AI agents to access research materials and APIs from paid resources on a pay-as-you-go basis. This level of control feels liberating.

While allowing businesses to accept small payments may not be economically viable from a unit economics perspective, small payments can help businesses scale and ultimately surpass their current revenue levels, which is worth our attention. Especially when we consider how tiered transactions can convert passive internet users into active economic participants, potentially multiplying online GDP in the process, this advantage becomes even more apparent.

Coinbase launched the x402 standard in May of this year. Since then, several projects have begun developing based on this standard. Some interesting use cases include:

  1. Questflow: A multi-agent orchestration tool that uses the x402 protocol to allow agents to autonomously pay for APIs in complex workflows.

  2. Anchor Browser: Allows browser-based agents to pay for paywalled content or initiate new browsing sessions through payments.

  3. Pinata: Uses x402 for account-free IPFS uploads and retrievals. Pay for using private or public IPFS storage and retrieval without needing an account or API key.

In my view, what we are currently seeing is just the tip of the iceberg. Once funds can flow like data, we will see money become freely combinable on the network. Searching, discovering, and paying will increasingly shift into the hands of agents.

This is not surprising, but most of the current use cases for x402 revolve around crypto applications. To attract external demand, we need the right network effects.

Just as eBay was a springboard for the early adoption of PayPal, x402 now needs its own "eBay moment," a flagship platform that can drive mainstream adoption.

Fortunately, Coinbase has taken a leading role in the x402 space, which is beneficial for establishing important Web 2.0 partnerships and bringing us closer to finding a flagship platform that can trigger widespread application. Some of these partnerships are significant:

  • Cloudflare: Recently partnered with Coinbase to establish an independent x402 foundation.

  • Google: Integrating x402 into its new Agent Payment Protocol 2 (AP2) standard, as well as

  • Visa: Adding support for x402 in its Trusted Agent Protocol (TAP).

What Are My Thoughts?

In a few years, I will have my AI assistant generate a market report. It will quietly access various data sources, news articles, Reddit posts, purchase articles to bypass paywalls for just a few cents, all while checking against the strategies I set in advance. No checkout windows, no payment forms, and no lurking tracking cookies in the background to generate ad revenue. Everything will be autonomously completed according to my wishes, executed automatically.

This is the future I envision x402 could unlock—a world where payments become a native component of the web.

Once x402 scales, we will see new applications emerge that are impossible under today’s financial system. Users will deposit funds into the platform's user interface and use that account across the web. Imagine social media likes serving as a source of income for creators; fitness agents tracking your use of workout gear and purchasing food that meets your dietary needs; wearable devices listening to your daily conversations and recommending potential Polymarket trading opportunities; or your personal agents communicating with other agents to negotiate and pay for flights, helping you book rooms, and so on.

This is just the tip of the iceberg.

With x402, I can envision a network where funds can be transferred as easily as information, whether it’s cents or dollars, whether it’s agents or humans.

The agents in my browser are excited about this, and so am I.

免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到support@aicoin.com,本平台相关工作人员将会进行核查。

Share To
APP

X

Telegram

Facebook

Reddit

CopyLink