Case study

Usage-based billing, from the database all the way to QuickBooks.

How a SaaS software company moved from spreadsheets to monthly billing that is calculated, reviewed and created in QuickBooks Online by a single application.

Client
SaaS dispatch and delivery software company, Canada
Engagement
Design, development and roll-out of an internal billing application
Users
Finance and operations teams
Connected software
QuickBooks Online, the platform’s SQL Server database

The challenge

Every customer of the platform has its own contract: a monthly, annual or multi-month plan, per-driver fees with a cap, tiers, prepaid drivers, add-ons such as SMS notifications, and sometimes a discount. To bill, someone had to count the month’s usage in the database, apply the right rules by hand in spreadsheets, then key the invoice into QuickBooks.

That work came back every month for every customer. It was slow, hard to check, and mistakes in dates, taxes or exchange rates went straight into the books.

The solution

An internal web application that holds each customer’s contract, measures their real usage and produces the invoice in QuickBooks Online. QuickBooks stays the system of record for invoices; the application only keeps a link to each one.

Contracts

One dated contract per customer

Plan, frequency, per-driver pricing, add-ons, discount and the linked QuickBooks customer. A plan change is scheduled ahead and never rewrites a closed period.

Usage

Nightly extraction

Orders, orders per driver and notifications are read from the platform’s database, in each customer’s own time zone, with a complete audit trail.

Pricing

A billing engine you can read

The contract rules produce lines shown on screen before any invoice exists. Lines can be adjusted while the period is open; closing it locks the calculation.

QuickBooks

The real invoice, in the right place

Date, payment term, tax code and the day’s exchange rate are set correctly, and the usage report PDF is attached to the invoice the customer receives.

Revenue

Recognized month by month

Annual and prepaid charges are spread over the months they cover, by customer and line type, without writing to the QuickBooks general ledger.

AI

Bringing history in

AI classifies the lines of past QuickBooks invoices and proposes a customer’s starting configuration. A person always confirms before anything is saved.

The life of an invoice

  1. Open period. Each active customer has exactly one open period, from one billing day to the next.
  2. Overnight usage. The nightly extraction adds real usage to the period.
  3. Review. The team reviews the calculated lines and adjusts them if needed.
  4. Close. The calculation is locked with a copy of the contract that produced it; the next period opens.
  5. QuickBooks invoice. The invoice is created with the usage report attached, then revenue recognition entries are generated.

A pricing rule, for example

// Per-driver fee, capped
fee = min(orders × per_order_fee, cap)

// At the cap: the driver bills at the flat rate.
// Below the cap: they pay per order.

Results

  • Every customer’s contract lives in one place instead of across spreadsheets.
  • Usage is measured automatically, and every billed amount traces back to the orders behind it.
  • Every line is visible before invoicing, and a closed period no longer changes.
  • Invoices land in QuickBooks ready to send: right date, right term, right tax, right exchange rate.
  • A dashboard shows monthly and annual recurring revenue, periods due for invoicing and collection follow-ups.
  • Every action is recorded: an audit log, plus a log of every call to QuickBooks.

Technologies

  • .NET 10
  • ASP.NET Core
  • Blazor Server
  • Telerik UI for Blazor
  • SQL Server
  • Entity Framework Core
  • QuickBooks Online API
  • Microsoft Entra ID
  • Azure App Service
  • GitHub Actions
  • Claude (Anthropic)

Do you bill by usage with QuickBooks Online?
We’re turning this project into a product: energik Billing. Write to us to talk about it or to become a pilot customer.