x402·HTTP-native payments
This is how the internet
should have worked.
x402 revives the dormant HTTP 402 'Payment Required' status code. Pay per request, in stablecoins, inline with the HTTP exchange. No accounts, no subscriptions, no billing ops.
How it works
A three-message exchange.
The client makes a request, the server responds with payment terms, the client retries with a payment token. That's the whole protocol.
01Client sends request
GET /api/premium/alpha HTTP/1.1 Host: signals.xyz Authorization: Bearer x402-wallet:SOL1...
02Server responds with payment terms
HTTP/1.1 402 Payment Required X-Payment-Amount: 0.001 USDC X-Payment-Recipient: SOL2... X-Payment-Chain: solana-mainnet X-Payment-Memo: alpha-signals-v1
03Client pays and retries
GET /api/premium/alpha HTTP/1.1
Host: signals.xyz
X-Payment-Receipt: 3xK9...fA2
→ 200 OK
{ "signals": [...] }Why x402
The properties that matter.
- HTTP-native — no new protocols, no proprietary SDKs
- Stateless — no accounts, no cookies, no sessions
- Streaming-friendly — per-call payments without subscriptions
- Composable — agents chain paid calls across providers
- Open — any language, any framework, any provider
- Audit-trailed — every payment produces a cryptographic receipt
Integrate x402 today.
BRIJ maintains reference implementations for Express, Hono, Fastify, Next.js, and more. Pick a framework, drop in middleware, start earning.