Billing App Development: Common Questions
How do you handle usage-based billing at scale?
Usage-based billing requires an event ingestion layer that receives usage events idempotently, an aggregation layer that groups events by customer and billing period, and a pricing engine that applies the correct rate tier to the aggregated totals. Kafka handles event ingestion; ClickHouse or BigQuery handles period aggregation. Events are stored immutably so any billing period can be re-aggregated for corrections or disputes. The key architectural decision is separating the metering layer (raw events) from the rating layer (applying prices) so that pricing changes do not require re-ingestion of historical events.
How do you build proration for mid-cycle upgrades and downgrades?
Proration requires calculating the unused value of the current plan for the remaining days in the billing period, and the cost of the new plan for the same period, then applying one as a credit and the other as a charge. The proration model (daily vs proportional) and the rounding approach must be consistent and configurable, applied uniformly to avoid cumulative errors across large customer volumes. Mid-cycle changes must also propagate to the scheduled future invoice and, if revenue recognition is implemented, to the deferred revenue schedule.
How do you approach dunning and payment recovery?
Effective dunning requires a retry cadence calibrated by payment method type. Card retries on day 1, 3, 7, and 14 work differently from BACS direct debit returns, which have different failure types and processing windows. The retry scheduler must handle partial payment scenarios, card updates via Account Updater, and permanent failure codes (account closed) versus temporary ones (insufficient funds) differently. The suspension and cancellation threshold is configurable per business model, as a high-ACV enterprise customer warrants a longer dunning window than a low-ACV SME subscription.
What is required for ASC 606 compliance in a billing platform?
ASC 606 requires tracking the performance obligation separately from cash collection. For subscription billing, this means creating a deferred revenue schedule when an invoice is paid, recognising revenue daily over the subscription period rather than at point of collection. When a customer upgrades, downgrades, or cancels mid-period, the system must determine whether the modification is a new contract (prospective recognition) or a change to an existing one (cumulative catch-up from the modification date). The billing system must generate deferred revenue roll-forward disclosure schedules required for external audit.
What is the engagement model?
Engagements begin with a discovery phase covering your pricing model, payment methods, tax requirements, and compliance obligations before any code is written. This produces an architecture document and a phased delivery plan. Development proceeds with a dedicated team typically including a senior backend engineer, a payments specialist, and a QA engineer. Teams are ready to deploy within 21 days of engagement start.