Start hereLive
How it works
One request, one 402, one signature, one Solana transaction. This is the full path of a paid call and who does what along it.
The round trip
- 1The agent sends an ordinary request, for example
GET /api/forecast?city=Lisbon. - 2The seller’s Axon Gate answers
402 Payment Requiredwith aPAYMENT-REQUIREDheader: base64 JSON listing the offers it accepts. Each offer names the scheme (exact), the network, the token mint, the amount in atomic units, thepayToaddress and the facilitator’s fee-payer address. - 3The agent’s client picks an offer it is allowed to pay (this is where the mandate is checked), builds a Solana transaction that moves exactly that amount with SPL
TransferChecked, and signs it as owner of the tokens. The fee-payer signature is left empty. - 4The agent repeats the same request with the signed transaction in a
PAYMENT-SIGNATUREheader. - 5The gate asks the facilitator to verify the transaction (right mint, right amount, right recipient, nothing extra), runs the handler, then asks it to settle: the facilitator adds its fee-payer signature and submits.
- 6The response comes back with the body and a
PAYMENT-RESPONSEheader holding the transaction signature. That signature is the receipt.
GET /api/forecast?city=Lisbon HTTP/1.1
Host: seller.example.com
HTTP/1.1 402 Payment Required
PAYMENT-REQUIRED: eyJ4NDAyVmVyc2lvbiI6Mi… (base64 JSON: the offers)
GET /api/forecast?city=Lisbon HTTP/1.1
Host: seller.example.com
PAYMENT-SIGNATURE: eyJ4NDAyVmVyc2lvbiI6Mi… (base64 JSON: the signed transfer)
HTTP/1.1 200 OK
Content-Type: application/json
PAYMENT-RESPONSE: eyJzdWNjZXNzIjp0cnVl… (base64 JSON: the receipt)
{"city":"Lisbon","summary":"Clear, 21°C, wind 9 km/h"}Who does what
| Role | Runs | Keys it holds |
|---|---|---|
| Seller | Axon Gate (x402 middleware) inside its own server | None. It only publishes a payTo address. |
| Agent (buyer) | An x402 client wrapped around fetch | Its own agent keypair, funded with a small balance |
| Facilitator | The verify and settle endpoints (Axonpay runs one; others exist) | A fee-payer keypair. It pays the SOL fee but cannot redirect the transfer. |
| Axonpay | Its facilitator, the receipts ledger, dApp, Agent Shop, 402 Inspector, Leash, MCP server | Only its facilitator's fee payer. None of yours: agent keys are encrypted in your browser. |
Why Solana
- Fast enough to sit inside a request. Slots are about 400 ms and a transfer is usually confirmed in one to two seconds, so the paid response arrives in roughly the time of a slow API call.
- Cheap enough for sub-cent prices. The base fee is 5,000 lamports per signature. An x402 payment carries two, so the network fee is 0.00001 SOL, and the facilitator pays it.
- Native dollars. USDC is a first-class SPL token with deep liquidity; nothing has to be bridged.
- Room for several transfers in one transaction. That is what planned composite calls and revenue splits build on.
- Public, permanent signatures. Receipts that anyone can check without trusting Axonpay.
Where Axonpay fits
x402 is an open protocol, and its reference packages already speak Solana. Axonpay does not fork it. Axon Gate and the agent client are thin layers over the official @x402/* packages, so whatever you build here interoperates with every other x402 client and server.
What Axonpay adds sits around the protocol: a free facilitator that settles Solana and records every settle, a shop to be found in, an inspector to read a price before paying, wallets and mandates that keep agents in bounds, and an Axon Score computed from receipts.