Skip to content

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.
euro schemeexact (Algorand)exact (Ethereum / Polygon)
AssetEURO (e-money)EURQ / USDQ (ASA)EURQ / USDQ (ERC-20)
Network idquantoz:mainnetalgorand:mainneteip155:1, eip155:137
SettlementOff-chain via Quantoz APIOn-chain asset transferOn-chain via EIP-2612 permit
Agent needsQuantoz managed accountWhitelisted Algorand wallet holding EURQ/USDQEVM wallet holding EURQ/USDQ (no gas needed)
Merchant needsQuantoz managed accountWhitelisted Algorand addressEVM address
SpeedInstant~5 sec~15 sec – 2 min
Facilitatormcp.ai.quantozpay.com/x402x402algo.ai.quantozpay.comx402algo.ai.quantozpay.com

Start with the euro scheme unless you specifically need on-chain settlement. It requires no blockchain knowledge and settles instantly.

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 OK

The withEurPayment() npm package handles steps 3–4 automatically for the euro and EVM paths. See the agent developer guide.

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.

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.

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).

TokenNetworkIdentifierDecimals
EURQAlgorandASA 27684229546
USDQAlgorandASA 27686037956
EURQEthereum (eip155:1)0x8dF723295214Ea6f21026eeEb4382d475f146F9f6
USDQEthereum (eip155:1)0xc83e27f270cce0A3A3A29521173a83F402c1768b6
EURQPolygon (eip155:137)0xd571edb2ef29df10fcd6200fd6d0ed2389983db36
USDQPolygon (eip155:137)0xb291996477504506bf5f583102b5b5ea5d1e40e06