x402 / Agentic

x402 Pay Per API Call: Let AI Agents Pay Your API

Short answer: x402 pay per API call means an AI agent pays for each request inside HTTP. Your server answers 402 with a price; the agent pays USDC on Base and retries. Payzum runs this as a proxy in front of your API, no code needed, and an external facilitator settles payment to your wallet.

Key takeaways

  • HTTP has reserved 402 Payment Required since 1997 without ever defining it. x402 turns it into a working exchange: request, price, signed payment, retry, data.
  • The new API buyer is software. An agent arrives for a burst of calls with no account and no card, and it has to pay inside the same request.
  • Agents pay in USDC on Base. A confirmed payment is final, so there are no chargebacks, and it lands in a wallet you control.
  • Payzum is the middleware in front of your API, not the facilitator. You enter your endpoint, its API key and a price. Coinbase's facilitator settles each payment.
  • Demand is real but young. Chainalysis counted more than 138 million x402 transactions on Base by September 2026, most of them between one and ten cents.

What x402 pay per API call means, and why HTTP 402 sat unused

Pay per API call is a plain idea. The buyer pays a small amount for one request, gets one response and owes nothing else, with no plan or account to set up first. x402 is the open protocol that makes this work over ordinary HTTP, and its name points at the status code it finally puts to use.

That code spent decades doing nothing. When HTTP/1.1 was published as RFC 2068 in January 1997, the full entry for 402 read: "This code is reserved for future use." The current HTTP standard, RFC 9110 from June 2022, still says the same thing. MDN calls 402 nonstandard and notes that no common convention for it exists.

x402 supplies the missing convention. A server answers an unpaid request with 402 and machine-readable payment terms. The client pays in a stablecoin and sends the request again with proof attached. The server checks the payment and returns the data.

The protocol also has neutral governance now. On July 14, 2026 the Linux Foundation announced the operational launch of the x402 Foundation. Coinbase contributed the protocol. Forty organizations had joined as members since April, among them Visa, Mastercard, Google, AWS, Cloudflare and Circle. Our map of the x402 ecosystem covers who does what.

Agentic payments for APIs: the buyer is now a program

Agentic payments for APIs are payments an AI agent makes by itself, with no person approving each one. The agent is a program working through a task. It calls models, tools and data feeds along the way, and some of those calls cost money.

Picture an agent asked to size a niche market. Within a minute it might buy a stock quote, run one inference, screen a company against a sanctions list and pull a small dataset. That is four sellers and four payments of a few cents each. A person would never open four accounts for that, and the agent can't open even one.

The visit pattern differs too. A human customer onboards once and stays for months. An agent shows up for a burst of work, makes a handful of calls and may never return under the same identity. So the payment has to be as small and as short-lived as the visit.

On-chain data shows the pattern. In an October 14, 2026 report, Chainalysis counted more than 138 million x402 transactions on Base over the 16 months to September 2026. Over 87% sat between a hundredth of a cent and a dime, and the most common size was one to ten cents. Wallets also started spending sooner. In late 2025 the median wallet making an x402 payment was 73 days old. By Q3 2026 that figure was 18 minutes.

Why an agent stalls at your signup page

Most API businesses sell through a funnel built for people. A developer reads the docs, creates an account, adds a card, picks a plan and copies a key. Each step assumes a person with an inbox and a card.

An agent brings none of that. When it hits a signup wall, one of three things happens. It switches to a free endpoint that answers well enough. A developer pastes one shared key into the agent and quietly absorbs the bill. Or your API simply never gets the call. In all three cases the demand reached you and paid nothing.

Plans make it worse. Say an agent needs 200 calls this week and none next week. A monthly tier is the wrong shape for that, so the agent walks. That long tail of small, irregular usage is exactly the part that grows as more software buys on its own.

Then there is the cost of running the funnel itself. You maintain signup, key storage, rate limits, metering and failed-card emails, and you handle disputes on the cards behind your plans. None of that adds value to the one response the buyer wanted.

Cards, plans and custodial checkouts all assume a person

The cause sits in how card networks were designed. They were built around a cardholder's identity, an ongoing billing relationship and the right to dispute. Because a charge can be reversed months later, processors want accounts, checks on the cardholder and holding periods. A stateless agent buying a one-cent answer can offer none of these.

Card pricing also carries a fixed fee per transaction, and that fee alone can exceed what one response is worth. So even an agent holding a card could not be charged per call without you losing money. Our price-floor analysis puts numbers on where each rail stops working.

Custodial crypto checkouts don't solve it either. The money still lands in a platform balance first and is paid out later, which brings back the hold-and-release delay. A machine buyer needs the opposite: a payment made inside the request, sized to one unit, cleared in seconds and impossible to claw back.

The x402 handshake, header by header

