GET /discover, and the POST /x402/access endpoint handles challenge and settlement:
- Discovery —
GET /discoverreturns all available plans (HTTP 200).POST /x402/accesswithoutplanIdreturns HTTP 400. - Challenge —
planIdpresent, nopayment-signatureheader, creates a PENDING record. - Settlement (subscription) —
planId+payment-signature, settles on-chain, returns anAccessGrant(JWT). - Settlement (per-request standalone) —
planId+resource+payment-signature, settles on-chain, proxies to the backend, returns aResourceResponse(API data, no token).
For a full sequence diagram of the Discovery → Challenge → Settlement flow, see How It Works.
Four Cases
- Case 1: Discovery
- Case 2: Challenge
- Case 3: Settlement
- Case 4: Route-Based Settlement
Use The discovery response contains one entry per plan configured in
GET /discover to browse all available plans. No PENDING record is created — this is a pure pricing query.Note: POST /x402/access without planId returns HTTP 400 with a pointer to this endpoint.Request
Response
SellerConfig.plans, plus any route metadata when per-request routes are enabled.For the complete HTTP headers reference, see API Reference → Overview.
EIP-3009 Authorization
Thepayment-signature header carries a signed EIP-3009 transferWithAuthorization. This means the client signs an off-chain authorization that permits a specific USDC transfer, but never sends a transaction directly and never pays gas.
The server (or a facilitator like Coinbase CDP) executes the transferWithAuthorization call on-chain, paying the gas fees. The USDC moves from the client’s wallet to the seller’s wallet in a single atomic transaction.
Decoded payment-signature Structure
payload.signature— the EIP-3009 signature authorizing the USDC transfer.payload.authorization— the transfer parameters: sender, recipient, amount (in USDC base units, 6 decimals), validity window, and a random nonce.accepted— echoes thePaymentRequirementsfrom the 402 response, so the server can verify the client accepted the correct terms.
Next Steps
Paying for Access
Step-by-step client guide: discover plans, sign EIP-3009, and use the access token.
A2A Flow
The JSON-RPC based agent-to-agent payment flow for native A2A clients.
Settlement Strategies
Facilitator vs. gas wallet settlement and how EIP-3009 is executed on-chain.
State Machine
The full PENDING / PAID / DELIVERED / EXPIRED / REFUNDED lifecycle.

