top of page

What Is x402? How AI Agents Pay With Stablecoins

13 hours ago
8 min read

Software can now buy one API call for $0.01, with no account and no card


An HTTP 402 Payment Required response asking for $0.01 in USDC on Base, followed by an HTTP 200 response returning the data


x402 is an open payment standard that lets a program pay for a web resource inside the same request that fetches it. A server answers with HTTP status code 402, Payment Required, and states a price. The client, usually an AI agent, pays that price in a stablecoin such as USDC and sends the request again with proof of payment. A third-party facilitator checks the payment, and the server returns the data. Coinbase released the protocol in May 2025. Stripe, Amazon Web Services, Google, and Cloudflare have since built on it, and the Linux Foundation now hosts its governance. What x402 does well is narrow: it removes the account, the API key, and the card form from a small purchase. What it leaves open deserves as much attention, and we cover both.





A status code the web reserved and left empty


Every web response carries a 3-digit status code. Most people know 404, Not Found. Its neighbor, 402, Payment Required, was set aside early in the web’s history for digital cash and micropayment systems that never took hold. RFC 9110, the current HTTP standard, still lists it without a defined use, and Mozilla’s developer documentation calls it “reserved for future use” with no standard convention behind it.


The web paid for itself in other ways instead: advertising, subscriptions, and card checkouts built for a person sitting at a browser. Each of those assumes someone signs up, accepts terms, and stores a payment method. For an agent that wants a single price quote from a data service it has never used before, that setup costs more than the purchase.


Coinbase’s developer platform proposed filling the empty code in May 2025. Decrypt reported at launch that its engineers designed x402 to work on any blockchain and planned to open the roadmap to outside contributors. Both happened within about a year. Google built x402 into its Agent Payments Protocol as the stablecoin option that September. A week later, Cloudflare announced plans with Coinbase for an x402 Foundation. Stripe began previewing x402 billing in February this year, letting businesses charge agents in USDC on Base. In April, the foundation formed under the Linux Foundation, with Cloudflare and Stripe on its initial governing body. By July, the Linux Foundation said 40 organizations had joined, with Visa, Mastercard, American Express, Google, AWS, Stripe, Shopify, and Circle among the premier members.


Timeline of 7 x402 milestones, from Coinbase’s release in May 2025 to the x402 Foundation opening with 40 members in July 2026

Card networks signing up to a stablecoin-native standard is the detail to hold onto. Visa’s representative at the July launch said commerce “will not run on a single agent, protocol, or payment method.” The networks are hedging, and a team evaluating x402 should read that as a signal: it is one rail on the table, with no guarantee of being the only one.


How an x402 payment works, step by step


The exchange takes 4 messages from the agent’s side, and none of them needs a human.

  1. The request. An agent asks a server for a resource: a price feed, a research report, a page of a website.

  2. The price. The server replies with a 402 in place of the content. The reply carries the payment requirements: the amount, the accepted token, the network, and the address to pay.

  3. The payment. The agent signs a payment authorization from its own wallet for that exact amount, usually in USDC.

  4. The retry. The agent sends the original request again with the signed payment attached. The server hands it to a facilitator, which verifies the signature and settles the transfer onchain. Once the facilitator confirms, the server returns the content.


Stripe’s developer documentation describes the same sequence and adds a step for merchants. After settlement, Stripe records the onchain transfer as an ordinary PaymentIntent, so the sale shows up in the same dashboard as card revenue. AWS runs the same loop at its network edge. A Monetize rule in AWS WAF returns the 402 and serves content only after the payment clears, so the origin server never sees an unpaid request.


Sequence diagram of an x402 payment between an AI agent, a server, and a facilitator, from the 402 price reply to the 200 response with the data

A worked example makes the loop concrete. A research agent is asked to summarize a week of trading activity for 5 assets and lacks the price history. It calls a market data endpoint and receives a 402 asking for $0.01 in USDC on Base. Before paying, the agent checks its own rules: is this seller on the approved list, is one cent inside the per-call limit, and is the day’s budget still intact? All 3 pass, so it signs, retries, and receives the data. After 5 calls, it has spent 5 cents and written the summary. Nobody saw a checkout page, but someone did write those rules in advance.


In Stripe’s reference integration, the 402 reply carries the payment requirements in a response header as an encoded payload, so a client library can read the price without parsing a web page. Teams can rehearse the whole exchange without real money: Stripe’s documentation pairs its sandbox with Base Sepolia, the test network for Base, and a public test facilitator hosted at x402.org.


The facilitator is the piece most explainers skip. A data seller does not want to run blockchain nodes to check payments, so it hands verification and settlement to someone else. Coinbase’s facilitator documentation lists Base, Polygon, Arbitrum, World, and Solana. On the EVM networks, it handles USDC and EURC through signed transfer authorizations and other ERC-20 tokens through a separate approval method. Its published pricing gives each account 1,000 transactions a month at no cost, then charges $0.001 per transaction.


That fee is small, and it still belongs in a seller’s model. A data service that charges $0.01 per call and sends every call through the hosted facilitator gives up a tenth of the price on each sale above the free tier. That is our arithmetic on Coinbase’s published rates, and it shows why per-request pricing near one cent leaves little room for a middleman.


Why stablecoins instead of a card


The design rests on 3 properties a card network does not offer a machine buyer.


Size comes first. A card payment carries fixed per-transaction costs that make a one-cent sale uneconomic. CoinGecko’s x402 endpoints charge $0.01 in USDC per request, accept payment on Base and Solana, and require no account or API key. Chainalysis reported in June that Base hosts the most active x402 deployment, which fits the economics: a one-cent sale only works on a network where the transfer itself costs a fraction of that.


