The flow
The quote
When you hit a paid endpoint without payment, the server replies:payment-required:
The proof
You sign a EIP-3009TransferWithAuthorization
typed-data structure with your private key:
X-PAYMENT request header (base64
of the full PaymentPayload JSON — see the
Coinbase x402 SDK for the precise
shape).
Replay protection
Thenonce field is your replay-protection key. Aegis writes one
row to x402_payments per verified proof, with a UNIQUE(payer, nonce)
constraint. A re-sent X-PAYMENT header gets rejected with 402.
Generate a fresh nonce per request (e.g. os.urandom(32).hex()).
Settlement
The facilitator (default:https://x402.org/facilitator, hosted by
Coinbase) calls USDC.transferWithAuthorization(…) on your behalf.
The transaction lands on Base; the resulting tx_hash is recorded in
our audit log and you can verify it on
Basescan (or
sepolia.basescan.org for testnet).
Networks
Today Aegis settles on Base only. Multi-chain settlement (Polygon, Arbitrum) is on the roadmap — see Networks.Errors
A 5xx after a successful settle is unusual but possible. We log every
such case to our audit channel; if you see one, contact support.

