x402 is an open standard for paying over HTTP. When a client requests a paid resource, the server answers with status code 402 Payment Required and a price. The client pays, sends the same request again with proof of payment, and the server returns the resource. No account, card or API key is involved.
How an x402 payment works
- Request. An app, website or AI agent requests a paid API, file or page.
- Quote. The server replies
402 Payment Requiredwith the amount, the network and where to pay. - Pay. The wallet checks the quote against your rules, signs a payment and repeats the request with a payment header.
- Deliver. The server verifies the payment and returns
200 OKwith the resource and a payment receipt.
# Your app or agent asks for a paid resource GET /api/report HTTP/1.1 Host: data.example.com # The service quotes a price HTTP/1.1 402 Payment Required PAYMENT-REQUIRED: scheme=exact; network=bsv:mainnet; amount=1000 sat; payTo=… # paymail.ai pays in BSV and repeats the request GET /api/report HTTP/1.1 PAYMENT-SIGNATURE: … HTTP/1.1 200 OK PAYMENT-RESPONSE: settled; txid=9f3c…a41e
x402 compared with API keys and cards
| API key or card | x402 | |
|---|---|---|
| Account | Required for each service | None |
| Payment method | Card, KYC, prepaid credits | A wallet that can pay |
| Smallest practical payment | Usually cents or more, often bundled | A few hundred sat on BSV |
| Settlement | Days, with chargeback risk | Accepted in seconds, recorded on chain, no chargebacks |
| AI agents | Need stored keys or cards | Pay per request within limits |
| Protocol fee | Processor fees | None; network fee only |
How paymail.ai uses x402
paymail.ai is a non-custodial Bitcoin wallet that answers x402 requests in BSV.
- You stay in control. The app shows the amount and the recipient, and you approve with Face ID.
- Agents get limits. Allow an agent to pay on its own within per-payment and hourly limits you set.
- Payments go direct. BSV moves from your keys to the service. paymail.ai never holds funds and adds no fee.
- Developers. An SDK and an MCP server for x402 on BSV are in preparation. Contact us for early access.
Why BSV for x402
x402 works best when a single request can be paid on its own. BSV network fees are typically a few sat, so payments of a few hundred sat stay practical, and transactions are accepted by the network within seconds.
Frequently asked questions
Is x402 a cryptocurrency?
No. x402 is a payment protocol, not a coin or token. It describes how a server asks for payment over HTTP and how a client proves it has paid. The payment itself settles on a blockchain; with paymail.ai that blockchain is BSV.
Who created x402?
x402 was created by Coinbase. In 2026 it moved to the x402 Foundation under the Linux Foundation, which now stewards it as a vendor-neutral open standard.
Do I need an account to pay with x402?
No. The payment travels with the request, so there is no sign-up, card or API key. You only need a wallet that can pay, such as paymail.ai.
Does x402 charge fees?
The protocol has no fees of its own. You pay the price the service asks plus the blockchain network fee, which on BSV is typically a few sat. paymail.ai adds no fee.
Can AI agents pay with x402?
Yes. x402 was designed so software can pay without a human filling in forms. In paymail.ai you set per-payment and hourly limits, and anything outside those limits needs your approval.
Which blockchains does x402 work with?
x402 is not tied to one network. Many services settle in stablecoins on other chains today. paymail.ai pays x402 requests in BSV.
Learn more
The x402 specification and reference implementations are published by the x402 Foundation at x402.org.