How it works
Server returns 402
Server responds with HTTP
402 Payment Required, including payment requirements — USDC amount and receiving address.Client pays and retries
Client pays USDC on Base and retries the request with an
X-PAYMENT header containing the signed payment proof.Server verifies payment
Server verifies the payment and extracts the payer wallet address from the EIP-3009 or Permit2 payload.
Your wallet address is extracted from the payment proof. It becomes your user identity and scopes
all your memories. No registration needed.
Payment methods
Two EVM payment signature types are supported:- EIP-3009 —
transferWithAuthorization - Permit2 — Uniswap’s permit-based transfer
Making authenticated requests
Three options for making authenticated requests:-
@x402/fetch — JavaScript SDK
-
@x402/cli — CLI tool
- Direct signing — Construct payment headers manually. See x402.org/docs for the full specification.