Skip to main content
Money-moving mutations — useCreateSubscription, useChangePlan, useTopUp, usePayInvoice, and friends — resolve to a SettleOutcome: a discriminated union on kind that tells you exactly how the money moved. Pass the matching on* handler in the hook’s options, or call client.handleSettlement(result, handlers).

Outcomes

Usage

requires_form carries a PSP client payload and a reason code — hand it to your hosted checkout / Stripe Elements flow to collect authentication or a new card. The other outcomes are terminal: the money has already moved (or there was nothing to do).
On success, the hook also invalidates the affected queries (customer, subscriptions, invoices, wallets) so the rest of your UI refreshes automatically.