Detailed explanation of Coinbase x402 payment agreement

Reprinted from jinse
05/12/2025·20DAuthor: Erik Reppel, Nemil Dalal, Dan Kim, Coinbase; Translated by: AIMan@Golden Finance
Key points of the full text: Coinbase will soon launch x402, a payment protocol that supports direct instant stablecoin payments over HTTP. It allows APIs, applications and AI agents to trade seamlessly, unlocking a faster and more automated Internet economy.
The Internet economy has been struggling with payments.
Traditional payment methods—credit cards, bank transfers, subscriptions—are built for the world before the Internet era. They are slow, costly, geographically restricted, and are full of manual steps. As the scale of digital interactions expands, payment methods have lagged behind: fragmented, slow and difficult to program.
We need a more modern approach - a method that can support the rise of autonomous AI proxy, stablecoins, and generally realize the Internet native instant and frictionless payments. Recently, Citibank calls this era the “ChatGPT moment” in the payment field, and a16z calls it the “WhatsApp moment” in the stablecoin field, reflecting a growing consensus that the world is ready for a seamless and global payment channel like the Internet.
At Coinbase, we address this challenge by introducing x402: an open standard that leverages the original HTTP "402 Payment Required" status code to embed stablecoin payments directly into the web interaction. The protocol was inspired by the crypto micropayment work conducted by Balaji and his team years ago on http://21.co. At the time, you could only implement micropayments through the Bitcoin payment channel, which required expensive setup/disassembly costs. But with the advancement of modern L2-layer technologies like Base, on-chain costs have been reduced to 1 cent, so many applications of their prototype design have become possible.
x402 allows developers and AI agents to pay for API, service and software fees directly using stablecoins over HTTP. With just a few lines of code, the x402 provides built-in authentication, automatic billing, and seamless integration with existing web infrastructure. It makes monetization instant and automated, allowing businesses and agents to trade value as easily as exchanging data.
Erik Reppel, director of platform engineering at Coinbase and co-author of x402 white paper, outlines the vision behind this plan:
We created x402 because the Internet always needed a native payment method – and stablecoins finally achieved this. Just as HTTPS guarantees network security, x402 can define the next era of the Internet; an era where values flow freely and instantly like information. We are laying the foundation for an economy that is not only run by people, but software – autonomous, intelligent and always online. ”
The x402 is launched with leading partners such as AWS, Anthropic, Circle and NEAR, who are as strong as ours to believe in an open, programmable Internet economy.
Gagan Mac, vice president of product management at USDC issuer Circle, believes that the x402 is a strong new standard that can make stablecoin payments a top-notch citizen of the network:
USDC is built for fast, boundary-free and programmable payments, while the x402 protocol elegantly simplifies the real-time monetization process by eliminating the links of registration, authentication and complex signatures. The two join forces to unlock exciting new use cases, such as micropayments for AI agents and applications.
NEAR co-founder and co-author of Attention Is All You Need (a paper introducing the architecture behind GPT), Illia Polosukhin believes that the x402 is ideal for building seamless proxy-driven experiences:
“Our vision is to combine frictionless payments for x402 with NEAR intentions, allowing users to buy anything through their AI agents with confidence, while agent developers collect revenue through cross-chain settlement, making the complexity of blockchain invisible.”
Together with these partners, we not only launch new payment standards, but also build infrastructure for the digital economy, which is fast, programmable, truly internet native, providing the same design experience for humans and autonomous machines.
Why x402 is so important
Traditional payment methods are not only outdated, but also seriously hinder the development of the Internet economy.
Traditional payment systems such as credit cards and bank transfers are not built for today's fast, global and automated Internet. They are slow, costly, and are full of geographical and authentication barriers. Even encryption solutions often require complex wallets or blockchain-specific tools, which not only does not eliminate friction, but instead increases friction.
x402 solves this problem by restoring the HTTP 402 "Payment Required" status code, an idle feature in the Web designed to enable seamless payment requests in standard HTTP interactions. Clients (whether humans, scripts, or AI agents) can now respond to payment prompts immediately with widely used stablecoins (such as USDC), making transactions as easy as loading web pages.
Specifically, x402 supports:
-
The server immediately issues a standardized 402 "payment required" response to high-quality digital resources.
-
Embed automatic payment directives directly in standard HTTP responses.
-
Seamless integration into existing HTTP infrastructure without the need for special wallet interfaces, layers or separate authentication mechanisms.
The actual impact is obvious: payments become instant, seamless, and embedded directly into the internet—opening new business models, frictionless global transactions and fully autonomous software interactions.
How x402 works
x402 follows a simple process:
-
The client (AI proxy or application) requests access to an x402-enabled HTTP server (for example, GET /api) with the required resources.
-
Server Reply 402 Payment status is required, including payment details (such as price, acceptable tokens).
-
The client sends signed payment payloads using supported tokens such as USDC via standard HTTP headers.
-
The client retrys the request, now including the X-PAYMENT header with the encoded payment payload.
-
Payment service providers (such as Coinbase x402 service provider services) verify and settle payments on the chain and satisfy the request.
-
The server returns the requested data to the client, including the X-PAYMENT-RESPONSE header that confirms the transaction is successful.
Because it extends native HTTP behavior, x402 can work with almost any client (browser, SDK, AI proxy, mobile application) without additional requests, changes to the website's client/server process, or extensive UI integration.
What can developers build
With hosting solutions like the Coinbase x402 Facilitator service, developers can easily integrate stablecoin payments directly into their services with just a few lines of code. This eliminates the complexity, overhead and friction brought by traditional payment integration, allowing creators and businesses to open up new revenue streams and user experiences.
For example:
-
Paid APIs: Monetize each API call immediately with frictionless micropayment, eliminating the barriers and complexity of subscription-based models.
-
Software Unlock: Provides seamless, on-demand access to advanced features and content without subscriptions or complex paywalls.
-
Measuring service: Dynamically charge users based on actual resource usage, achieving a scalable pay-as-you-can-eat experience without the hassle of prepayment or billing cycles.
Imagine that creators can get paid automatically by views per minute, news websites can instantly monetize individual articles, or AI agents can purchase cloud resources independently in real time. By embedding payments directly into HTTP, x402 makes microtransactions that were previously difficult to achieve a breeze—a revolutionized the daily digital interactions of humans, automated scripts and autonomous agents, seamlessly connecting today’s networks with the future decentralized digital economy.
What can AI agents unlock
Today’s AI agents can think, reason and act, but their trading capabilities still rely on manual, artificially driven methods such as credit cards, prepaid API keys, or subscription models. x402 fundamentally changed this point, empowering AI systems to have the ability to trade independently in real time, and opening up a new wave of intelligent and independent software agents.
Through x402, the agent can obtain instant economic autonomy, thereby achieving the following scenarios:
-
Autonomous cloud computing: AI agents can provide computing resources in real time and pay by reasoning, thereby eliminating manual credit or manual configuration processes.
-
Market Intelligence: AI systems automatically access dedicated data sources, pay seamlessly on request to gain critical market or product insights without manual intervention.
-
Forecasting the Market: Automatic betting agents can independently purchase real-time sports statistics and market data, making wise bets without manual intervention.
-
Consumer and supply chain automation: AI inventory managers dynamically request and pay real-time quotations, supply chain data and logistics, and instantly adapt to market changes independently.
-
Artificial intelligence-driven creative tools: Intelligent content creation systems independently access high-quality media libraries, design tools and dedicated software, and instantly pay resources to independently produce high-quality content.
Instead of manually setting up like static tools, the x402 turns AI into a truly dynamic proxy—the ability to discover, acquire and utilize new features automatically on demand. When a proxy encounters a paywall or advanced resource, simply attach a signed stablecoin payment to seamlessly resume interaction and continue to move towards your goal.
This is not only automation, but also the economic autonomy of software. It represents the basis of a new generation of intelligent agents, able to conduct transactions, adapt and develop independently.
Who is using x402 to build
Our early partners demonstrated the transformative possibilities that will bring when payments are seamlessly embedded in HTTP, which will unlock entirely new business models and enable truly autonomous software interactions:
Independent infrastructure
-
Hyperbolic: AI agents pay independently based on GPU inference, enabling scalable workloads without manual management.
-
OpenMind: Robots automatically acquire computing and data, transforming physical agents into economic players on the chain.
-
PLVR: AI agents independently purchase event tickets to create frictionless and instant fan participation.
Agent interaction
-
Anthropic (MCP protocol): An AI model dynamically discovers, retrieves and autonomous payment contexts and tools to demonstrate truly independent proxy interactions powered by x402.
-
Apexti Toolbelt: enables developers and agents to utilize (or dynamically boot) over 1,500 Web3 APIs through x402-enabled MCP servers, seamlessly monetize each API call within a single prompt.
-
NEAR AI: Simplifies blockchain integration of AI applications and enables autonomous economic interaction without complexity.
- “Our vision is to combine frictionless payments for x402 with NEAR intentions so that users can buy anything through their AI agents with confidence, while agent developers collect revenue through cross-chain settlement, thus making the complexity of blockchain invisible.” — Illia Polosukhin, co-founder of NEAR.ai and the principal inventor of the underlying Transformer architecture of GPT.
Social and communication
-
XMTP: Message platforms become economic hubs – agents and users pay seamlessly to join private groups, unlock exclusive content or monetize their expertise directly in chat.
-
Neynar: AI agents seamlessly query Farcaster’s social graphs and profiles to power innovative social applications and creative content generation.
- x402 Transforms Neynar's Farcaster API into a purely on-demand utility—the proxy can extract the required data accurately, settle in USDC in the same HTTP 402 round trip, and skip API keys or prepaid plans completely. This is a huge breakthrough for real-time, context-rich social applications. ——Neynar founder Rish Mukherji
Real-time data
-
Chainlink: A demonstration was built using the x402 protocol that requires USDC payments to enable users to interact with contracts on Base Sepolia, thereby minting random NFTs using Chainlink VRF.
-
Boosty Labs: Showcase how AI agents can buy real-time insights automatically (reasoning through X API and Grok 3) right away – no API keys or human intervention required.
-
Zyte.com: Agents dynamically purchase structured network data through micropayments, such as market insights and product listings.
Easy integration
-
BuffetPay: Smart x402 payment, built-in guardrail and multi-wallet control, simplifying secure, programmable payments.
-
Cal.com: Embed automatic scheduling and paid human-computer interaction directly into the workflow, accessible to both agents and users.
-
Cred protocol: provides a decentralized credit scoring infrastructure that allows artificial intelligence agents to independently evaluate on-chain credit in real time.
-
Fewsats: Build a lightweight proxy that quickly adopts and tests x402 without modifying existing application infrastructure.
These groundbreaking examples illustrate how x402 can transform the network into a programmable economic platform that enables a new generation of smart agents and dynamic services to trade, adapt and develop independently.
x402 is now open for developers, teams and innovators to explore and integrate into their applications. Visit x402.org for complete documentation, work demos, official white papers and GitHub resources.