[ STEP 09 / INTEGRATION ]
Wallet & top-ups
Every platform has one wallet with a USD balance. Each successful LLM call atomically debits the wallet by actual token cost. When the wallet is empty, inference returns 402 Payment Required with code wallet_insufficient. Top-ups go through Stripe checkout in the dashboard — there is no curl or SDK path for funding the wallet.
ℹReading the balance from your backend
The wallet balance is shown in the dashboard and emitted as part of the wallet.low_balance and wallet.topped_up outbound webhook payloads (see Webhooks). For most use cases, listen to those events instead of polling.
⚠402 handling on your side
If a 402 wallet_insufficient comes back, your code should pause new inference for that platform and surface the empty-wallet state to the platform admin. Resuming requires a dashboard top-up.