Protocols & news

What is x402? HTTP 402 payments for AI agents, explained

Listen · 8 min

Narrated by an AI voice. Code examples are on the page.

Short answer

x402 is an open protocol that turns the long-unused HTTP 402 Payment Required status into a working payment step. A server answers a request with 402 and its price, the client pays (today usually in a stablecoin such as USDC) and retries, and the server returns the content. Coinbase created it, and since July 2026 it is governed by the x402 Foundation under the Linux Foundation.

Key takeaways

  • x402 lets a client pay for a single web request, then retry it.
  • It suits paid APIs and content more than a store's normal checkout.
  • The x402 Foundation under the Linux Foundation now governs the protocol.

What is x402?

x402 is an open protocol that lets a website or API charge for a single request, and lets the client, often an AI agent, pay and get the content in the same exchange. The x402 site calls it "an open, neutral standard for internet-native payments."

The name comes from the HTTP status code HTTP 402, "Payment Required." That code has been part of the web for decades, but nobody agreed on how to use it. MDN, the Mozilla developer reference, still describes 402 as "a nonstandard response status code reserved for future use" and notes that "No standard use convention exists." x402 is one attempt to give it a standard meaning.

The idea is simple. Instead of signing up for an account, adding a card and buying a subscription, a client pays a small amount for exactly the thing it asked for. That fits software agents well, because an agent cannot easily fill in a sign-up form or wait for an invoice. For a short definition, see our x402 glossary entry.

How does an x402 payment work?

The server asks for payment in its response, the client pays and retries, and the server returns the content once the payment checks out.

The x402 repository on GitHub describes the flow in these steps:

  1. The client requests a resource, such as an API endpoint or an article.
  2. The server answers with 402 Payment Required and a PAYMENT-REQUIRED header that lists what it accepts: the price, the payment method and the network.
  3. The client picks one option and builds a payment payload.
  4. The client sends the same request again, with the payment in a PAYMENT-SIGNATURE header.
  5. The server verifies the payment, itself or through a "facilitator," and settles it.
  6. The server returns the content with 200 OK and a PAYMENT-RESPONSE header that confirms settlement.

A first response looks something like this (values shortened):

HTTP/1.1 402 Payment Required
payment-required: eyJ4NDAyVmVyc2lvbiI6Mi...

A facilitator is a service that verifies and settles payments on a blockchain for the server, so the server does not have to run that part itself. The repository defines it as "A server that facilitates verification and execution of payments for one or many networks."

x402 also has payment "schemes." The basic one, exact, charges a fixed amount, such as a fee to read one article. The repository also describes upto, where the client authorizes a maximum and the seller charges actual usage up to that cap, and a batch-settlement scheme that lets sellers settle many small charges on-chain in batches.

Who runs x402 and who backs it?

Coinbase created x402, and the protocol is now governed by the x402 Foundation under the Linux Foundation.

The timeline we could confirm:

  • September 2025. Cloudflare announced that it and Coinbase intended to create the x402 Foundation. Cloudflare's release said 402 had existed for decades but "a lack of standardization has prevented its widespread adoption."
  • 14 July 2026. The Linux Foundation announced the foundation's operational launch and said Coinbase had completed its contribution of the protocol. It said 40 organisations had joined, with premier members including Adyen, AWS, American Express, Circle, Cloudflare, Coinbase, Google, Mastercard, Shopify, Stripe and Visa.

The Linux Foundation describes x402 as letting AI agents, APIs and applications send and receive payments, with support "ranging from traditional cards to stablecoins." In practice, the integrations we reviewed settle in stablecoins, mainly USDC.

How does Stripe support x402?

Stripe documents x402 as a way to accept payments from agents, settled in stablecoins and recorded in your Stripe account.

According to Stripe's guide, your server returns the 402 response with payment details, including a Stripe deposit address. The client pays, retries the request, and after the facilitator settles the payment on-chain, Stripe records it as a normal payment. Stripe's guide uses Coinbase's developer platform as the facilitator for live payments and gives a test setup that moves no real money.

