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
- The agent asks for something, say today's weather for one city.
- The website answers "402 Payment Required" with the price ($0.01), the network (Solana), the token (USDC) and the wallet to pay.
- The agent signs a USDC transfer to that wallet and sends the same request again with the signed payment attached.
- A facilitator checks and settles it: the right amount, the right token, the right wallet, then it confirms the payment on Solana.
- 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 payments | Account + API key billing | x402 | |
|---|---|---|---|
| Smallest sensible payment | About $0.50 (fees) | A monthly invoice | A cent or less |
| Sign-up needed | Card details | An account per service | None, just a wallet |
| Who can pay | People | People, then their code | Agents and apps directly |
| Settlement | Days | End of the month | Seconds, on-chain |
| Chargebacks | Yes | Disputes | No, 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
- Agent wallets hold real money. Give an agent a small balance and a spending limit, the way you would a prepaid card.
- Sellers: keep keys on your server. Your gateway API key belongs on the server that asks for payment, never inside an agent or a web page.
- Check where payments land. Every x402 payment is a Solana transaction you can look up on Solscan; it should arrive at your own wallet address.
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.
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