Skip to main content
Aegis uses the x402 protocol for all paid endpoints. No API keys, no OAuth — every paid call is a tiny on-chain USDC transfer authorized by the caller, settled by Coinbase’s facilitator service.

The flow

The quote

When you hit a paid endpoint without payment, the server replies:
Decoded payment-required:

The proof

You sign a EIP-3009 TransferWithAuthorization typed-data structure with your private key:
Encode the signed payload as the X-PAYMENT request header (base64 of the full PaymentPayload JSON — see the Coinbase x402 SDK for the precise shape).

Replay protection

The nonce 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.