Billing looks like a simple feature until the first month of real invoices. A customer upgrades halfway through the month, a payment fails and is retried, a price changes for new customers but not for existing ones, a tax rule changes, and someone disputes a line on an invoice from three months ago. Each of those is a small piece of logic, and together they decide whether revenue arrives on time and whether finance trusts the numbers.
That is why the build-or-buy question for billing deserves more care than most. Get it wrong one way and the engineering team spends years maintaining a system that adds nothing to the product. Get it wrong the other way and the company is stuck with pricing it cannot change and data it cannot move. This post covers what billing really includes, the hard parts nobody estimates, and a way to decide.
Billing is more than invoices
Before comparing platforms or estimating a build, write down everything "billing" will have to do. The list is always longer than expected:
- A catalogue of products, plans and prices, including old prices that existing customers still pay.
- Subscriptions and their life cycle: trials, upgrades, downgrades, pauses, cancellations, renewals.
- Usage collection and rating, for anything priced by consumption: requests, transactions, seats, kilowatt-hours.
- Invoices, credit notes and adjustments.
- Tax, with the rules of every country and customer type you sell to.
- Payment collection: cards, bank transfers, wallets, and retries when a payment fails.
- Dunning: reminders, grace periods and what happens to the service when a customer does not pay.
- A customer portal for invoices, payment methods and plan changes.
- Refunds, disputes and the trail behind them.
- Exports to accounting, revenue reports and data for analytics.
Some products add their own layer on top. Utilities and energy software deal with meter readings that arrive late or get corrected. Fintech products deal with fee splits between parties, payouts and reconciliation with payment providers.
The hard parts that appear after launch
Most billing estimates cover the happy path. The cost is in the rules around it:
- Money is exact. Amounts are stored in the smallest currency unit as integers or exact decimals, never as floating-point numbers, and every rounding rule is decided once and written down.
- Proration. A mid-cycle upgrade, a seat added on the 17th, a downgrade that takes effect at renewal: each needs a rule, and customers will check the arithmetic.
- Time. Billing periods, time zones, month lengths and the end of the year all produce edge cases. An invoice dated in the wrong period is an accounting problem, not a display bug.
- Issued invoices do not change. Corrections are made with credit notes and new invoices. Many countries also require unbroken invoice numbering and specific content. In Uzbekistan, invoices to businesses go through the state electronic invoicing system, directly or through an authorised operator, with an electronic signature.
- Prices are versioned. A price change applies from a date, to some customers and not others, and every past invoice must still be explainable with the price that applied at the time.
- Usage is counted once. Usage events arrive late, out of order and sometimes twice. The same discipline as in any event-driven system applies: a stable identifier fixed at the source, and idempotent processing, so a retry never bills twice.
- Bill runs can be repeated. When a meter reading is corrected or a pricing bug is found, the system must recalculate a period deterministically and show what changed.
- Failed payments are normal. Retry timing, card updates, partial payments and what the product does while a customer is in arrears all need decisions, and they affect revenue more than most features.
None of this is exotic. All of it has to exist before billing can be trusted, whoever builds it.
What you are really trading off
The comparison is not licence fees against salaries. It is three things:
- Time to revenue. A platform can bill real customers in weeks. A build usually takes much longer than the first estimate, because the hard parts above are discovered along the way.
- Who carries the change. Tax rules, payment methods, regulations and pricing models keep changing. With a platform, much of that is the vendor's work. With a build, all of it is yours, for as long as the system runs.
- Control. A build fits your rules exactly and keeps the data where you decide. A platform shapes your pricing to what it supports and holds your data in its format.
Building because platforms look expensive is the weakest reason of all. Vendor fees are visible on an invoice; the cost of an internal billing system shows up as features that were not built.
When buying is the better choice
- Billing is not what makes the product different.
- Pricing follows common patterns: subscriptions, tiers, seats, simple usage bands.
- The product needs to charge customers soon.
- The team is small and its time is better spent on the product.
- Standard integrations matter: payment providers, accounting, tax calculation, CRM.
Most early SaaS and many fintech products fit here. A platform also brings controls an auditor will ask about, such as roles, logs and approval flows, without building them.
When building is justified
- Pricing is part of the advantage: models that competitors cannot copy easily, or frequent pricing experiments that are central to growth.
- The domain does not fit any platform: tariff rules with many versions, fee splits between several parties, settlement logic, regulated calculations.
- Data must stay under your control: where it is stored, how it is audited, or how fast calculations must run.
- Billing is the product, for example a platform that bills on behalf of its own customers.
Even then, build only what has to be yours.
Often the answer is both
Many teams end up with a hybrid: buy a stable core and build the edges where the product is different.
- Bought: invoices, subscriptions, tax, payment collection, dunning and the customer portal.
- Built: the rating layer that turns your domain's usage into billable quantities, using rules only you understand.
- Built: integrations with the ledger, accounting, the data warehouse or, for utilities, the meter data platform.
- Built: an audit trail that keeps the history of every input and can explain each invoice line.
The boundary between the two is a contract: your rating layer sends finished, priced quantities to the platform, and the platform never needs to know how they were calculated. That keeps the vendor replaceable and your domain logic in your hands.