x402 (USDC on Base)
Coinbase-verified payments over USDC on Base. Sign once, settle once, get your token. No gas required from the paying wallet.
How the rail works
POST /subscribewith no payment header → server returns402with the challenge body.- Read
accepts[].network,amount,asset,payTo. - Sign an EIP-3009
transferWithAuthorizationfor that amount + asset + payTo, with your wallet's private key. - Base64-encode the signed payload.
- Re-POST
/subscribewithX-PAYMENT: <base64>. - The Coinbase x402 facilitator (x402.org) verifies the signature, settles on-chain.
- Server issues your bearer + binds the number to your wallet.
Network
Production settles in USDC on Base mainnet. Always read the asset address and amount from the live 402 challenge body at runtime — don't copy any address out of these docs.
Why x402
- No gas from the paying wallet. Settlement happens via meta-transaction; the facilitator pays gas.
- Coinbase-verified. Mature settlement infrastructure, predictable confirmation latency.
- HTTP-native. The 402 challenge + retry pattern is just HTTP.
See also
- Payment overview
- MPP — alternative rail
- /subscribe reference — full schema