Speed is second. Settlement on these networks completes in seconds, short enough to sit inside a single web request without the caller timing out.


The third property is access. Software can create a wallet in one call, and that wallet can hold and send a stablecoin without a bank opening an account for each counterparty. The alternative for an agent is a human registering it, in advance, with every service it might ever call.


Who sets the terms changes too. With an API key, the seller sells a plan, and the buyer commits up front. With x402, the seller prices each request and the buyer decides call by call. That arrangement favors sellers with valuable, irregular data, and buyers who need one answer from many sources more than many answers from one. For a small data publisher, that is the most interesting part of the design, because it lowers the cost of being the fifth source an agent checks.


Where x402 is running today


Coinbase said in May that x402 had processed more than 169M payments in its first year, across more than 590,000 buyers and 100,000 sellers. The figure came with the launch of Amazon Bedrock AgentCore Payments, which lets developers on AWS give agents USDC budgets with time limits and pay x402 services through a single API call.


These 3 deployments show the range of who has adopted it.

  • CoinGecko sells crypto market data per request at $0.01, the clearest case of an API that skips signup entirely.

  • AWS made AI traffic monetization in AWS WAF available to CloudFront customers in June, at no charge beyond standard WAF pricing. A publisher sets a per-request price by content path or bot category, and AWS states that it takes no fee on the content revenue.

  • Stripe lets a business create a deposit address, accept USDC through x402, and handle refunds and reporting with the tools it already uses. Its documentation limits stablecoin payments to US businesses outside New York, with access in more than 30 other countries by request.


Cloudflare has opened a waitlist for a Monetization Gateway built on x402 and has not published pricing or a launch date.


One pattern runs through the largest integrations. The protocol is open, and anyone can run a facilitator, yet Stripe’s documentation states that its mainnet x402 payments settle through Coinbase’s facilitator, and AWS names Coinbase’s facilitator for verification and settlement. For now, both of these integrations verify payments through one company. A team building on x402 should treat the facilitator as a vendor relationship and ask it the same questions about uptime, fees, and terms it would ask a card processor. AWS lists Stripe direct-account payments as coming soon, which would add a second path.


What x402 does not solve


x402 answers one question: did this request get paid for? Several harder questions sit outside it.

Refunds and disputes. A card buyer can file a chargeback. An x402 payment is a final onchain transfer, and if the data turns out to be wrong, a refund is a separate payment the seller has to choose to send. Stripe’s integration routes refunds through its own tooling, which helps the seller’s books, but the protocol itself gives the buyer no dispute right.

Identity. The payment proves that a wallet paid. It does not tell the seller whose agent sits behind that wallet or what the agent is allowed to buy. A seller who needs to know its customer, for compliance or for credit, has to get that answer from another layer.


Spending control. x402 lets an agent pay any server that asks. Limits on how much, how often, and to whom belong in the wallet or in the agent’s own policy. The time-limited budgets in AgentCore Payments are one example of that control living outside the protocol.


Real demand. Headline counts overstate commerce. CoinDesk reported in March that Artemis, an onchain analytics firm, estimated that roughly half of the x402 transactions it tracked reflected artificial activity. A team sizing a market from transaction counts should ask what share of them paid for something a person would recognize as a product.


Competing rails. Google’s Agent Payments Protocol supports cards, stablecoins, and real-time bank transfers, with x402 as its stablecoin path. Stripe pairs x402 with its own Machine Payments Protocol for sellers who also want card payments from agents. An agent economy that runs on several rails at once looks more likely than one that runs on x402 alone.



Table comparing card checkout, API key plans, and x402 on account needs, smallest charge, settlement, refunds, agent identity, and who checks the payment





The takeaway


If you sell data or an API, test x402 on one endpoint using Stripe’s sandbox or the public test facilitator, and leave existing plans in place for human customers. If you run agents, set spending limits, approved sellers, and a refund policy before any agent holds a funded wallet. Our Blockchain + AI Explainer Pack covers where blockchain and AI systems meet in practice. Payment is now the easy part of agent commerce.



⛔️ Disclaimer ⛔️


This article is published by Blockchain and Web3 Insights LLC for educational and informational purposes only. Nothing in this piece constitutes financial, tax, or legal advice. Always conduct your own research or consult a qualified professional before making decisions.



🗣️ Join the Conversation


Blockchain and Web3 Insights LLC is committed to delivering fact-based, practical education on Bitcoin, blockchain, and decentralized technologies. If this article was useful, please share it with your network and connect with us through the channels below to continue the conversation.



🔗 Stay Connected:


Follow Blockchain & Web3 Insights across platforms for weekly updates, insights, and resources:




📩 Subscribe to the Newsletter:


Stay current with Blockchain & Web3 Weekly Bytes, published every Saturday. Each edition includes:


  • Clear insights on Bitcoin, blockchain, and digital assets

  • A weekly trivia feature

  • Practical updates designed for learners, teams, and professionals




📚 Educational Resources:


Blockchain and Web3 Insights curates and creates resources to support learning and practical application. Explore:



Comments


Blockchain_and_Web3_Insights_Logo_NoBG.png
  • Youtube
  • X
  • LinkedIn
  • Medium
  • Instagram

Copyright © 2023-2026 Blockchain and Web3 Insights LLC

Disclaimer & Affiliate Disclosure: Content on this site is for educational and informational purposes only and does not constitute financial, tax, or legal advice. Always conduct your own research or consult a qualified professional before making financial decisions. Blockchain and Web3 Insights LLC may earn commissions from affiliate links on this site, at no additional cost to you. Only products and services that are trusted and considered genuinely valuable to readers are recommended.

bottom of page