Sign once, settle many times with x402
We shipped a change in our x402 facilitator that allows settling multiple payments with the same payment authorization, up to a maximum amount. This opens up a lot more x402 use cases like AI chat sessions, automations, scheduled actions and more!
We shipped a change in our x402 stack that allows settling multiple payments with the same payment authorization, up to a maximum amount. This opens up a lot more x402 use cases like AI chat sessions, automations, scheduled actions and more!
This is possible using the new upto scheme, which authorizes a maximum amount to be withdrawn. Users can authorize $1 once, then spend 100 times $0.01 without having to resign anything.
Very useful for AI apps. Authorize once for the whole chat session, but still settle micro payments on every message.
To make this work, use the upto scheme on the backend when verifying and settling payments with an optional minimum price. On the client, wrapFetchWithPayment and useFetchWithPayment will automatically cache and re-use the payment authorization while its still valid, no extra state needed.
Learn more in our developer documentation.
Happy building! 🛠️