x402 Payments
x402 is an open protocol built on the HTTP 402 status code. Any web resource can require a small payment before serving content or data. AI agents pay automatically and retry — no registration, no billing portal, no API key exchange.
Quantoz supports x402 with two kinds of money:
- EURO — the e-money token. Balances live in Quantoz managed accounts; settlement is off-chain and instant.
- EURQ / USDQ — the EUR and USD stablecoins, live on Algorand, Ethereum and Polygon.
Payment schemes
Section titled “Payment schemes”euro scheme | exact (Algorand) | exact (Ethereum / Polygon) | |
|---|---|---|---|
| Asset | EURO (e-money) | EURQ / USDQ (ASA) | EURQ / USDQ (ERC-20) |
| Network id | quantoz:mainnet | algorand:mainnet | eip155:1, eip155:137 |
| Settlement | Off-chain via Quantoz API | On-chain asset transfer | On-chain via EIP-2612 permit |
| Agent needs | Quantoz managed account | Whitelisted Algorand wallet holding EURQ/USDQ | EVM wallet holding EURQ/USDQ (no gas needed) |
| Merchant needs | Quantoz managed account | Whitelisted Algorand address | EVM address |
| Speed | Instant | ~5 sec | ~15 sec – 2 min |
| Facilitator | mcp.ai.quantozpay.com/x402 | x402algo.ai.quantozpay.com | x402algo.ai.quantozpay.com |
Start with the euro scheme unless you specifically need on-chain settlement. It requires no blockchain knowledge and settles instantly.
How x402 works (all schemes)
Section titled “How x402 works (all schemes)”1. Agent requests a resource GET /premium-resource (no payment)
2. Server responds 402 with payment options { accepts: [{ scheme: "euro", amount: "0.10", ... }, { scheme: "exact", ... }] }
3. Agent pays and retries with proof GET /premium-resource X-PAYMENT: <base64url proof>
4. Server verifies → serves resource 200 OKThe withEurPayment() npm package handles steps 3–4 automatically for the euro and EVM paths. See the agent developer guide.
The euro scheme
Section titled “The euro scheme”Off-chain payments between Quantoz managed accounts. The facilitator handles payment creation and verification.
{ "scheme": "euro", "network": "quantoz:mainnet", "asset": "EURO", "amount": "0.10", "payTo": "ACC_your_account", "paymentRequestCode": "pr_...", "expiresAt": 1234567890, "facilitator": "https://mcp.ai.quantozpay.com/x402"}Replay protection is handled by the facilitator — each payment request code can only be verified once.
The exact scheme on Algorand
Section titled “The exact scheme on Algorand”On-chain EURQ/USDQ transfers on Algorand. The facilitator validates and submits transactions, and sponsors the network fee — the agent’s wallet needs no ALGO.
{ "scheme": "exact", "network": "algorand:mainnet", "asset": "2768422954", "maxAmountRequired": "500000", "payTo": "YOUR_ALGORAND_ADDRESS", "maxTimeoutSeconds": 300, "facilitator": "https://x402algo.ai.quantozpay.com"}Amounts are in atomic units — EURQ and USDQ have 6 decimal places, so €0.50 = 500000.
The e-money and stablecoin rails are separate: EURO cannot be paid to a blockchain address, and EURQ/USDQ cannot be paid to a managed account. Paying this scheme requires an Algorand wallet holding the tokens.
The exact scheme on Ethereum and Polygon
Section titled “The exact scheme on Ethereum and Polygon”EURQ/USDQ are ERC-20 tokens implementing EIP-2612 permit. The agent signs a gasless permit authorizing the facilitator as spender; the facilitator submits permit + transferFrom on-chain and pays the gas. The agent never needs ETH or POL.
{ "scheme": "exact", "network": "eip155:137", "asset": "0xd571edb2ef29df10fcd6200fd6d0ed2389983db3", "maxAmountRequired": "500000", "payTo": "0xYOUR_MERCHANT_ADDRESS", "maxTimeoutSeconds": 300, "facilitator": "https://x402algo.ai.quantozpay.com", "extra": { "symbol": "EURQ", "spender": "0xFACILITATOR_ADDRESS" }}The extra.spender field tells the agent which address to authorize in the permit — it must be the facilitator’s hot-wallet address. Note this differs from the EIP-3009 flow used by e.g. USDC: EURQ/USDQ do not implement EIP-3009, so stock x402 EVM clients need the Quantoz client package (or the permit recipe in the agent guide).
Token deployments
Section titled “Token deployments”| Token | Network | Identifier | Decimals |
|---|---|---|---|
| EURQ | Algorand | ASA 2768422954 | 6 |
| USDQ | Algorand | ASA 2768603795 | 6 |
| EURQ | Ethereum (eip155:1) | 0x8dF723295214Ea6f21026eeEb4382d475f146F9f | 6 |
| USDQ | Ethereum (eip155:1) | 0xc83e27f270cce0A3A3A29521173a83F402c1768b | 6 |
| EURQ | Polygon (eip155:137) | 0xd571edb2ef29df10fcd6200fd6d0ed2389983db3 | 6 |
| USDQ | Polygon (eip155:137) | 0xb291996477504506bf5f583102b5b5ea5d1e40e0 | 6 |
Next steps
Section titled “Next steps”- Merchants — Protect a resource with x402
- AI developers — Pay x402 resources from an agent