Some details from Stripe's page, at the time of writing:

  • The guide uses the Base network and USDC. Stripe's machine payments overview lists Base as the network for x402 stablecoin payments, with Tempo and Solana listed for MPP.
  • Stablecoin payments are available to businesses in all US states except New York. Businesses elsewhere are asked to email Stripe to request access.
  • The feature uses a preview version of Stripe's API.
  • To accept cards alongside stablecoins, Stripe points to a separate protocol it supports, the Machine Payments Protocol (MPP).

This is a developer integration. You build an endpoint that returns the 402 challenge, verifies payment and records it.

Does an online store need x402?

Probably not yet for its main checkout. x402 is built for paying per request, which suits paid APIs, data feeds, articles and other digital resources better than a cart of physical products.

For a store selling goods, AI agent checkout runs mostly through other standards. UCP is behind checkout in Google's AI surfaces, ACP came from OpenAI and Stripe, and the card networks have their own agent programs, which we cover in how Visa, Mastercard and Amex handle AI agents. Our comparison of ACP, AP2, UCP and x402 sets the four side by side.

x402 is worth a look if you:

  • sell digital content or data that an agent might want to buy one item at a time
  • run an API and want to charge agents without accounts or API keys
  • already accept stablecoins and are comfortable with that compliance work

Two related things often get mixed up with x402:

  • Cloudflare pay per crawl also returns HTTP 402, with a price, to AI crawlers. Cloudflare's documentation says it is in closed beta and does not mention x402, so treat them as separate.
  • Visa's Trusted Agent Protocol lists a "browsing IOU" for 402 responses in its specification, and Visa has said it is working with Coinbase on interoperability with x402. That work is still developing.

Note. x402 and the products built on it are moving quickly. Check the x402 Foundation's site and your payment provider's current documentation before you build.

Does Sill support x402?

No. Sill does not support x402 today.

Sill shows you which AI agents and bots visit your site and what they ask for and buy. When an AI agent places an order, your rules approve it, decline it or hold it for a person to review, and every decision is signed and recorded. Sill is not a payment processor, and Stripe is the only live payment rail. Run a free readiness scan to see how your site looks to AI agents.

Questions people ask

Does x402 only work with cryptocurrency?

Today most x402 payments use stablecoins such as USDC. The Linux Foundation describes the protocol as covering payment methods from traditional cards to stablecoins, but the working integrations we checked, including Stripe's, settle in stablecoins.

Do shoppers or AI agents pay a fee to use x402?

The x402 site advertises zero protocol fees and says customers and merchants pay only payment network fees. Any payment provider you use, such as Stripe, may still have its own pricing.

Is x402 the same as Cloudflare's pay per crawl?

No. Both use the HTTP 402 status code, but Cloudflare's pay per crawl documentation does not mention x402. Pay per crawl is a Cloudflare feature, in closed beta, for charging AI crawlers.

Can I accept x402 payments without writing code?

Not in the setups we reviewed. Stripe's x402 guide has you build a server endpoint that returns the 402 challenge and records each payment, so you need a developer.

Sources

  1. Linux Foundation: Operational launch of the x402 Foundation · checked 16 Nov 2026
  2. Cloudflare press release: Cloudflare and Coinbase will launch the x402 Foundation · checked 16 Nov 2026
  3. GitHub: x402 protocol repository (x402 Foundation) · checked 16 Nov 2026
  4. x402.org · checked 16 Nov 2026
  5. Stripe docs: x402 · checked 17 Nov 2026
  6. Stripe docs: Machine payments · checked 17 Nov 2026
  7. MDN: 402 Payment Required · checked 16 Nov 2026
  8. Cloudflare docs: What is pay per crawl · checked 16 Nov 2026
  9. Visa: Trusted Agent Protocol specifications · checked 16 Nov 2026
  10. Visa: Visa introduces Trusted Agent Protocol · checked 16 Nov 2026

Written by The Sill Signals Team. Last reviewed 17 Nov 2026.

Share this articleLinkedInXBlueskyEmail

Keep reading

See which AI agents visit your site, and decide what they may do.

Scan your site free