· Ilya Kaminsky  · 5 min read

Allow AI Agents to Pay With x402

Software agents have budgets to spend, but traditional signups still require a human. Here is how to let them buy access directly on their first request.

Software agents have budgets to spend, but traditional signups still require a human. Here is how to let them buy access directly on their first request.

An agent can find a useful API and still need your help buying access. It asks permission to register an account, comes back for credit card details, and then needs an API key from a dashboard only you can open. None of these steps are difficult, but each one pulls you back into work you intended to delegate.

If you sell an API, your own checkout probably creates that same friction. Requiring a human to complete account setup makes even a routine tool call depend on someone being available at their desk.

With x402, an agent that has a funded wallet and permission to spend can pay your API directly in the request. The operator stays out of the loop, and your business gets paid on the first call. This post explains how the protocol works and what accepting machine payments involves.

How x402 works

HTTP reserved status code 402 Payment Required in the 1990s for future use. The x402 protocol turns that status into an open standard that returns a clear price quote:

  1. The agent sends an HTTP request.
  2. The server answers 402 with a price quote.
  3. The agent checks the price against its spending cap and signs an authorization.
  4. A facilitator verifies and settles the payment, and the server does the work.

Payment settles in USDC. Sellers can settle incoming transfers straight into Stripe next to their card payments, with no volatile tokens to manage.

It already works in production

I founded Speech is Cheap, an audio transcription API that accepts x402 end to end in production, alongside its regular card checkout.

Everything about it is public:

What your customers gain

Operators fund a wallet once and set a spending cap. Because the client checks each quote before signing, there is no stored card or key to leak and no surprise invoice at the end of the month. Even if an agent gets stuck in a loop, it can’t spend past the budget its operator set.

The upto scheme lets an agent authorize a ceiling while you charge actual usage. That fits inference, database queries, and other compute where the cost is unknown until the work finishes. Model Context Protocol servers can also bill per tool call using @x402/mcp or Cloudflare’s Agents SDK, so an assistant can use a paid tool without anyone setting up an account.

What your business gains

  • The first call is the first sale. Traditional developer checkouts require signup forms, email verification, and credit card entry before issuing an API key. Each of those steps sends the agent back to its operator. With x402, an agent discovers your endpoint and buys on its initial request.
  • Payments can be as small as a penny. Standard credit card processing fees make tiny transactions impractical, and Stripe card payments for agents start at $0.50. Through x402, Stripe accepts payments down to 0.01 USDC, which makes a one-cent API call a sale worth making.
  • No chargebacks. Settled payments are final. Your business avoids payment disputes and stolen-card fees, and refunds remain entirely your decision.
  • It runs alongside your existing checkout. Accepting machine payments does not disrupt your current sales flow. The x402 flow runs alongside your regular card checkout, so your existing customers keep paying the way they do today.
  • It is early. Agent payment volume is still small. A report from September 9, 2026 by TRM Labs estimated that only 0.6% to 7.5% of x402 volume comes from genuine agent activity. I see that gap as an opportunity: if agent spending grows, the services that already accept it will be the ones agents have already found.

Follow the lead of Speech is Cheap

Accepting x402 takes four pieces:

  • Receiving address. Choose a private wallet, a Coinbase account, or a Stripe deposit address. Speech is Cheap uses a Stripe deposit address, so x402 revenue lands in the same Stripe account as its usual card payments.
  • Facilitator. Use a settlement facilitator like Coinbase CDP, which offers 1,000 free transactions a month, then costs $0.001 each.
  • Middleware. Add drop-in packages for frameworks like Express, Hono, Next.js, and Fastify, alongside Python and Go SDKs.
  • Discovery. Publish an OpenAPI document and a /.well-known/x402 endpoint. Adding Bazaar metadata to quotes and completing one paid call lists you in Coinbase’s directory.

Because payment clears before the work, decide pricing and refunds up front. Speech is Cheap quotes by declared audio length, then refunds unused cents and failed jobs to keep its promise that customers pay only when a job completes.

Plan for a few rough edges: Stripe accepts only USDC on Base, replays of a paid request must never charge twice, and testing costs a few real cents because there is no sandbox.

Getting help

When an autonomous agent with a budget finds your service, x402 lets it buy access on the spot while its operator stays out of the loop. If you want your service to accept agent payments, email me. I am happy to look at your setup, share what Speech is Cheap learned from its rollout, and help you get it running.

    Share:
    Back to Blog

    Related Posts

    View All Posts »
    Deploying AI to the Cloud

    Deploying AI to the Cloud

    This is a tale of the hurdles I had to overcome in my pursuit of deploying an artificial intelligence based program to the cloud…