The current spec is x402 version 2, dated December 9, 2025 in the version history of the x402 specification. Over HTTP it uses three headers, each carrying base64-encoded JSON:

  1. The agent sends an ordinary request to a paid URL.
  2. The server replies 402 Payment Required with a PAYMENT-REQUIRED header. It lists what the server accepts: scheme, network, amount, asset, the payTo address and a time limit.
  3. The agent's wallet signs a payment for one of those options. It repeats the request with a PAYMENT-SIGNATURE header.
  4. A facilitator verifies the signature and settles the transfer on-chain. The server returns 200 OK with the data and a PAYMENT-RESPONSE header that holds the transaction hash.

Here is the round trip with the headers decoded and trimmed for reading:

# 1) The agent asks for data
GET /v1/quote?symbol=ACME HTTP/1.1
Host: api.yourservice.com

# 2) The server names its price (PAYMENT-REQUIRED, decoded)
HTTP/1.1 402 Payment Required
PAYMENT-REQUIRED: {
  "x402Version": 2,
  "accepts": [{
    "scheme": "exact",
    "network": "eip155:8453",
    "amount": "20000",
    "asset": "<USDC contract on Base>",
    "payTo": "<your wallet>",
    "maxTimeoutSeconds": 60
  }]
}

# 3) The agent pays and asks again
GET /v1/quote?symbol=ACME HTTP/1.1
Host: api.yourservice.com
PAYMENT-SIGNATURE: <signed payment, base64>

# 4) Settled: the data plus a receipt
HTTP/1.1 200 OK
PAYMENT-RESPONSE: { "success": true, "transaction": "0x...", "network": "eip155:8453" }
Content-Type: application/json

{ "symbol": "ACME", "price": "..." }

Two details matter when you set prices. Amounts are written in the token's smallest unit, and USDC has six decimals, so "20000" means two cents. And eip155:8453 is Base mainnet, written in the chain-ID format that version 2 adopted.

The facilitator is the only piece that touches the chain. The spec describes it as a service that verifies and settles payments, so the server selling the data never has to run blockchain code. The payTo field names the seller's own address, which is why the money goes straight to the seller.

Where Payzum sits: proxy in front, facilitator behind

Payzum is the x402 middleware in front of your API. It is not the facilitator. In the dashboard you enter your existing endpoint, the API key or bearer token that endpoint expects, and a price per call. Payzum then publishes an x402 URL for it.

When an agent calls that URL, Payzum returns the 402 with your terms. The signed payment goes to an external facilitator, currently Coinbase's, which verifies it and settles the USDC on Base to your wallet. Payzum then forwards the paid request to your real endpoint with your key and passes the response back. Your API sees a normal authenticated call. You write no code and implement no protocol, so you can serve paying agents the same day.

Coinbase's facilitator already carries real volume. Its documentation, checked in October 2026, lists Base, Polygon, Arbitrum and Solana among its networks. It reports more than 100 million transactions and $28 million in payment volume across Base and Solana.

Settlement is non-custodial. Payzum never pools or holds the USDC, so there is no Payzum balance for anyone to freeze. Base seals a full block every two seconds, with preconfirmations in about 200 milliseconds, according to its throughput documentation. Once the transfer confirms, it is final, and there is no chargeback window.

Around the payment you get the usual Payzum tooling: a REST API with keys, signed webhooks for each settled call, encrypted secrets, 2FA and a full audit log. The x402 page shows the dashboard, and our non-custodial processor guide explains the settlement model.

Switch on pay per API call in four steps

  1. Add your endpoint. Enter the URL of the API you already run and the key or bearer token it requires. Your code stays as it is.
  2. Price one call and choose the wallet. Set what a single request costs in USDC and the Base address that receives it. Payzum gives you the public x402 URL.
  3. Publish the URL where agents look. Put it in your docs, your tool listings and your MCP server description. From then on, each call through that URL pays before it reaches you.
  4. Reconcile from both ends. Signed webhooks report each settled call to your systems for metering and accounting. The same payments show up in your own wallet history.

On cost: Payzum has not published a price for x402 yet, so ask us for a quote on a call. For reference, Payzum's fee on regular crypto sales is 0.5% per processed sale, deducted from the amount received, plus on-chain gas.

Worked example: one research agent, 260 calls, two pricing models

The figures below are illustrative, not data from a Payzum customer. A market-data API sells a $49 monthly plan with 10,000 calls, about half a cent per call. It also offers its quote endpoint through x402 at $0.02 a call, inside the one-to-ten-cent band where Chainalysis found most x402 payments.

One research agent needs quotes in bursts over a month:

WeekCalls the agent needsRevenue from the $49 planRevenue at $0.02 per call (gross)
Week 1200$0$4.00
Week 20$0$0.00
Week 360$0$1.20
Week 40$0$0.00
Month260$0$5.20

The plan earns nothing because the agent never signs up. Even a developer buying on its behalf would hesitate: 260 calls is 2.6% of the quota, so each call would effectively cost $49 / 260, about $0.19. That is more than nine times the per-call price.

Per call, the same demand brings in $5.20 gross, before Payzum's x402 fee and gas. Scale it to 400 agents with the same habits and you get 104,000 calls and $2,080 a month from buyers who would otherwise pay nothing. In the 402 for each of those calls, the amount field reads "20000".

Which APIs and tools fit per-call pricing

