- Customers pre-purchase credits (SaaS with top-up model, APIs with token packs)
- You need deterministic settlement at billing time with no failed-payment recovery loops
- Your customers are API-first businesses that want to fund accounts rather than maintain card-on-file
Prepaid billing is only available on collection plans. Payout plans always use postpaid flow.
How it works
When the customer tops up their wallet with enough funds, Monigo automatically retries billing and resumes the subscription — no manual intervention needed.Setting up a prepaid plan
Add"billing_mode": "prepaid" when creating a collection plan:
billing_mode field on a plan defaults to "postpaid" and is immutable once the plan has active subscribers.
Wallet auto-creation
When a customer subscribes to a prepaid plan, Monigo automatically creates a wallet in the plan’s currency if one does not already exist. No explicit wallet-creation step is needed. You can fetch or top-up a customer’s wallet at any time:The happy path: billing with sufficient balance
When billing runs and the wallet has enough funds, Monigo:- Aggregates usage for the period
- Calculates the invoice total using the plan’s prices
- Debits the wallet atomically (debit is recorded in the ledger)
- Creates the invoice directly with
status: "paid"— no draft or finalize step - Advances the subscription to the next period
- Fires an
invoice.paidwebhook
No charge is submitted to your payment provider for prepaid invoices — settlement is entirely wallet-based.
Handling insufficient balance
If the wallet balance is lower than the invoice total when billing runs:- A draft invoice is created as an audit record (period is not advanced)
- The subscription status moves to
"paused" - A
subscription.prepaid_balance_insufficientwebhook is fired
Auto-resume on top-up
When you credit a wallet belonging to a customer with a paused prepaid subscription, Monigo:- Checks whether the new balance covers the outstanding invoice total
- If yes: retries billing immediately — debits the wallet, creates the invoice as
"paid", and moves the subscription back to"active" - If still insufficient: leaves the subscription paused
invoice.paid webhook as a normal billing cycle.
Webhook events
Register a webhook endpoint in the Webhooks guide to receive these events.
Customer portal
When a customer views their subscriptions in the customer portal, prepaid subscriptions display:- A Prepaid badge next to the subscription status
- Their current wallet balance alongside the estimated period total
- A warning and Top up wallet → link when the balance is below the estimated total
Comparing prepaid and postpaid
Related
- Billing Cycle — how periods work and when billing runs
- Subscription Lifecycle — pause, resume, and cancel behavior
- Invoice Lifecycle — invoice states and transitions
- Webhooks — receiving billing events
- Customer Portal — wallet balance visibility for customers

