Home › Learn › x402 agent payments

For developers

What Is x402? How AI Agents Pay for APIs

Card payments were built for people at a checkout. AI agents and apps need something else: to pay a few cents for one answer, instantly, without signing up anywhere. That is what x402 does.

Updated October 2, 2026·6 min read

The one-sentence version

x402 turns the web's old "402 Payment Required" status code into a working payment: a website names a price for a request, an AI agent pays it in USDC from its own wallet, and the website answers, all inside one ordinary web request. It is an open standard, maintained by the x402 Foundation, and works on Solana.

How one paid request works

  1. The agent asks for something, say today's weather for one city.
  2. The website answers "402 Payment Required" with the price ($0.01), the network (Solana), the token (USDC) and the wallet to pay.
  3. The agent signs a USDC transfer to that wallet and sends the same request again with the signed payment attached.
  4. A facilitator checks and settles it: the right amount, the right token, the right wallet, then it confirms the payment on Solana.
  5. The website answers with the weather. The whole round trip takes a few seconds.

No account, no card, no monthly plan. The agent pays for exactly what it uses, one request at a time.

Why not just use cards or API keys?

Card paymentsAccount + API key billingx402
Smallest sensible paymentAbout $0.50 (fees)A monthly invoiceA cent or less
Sign-up neededCard detailsAn account per serviceNone, just a wallet
Who can payPeoplePeople, then their codeAgents and apps directly
SettlementDaysEnd of the monthSeconds, on-chain
ChargebacksYesDisputesNo, a confirmed payment is final

What a facilitator does, and doesn't

The seller's server doesn't need to understand Solana. It hands each payment to a facilitator, which checks the transfer, adds its signature as the fee payer, sends the transaction and reports back once it's confirmed. On Solana's "exact" scheme the transfer goes straight from the agent's wallet to the seller's wallet: the facilitator pays the network fee but never receives the payment. That is the same non-custodial rule as an ordinary crypto checkout.

What to watch for

How the Advance Bit Coin Gateway does it

The Advance Bit Coin Gateway is an x402 facilitator for Solana. A merchant points any x402 library at the gateway, sets a price per request, and agents pay in USDC (or USDT or $ABC) straight to the merchant's store wallet. The gateway checks each payment with the x402 Foundation's own reference verifier, adds its own safety rules (only its merchants, only to their own wallet, a $0.001 minimum, capped network fees), pays the network fee and confirms it on Solana. Test stores do the same on devnet with free test coins. The developer guide has the setup.

Disclaimer: educational content, not financial, tax or legal advice. See the risk disclaimer.

Charge per request

Set up agent payments on your own API, or try everything first in test mode with free devnet coins.

Read the setup guide