Per-call pricing suits anything an agent consumes on demand, where a plan is too heavy and free leaves money on the table:

  • Market and reference data. A single quote, a weather reading, a sports result or a company lookup. The agent buys only the answer it needs.
  • Inference and enrichment. Charge per model call or per enriched record, so heavy compute is paid for when it runs instead of being averaged into a flat fee.
  • MCP servers and agent tools. Any tool reachable over HTTP can sit behind an x402 URL, so each invocation pays. Our guide to monetizing an MCP server walks through it.
  • Search, scraping and retrieval. Meter an expensive index per query instead of handing out a key that can leak or be overused.
  • Overflow past a free tier. Keep your free allowance on your normal API for discovery and offer the x402 URL for agents that need more. An agent that hits your limit can pay and carry on instead of dropping off.

Most providers keep plans for human teams and add x402 for agents, running both side by side. We compare the two models in x402 vs API key billing.

Two live x402 endpoints in Payzum with their per-call USDC price, network, origin auth status and the public x402 URL agents call
Inside Payzum: live x402 endpoints with their per-call USDC price and the public URL agents call.

x402 per call compared with API keys and custodial checkout

What mattersAPI key and monthly planCustodial crypto checkoutx402 through Payzum
Who can buyPeople with an account and a cardPeople who complete a checkout pageAny agent with a funded wallet, inside the request
Unit of saleA month, a tier or a credit packOne orderOne API call
Time to settle1 to 3 days through a card acquirerPaid out later from the platformAbout 2 seconds on Base
Where the money sitsProcessor balance, then a payoutPlatform balance, then a payoutYour own wallet from the first second
ReversalsChargebacks for up to about 120 daysSet by the platform's rulesNone once confirmed
Work on your sideSignup, keys, metering, dunningCheckout integrationDashboard setup, no code

What API providers ask before turning on x402

Didn't micropayments fail already?

They failed for people. Earlier schemes asked a human to approve tiny sums, and card fees were bigger than the payments. Here the payer is software with a budget, so nobody has to approve each cent. The rail is a stablecoin transfer on a chain with two-second blocks. Those two changes are what make a two-cent sale workable.

Is there enough agent demand to bother?

It is early. In a study published September 9, 2026, TRM Labs found $52.7 million across 198.9 million facilitator settlements since May 2025. After screening out self-payments, bulk flows and thin sellers, $25.62 million looked like commerce. Between 0.6% and 7.5% of that looked agentic.

TRM's own summary is that "nothing in the protocol requires an agent." For a seller that matters less than it sounds, because a script with a budget pays exactly like an agent. Setup is one dashboard entry, so finding out costs little. Our read of the three x402 volume counts goes further.

Do I have to change my API?

No. Your endpoint keeps answering requests the way it does today. Payzum stands in front, handles the 402 and hands the payment to the facilitator, then forwards the paid call with your key. Your existing customers keep calling your API directly and never notice. The step-by-step version is in adding x402 to an existing API without code.

Is my money safe with a proxy in the middle?

The proxy never touches the money. The payment terms name your wallet in payTo, the facilitator settles the USDC to that address, and Payzum keeps no balance. A confirmed transfer on Base cannot be reversed, so a paid call stays paid.

Frequently asked questions

What does x402 pay per API call mean?

It means a buyer pays a small stablecoin amount for one API request instead of buying a plan. The server answers an unpaid request with HTTP 402 and its price. The buyer pays, repeats the request with proof of payment and receives the data, all inside normal HTTP.

Why is it called x402?

HTTP has reserved status code 402 Payment Required since RFC 2068 in January 1997, and RFC 9110 still lists it as reserved for future use. x402 is the open protocol that gives that code a working meaning, with stablecoin payments as the settlement method.

How do I let AI agents pay for my API?

Give them a way to pay inside the request, with no signup. With Payzum you enter your existing endpoint, its API key and a price per call. Payzum publishes an x402 URL, returns the 402 and forwards each paid call to your API. You change no code.

What are agentic payments for APIs?

They are payments an AI agent makes on its own to use a paid endpoint, without a person approving each one. The agent reads a price from the HTTP response, pays in a stablecoin and gets the data. x402 is an open protocol built for exactly this.

Is Payzum the x402 facilitator?

No. Payzum is the middleware and proxy in front of your API. It returns the 402 and forwards paid calls to your endpoint. An external facilitator, currently Coinbase's, verifies each payment and settles it on-chain.

What do agents pay with, and where does the money go?

Agents pay in USDC on Base. Each payment settles directly to a Base wallet you control, so Payzum never holds a balance that could be frozen. Once confirmed, the payment is final and cannot be charged back.

Book a meeting to design your x402 flow

Tell us what your API does and how often agents would call it. We'll sketch a pay-per-call flow around it: the price per call, the 402 handshake, USDC settlement on Base to your own wallet, and signed webhooks for metering.

Prefer a direct link? Book a payments consultation · [email protected]

Background reading: the x402 protocol and the HTTP 402 Payment Required status code. Want the broader picture first? Start with our non-custodial processor guide or the developer docs.