Two payment modes
Three x402 schemes
When using raw x402, the server advertises which payment schemes it accepts. The SDK signs accordingly:The payment flow
Receipts
Every paid response includes a settlement receipt with:- The final amount charged (may differ from the advertised price for
upto) - Transaction hash (for
exactandbatch-settlementclaims) - Token usage breakdown per agent and model
- Fee distribution
Session budgets
When using a Compose Key, you can set a spending limit per session. The SDK tracks the remaining budget in real time via response headers and emitsbudget events: