The 402 flow
Payment methods
Compose Key
A bearer token that handles payment server-side. The SDK creates and stores it automatically.Raw x402
For wallet-native clients, the server returns402 with a PAYMENT-REQUIRED header. The client signs and retries with PAYMENT-SIGNATURE:
x402Version: 2 and an amount field.
x402 schemes
Pricing
The API applies a 1% platform fee on top of the raw provider amount. Pricing is dynamic — each model’s price comes from the generated catalog, not a fixed table.OpenRouter charges 5.5%. Compose charges 1%. That is a 5.5x difference, and it is factual.
Multi-chain support
Payments settle in USDC on 6 chains:
The
X-CHAIN-ID header selects the settlement chain. Examples in these docs use 43113 (Fuji).
Related
- x402 Facilitator — protocol reference, verify/settle endpoints
- SDK Payments — TypeScript API for Compose Keys and raw x402
- Sessions & Keys — pre-approved spending limits
- Metering — how provider output becomes a bill