Agentic Commerce with x402: How AI Agents Pay Online
x402 is the HTTP-native payment protocol that lets AI agents pay for APIs and digital services instantly with stablecoins without an account or human sign-off.
Key takeaways
- Agentic commerce is the model where AI agents execute purchases autonomously without requiring human interaction at each step.
- x402 is an open HTTP-native payment protocol that embeds stablecoin payment logic into standard web requests using the HTTP 402 status code.
- The HTTP 402 status code has been reserved in the HTTP specification since the 1990s, but had no working implementation until x402 activated it for machine-to-machine payments.
- Machine-to-machine payments are transactions initiated and settled entirely between software systems, which is the core use case x402 was designed for.
Agentic commerce with x402 is a model where AI agents autonomously execute payments, including discovering services, authorizing transactions, and settling in stablecoins, using the x402 protocol built on HTTP's dormant 402 status code. No human approval is required at any step.
This combination is becoming foundational infrastructure for the AI agent economy, where software acts as the buyer rather than a person.
What Is Agentic Commerce?
| In short: Agentic commerce is the model where AI agents act as buyers, executing the full purchase lifecycle from discovery through payment and fulfillment based on a goal rather than a manual click. |
Instead of a person browsing a site and pressing "buy," an agent receives an instruction like "find the cheapest weather data API that updates every 15 minutes" and completes the transaction on its own. The agent evaluates options, authorizes payment, and retrieves the resource – all within seconds.
The scale of this shift is becoming visible.
Adobe Analytics recorded a 4,700% year-over-year increase in generative AI traffic to US retail sites between July 2024 and July 2025.
By April 2026, five production deployments of agentic commerce were live:
- ChatGPT Instant Checkout
- Amazon Buy for Me
- Mastercard Agent Pay
- Visa Intelligent Commerce
- Coinbase's Agent.market – runs entirely on x402
What is x402?
| In short: x402 is an open payment protocol that turns the long-dormant HTTP 402 "Payment Required" status code into a working machine-to-machine payment layer for stablecoins. It was developed by Coinbase and co-founded with Cloudflare in May 2025, and is now governed by the Linux Foundation's x402 Foundation. |
The protocol lets any server charge for a resource and any client, human or AI agent, pay for it through a single additional HTTP header without any accounts, API keys, or subscriptions.
For a deeper technical breakdown of how x402 works at the protocol level, read this article: What Is x402? The HTTP Payment Protocol Explained.
Why Agentic Commerce Needs x402
| Quick answer: Agentic commerce requires payment rails that work without human involvement, and the infrastructure that served humans for three decades was never designed for that. |
The payment problem for AI agents
The three dominant payment mechanisms on the web today are credit cards, OAuth tokens, and API keys. Each assumes a human in the loop at some point, such as signing up for an account, entering card details, or provisioning credentials.
An AI agent cannot do any of these. It cannot create an account, fill a form, negotiate an enterprise contract, or respond to a CAPTCHA. When it needs to access a paid resource, the existing system has no interface it can call.
On top of that, the economics break down at small scales. Card interchange fees run roughly 1.5% to 3.5% plus $0.50–$0.80 per transaction on credit cards (Source: Kansas City Fed via Eco). For a $0.05 API call, that math is unworkable.
How x402 solves autonomous transactions
x402 addresses both problems at once. It embeds payment instructions directly into standard HTTP responses, so no account creation, no pre-existing relationship, and no human sign-off is required.
The agent reads a machine-readable payment request and responds with a signed stablecoin transaction – all within the same HTTP round trip.
Settlement on Base costs less than $0.0001 in gas. On Solana, roughly $0.00025. This makes sub-cent transactions viable for the first time, which is the pricing model agentic API commerce actually requires. (Source: x402 Foundation – BlockEden.xyz)
Machine-to-machine payments at scale
"x402 reframes the web's monetization model entirely. For 30 years, the web defaulted to advertising because micropayments were economically impossible. x402 opens the door to a pay-per-request economy that could have existed since 1997. The HTTP 402 status code was reserved for exactly this purpose. It took autonomous software to finally make it necessary."
– BytebyByte, Cryptothreads
When agents operate at scale, the transaction volumes become orders of magnitude larger than human-driven commerce. A single AI research agent might call dozens of APIs in a single session.
x402's stateless authentication model, where the payment itself serves as cryptographic proof of access, requiring no stored session or database lookup, is designed to handle this concurrency without friction.
How x402 Payments Work in Agentic Commerce
Quick answer: x402 runs a two-step HTTP exchange that settles on-chain.
The entire flow is composed with standard HTTP. Nothing outside the existing web stack is required. |
Step 1: The agent requests a paid resource
The agent sends a standard HTTP GET or POST request to a resource endpoint, like a data feed, a compute job, or an API call. At this point, no payment information is attached. The request is identical to any regular HTTP request.
Step 2: The server returns an HTTP 402 response
If the resource requires payment, the server responds with an HTTP 402 Payment Required status code and includes a PAYMENT-REQUIRED header containing Base64-encoded payment details:
- The price
- Accepted token (typically USDC)
- The target network (Base, Ethereum, Arbitrum, Polygon, or Solana)
- The merchant's wallet address
Step 3: The agent signs and submits payment
The agent reads the payment requirements, constructs a signed EIP-3009 token transfer authorization (for EVM chains), and retries the original request with an X-PAYMENT header containing the payment proof.
A Facilitator, a middleware service, with Coinbase offering a hosted version at no charge to sellers, intercepts this header, verifies the payment on-chain, and confirms to the resource server that funds have been committed. The facilitator does not hold funds; it only verifies and broadcasts the pre-signed transaction.
Step 4: Access is granted without human intervention
The resource server receives confirmation from the facilitator, fulfills the original request, and returns the data or service response. The entire cycle, from initial request to delivered resource, takes seconds.
Agentic Commerce x402 vs API Keys and Subscriptions
x402 is not a replacement for all existing API monetization. It is a better fit for agent-driven, high-frequency, or micropayment workloads where traditional rails fail.
x402 | API Key | Subscription | |
| Setup required | None – wallet only | Account creation | Account + billing |
| Cost model | Pay per request | Flat rate or quota | Monthly flat fee |
| Agent compatible | Native | Requires pre-provisioning | Requires pre-provisioning |
| Minimum viable transaction | Sub-cent | N/A (quota-based) | Fixed monthly |
| Human dependency | None | Sign-up only | Ongoing billing |
| Settlement latency | Seconds (on-chain) | Instant (access gate) | Instant (access gate) |
API keys and subscriptions remain useful when agents are pre-provisioned and work within a known toolset. x402 becomes the better model when agents encounter new services mid-task, when transaction sizes are too small for subscription economics to make sense, or when no pre-existing relationship between buyer and seller exists.
Stripe, which began integrating x402 in February 2026, offers a useful bridge. It converts USDC received via x402 to USD and settles through existing merchant dashboards, so sellers do not need any crypto expertise to accept agent payments.
x402 Agentic Commerce in Production
| Quick answer: By early 2026, x402 had moved beyond experimentation. Coinbase's Agent.market, an app store for autonomous agents built entirely on x402 settlement, reported 165 million transactions and approximately $50 million in cumulative volume in its first months of operation, with roughly 69,000 active agents transacting on the network. |
The average transaction size of approximately $0.31 per call confirms that x402 usage is concentrated in API metering and machine-to-machine billing. That is the use case it was designed for.
AI agents purchasing real-time data
Data APIs are the clearest product-market fit for x402. An agent performing competitive research or financial analysis may need to call multiple data providers in a single session – providers it has never interacted with before.
- Exa, an AI-native search engine, exposes its web data API through x402, allowing agents to retrieve content per query without a pre-configured account.
- Nous Research uses x402 for per-inference billing of its Hermes 4 model.
In both cases, the agent pays only for what it actually uses, and the provider receives settlement within seconds.
Paying for compute and API calls
Cloud infrastructure providers have moved x402 support into core platforms. Cloudflare integrated x402 into its Workers platform and is piloting a pay-per-crawl product, allowing content providers to charge bots and AI crawlers per page rather than blocking them entirely.
Vercel supports x402 middleware for serverless functions, and AWS has extended x402 support at the cloud infrastructure layer. For developers, this means any serverless function can become a paid resource by adding x402 middleware.
MCP tool payments with x402
The Model Context Protocol (MCP), originally open-sourced by Anthropic in November 2024, has become the default tool-discovery layer for AI agents. x402 now sits on top of it. When an agent discovers a paid tool through an MCP server, x402 handles the payment for that tool call inline.
Vercel shipped the x402-mcp package in September 2025, enabling MCP servers to define paid tools that automatically trigger x402 payment when an agent calls them. The result is that an agent using Claude, Cursor, or any MCP-compatible framework can access and pay for external tools in a single interaction without any pre-provisioned keys or human setup.
Author Perspective
For most of the web's history, the cost of processing a payment exceeded the value of a sub-dollar transaction. That made micropayment models economically unviable and pushed the web toward advertising as its default revenue model. x402 flips that constraint.
When an AI agent can pay $0.003 for a weather API call, $0.01 for a data lookup, or $0.001 per crawled page, new business models become structurally possible.
- Pay-per-query data feeds.
- Per-token inference billing.
- Per-second compute rental.
These were always logically sound ideas. They simply could not be implemented at the cost structure traditional payment rails imposed.
x402 does not guarantee any of these models will succeed, but it removes the infrastructure constraint that made them impossible, which is the more consequential development.
Sources and Further Reading
- x402.org – "x402 Protocol: Official Site" https://www.x402.org
- Coinbase – "Introducing x402: A New Standard for Internet-Native Payments" https://www.coinbase.com/developer-platform/discover/launches/x402
- Cloudflare – "x402 — Cloudflare Agents Documentation" https://developers.cloudflare.com/agents/agentic-payments/x402/
- Chainalysis – "Inside x402: 100M Agentic Payments on Base" https://www.chainalysis.com/blog/x402-agentic-payments-adoption/
- Fireblocks – "Fireblocks Joins x402 Foundation, Launches Agentic Payments Suite" https://www.prnewswire.com/news-releases/fireblocks-joins-x402-foundation-launches-agentic-payments-suite-302777251.html
- Solana – "What is x402? The HTTP Payment Protocol Explained" https://cryptothreads.io/learn/what-is-x402-the-http-payment-protocol-explained
- Linux Foundation – "x402 GitHub Repository" https://github.com/coinbase/x402
FAQs About Agentic Commerce x402
x402 was designed to be chain-agnostic and payment-method extensible, but current production implementations focus on USDC stablecoins over EVM-compatible chains and Solana. Bitcoin's Lightning Network has its own competing standard – L402, which predates x402 and uses a similar HTTP 402 mechanism but settles in satoshis rather than stablecoins.