The two systems at a glance
| Aspect | Prepaid Credits (Credit Ledger) | Customer Balance |
|---|---|---|
| Purpose | Usage commitment and consumption tracking | Accounts receivable adjustment |
| Applied | Before taxes, during invoice calculation | After taxes, at invoice issuance |
| Revenue recognition | Yes, recognized as credits are consumed | No impact on revenue |
| Expiration | Supports expiration dates | Never expires |
| Currency | Real or virtual currencies | Customer’s billing currency only |
| Audit trail | Append-only ledger with sequence numbers | Transaction history with balance snapshots |
| Typical use | Prepaid usage commitments, trial credits | Refunds, goodwill credits, small balance carryovers |
Prepaid credits (Credit Ledger)
The prepaid credit system is designed for customers who commit to usage upfront. Credits are organized into blocks with optional expiration dates and cost basis, stored in an append-only ledger that provides a complete audit trail.How prepaid credits work
- Credits are added via direct API calls, subscription allocations, or automatic top-ups
- Blocks are created with an amount, effective date, and optional expiration
- Usage accrues throughout the billing period
- At invoice calculation, credits are deducted from usage charges (in-arrears only)
- Remaining usage after credit deduction becomes the amount due
Key characteristics
- Scoped by currency: Each customer can have multiple credit ledgers, one per pricing unit (e.g., USD, compute credits, storage credits)
- Block ordering: Credits are deducted in a specific order—blocks with item filters first, then soonest-expiring, then by cost basis, then creation time
- In-arrears only: Prepaid credits apply only to in-arrears charges (usage-based and fixed fees billed at period end)
- Pending vs committed: Entries remain pending during the reporting grace period, then become immutable once committed
When to use prepaid credits
- Usage commitments: Customer prepays for a usage allocation (e.g., 10,000 API calls for $500)
- Trial credits: Provide credits that expire after a trial period
- Enterprise drawdown: Large prepaid pools that draw down over months or years
- Multi-currency scenarios: Track separate credit pools for different product SKUs
Customer balance
Customer balance is a simpler system that acts like a digital wallet for accounts receivable adjustments. It represents credit or debit amounts that modify what the customer owes on their next invoice.How customer balance works
- Balance is modified via manual adjustments, credit notes on paid invoices, or small balance carryovers
- At invoice issuance, the balance is applied to reduce (or increase) the amount due
- The final amount due reflects the balance adjustment after taxes
Key characteristics
- Single currency: Always in the customer’s billing currency
- Post-tax application: Applied after all line item calculations and taxes
- No revenue impact: Does not affect revenue recognition—strictly an AR adjustment
- Immediate effect: Applied to the next issued invoice automatically
When to use customer balance
- Refunds via credit notes: When a credit note is issued on a paid invoice, the refund amount goes to customer balance
- Goodwill credits: One-time credits for customer satisfaction issues
- Corrections: Manual adjustments to reconcile billing discrepancies
- Small balance carryovers: Amounts below payment minimums are carried forward
Calculation order on an invoice
Understanding where each credit system applies in the invoice calculation pipeline is critical:Common scenarios
Scenario 1: Customer with both systems
A customer has:- $500 in prepaid credits (Credit Ledger)
- $100 in customer balance (from a previous refund)
Scenario 2: Credits don’t cover the minimum
A customer has a 200 in prepaid credits. Invoice calculation:Scenario 3: Prepaid credits with virtual currency
A customer has 1,000 compute credits (virtual currency) with a $0.50 conversion rate. Invoice calculation:Migrating between systems
Moving from customer balance to prepaid credits
If you’ve been using customer balance for usage commitments, consider migrating to prepaid credits for:- Better revenue recognition tracking
- Expiration date support
- Multiple currency/pricing unit support
- Detailed consumption audit trail
Moving from prepaid credits to customer balance
Customer balance is simpler but loses:- Expiration dates (credits never expire)
- Cost basis tracking (no revenue recognition)
- Block-level granularity (just a running total)
Best practices
- Use prepaid credits for usage commitments: When customers prepay for usage, use the credit ledger for proper revenue recognition and expiration handling.
- Use customer balance for AR adjustments: Refunds, corrections, and goodwill credits that don’t represent usage commitments belong in customer balance.
- Don’t mix purposes: Avoid using customer balance as a workaround for prepaid credits, as this will cause revenue recognition issues.
- Monitor credit block expiration: Set up balance alerts to notify customers before their prepaid credits expire.
- Consider cost basis: When creating prepaid credit blocks, set the cost basis for accurate revenue reporting—trial credits typically have $0 cost basis.