SaaS Billing Integration: Metered Usage and Invoices

Build SaaS billing integration for metered usage on your own usage ledger, send idempotent meter events, handle invoice webhooks safely and reconcile every invoice to recorded usage.

9 min read
Paper invoice with blurred lines beside a small digital usage meter on a wooden desk, illustrating SaaS billing integration for metered usage

SaaS billing integration for metered usage connects three things: the product events that measure what a customer used, the billing platform that prices that usage, and the invoices that customers and tax rules depend on. A reliable design records usage in your own ledger first, sends it to the billing platform with a unique identifier so it cannot be counted twice, and reconciles every invoice back to that ledger. The cost of the integration comes mainly from those reconciliation and correction paths, not the first API call.

This guide is for Australian product owners and development leads. Our related guide on SaaS pricing models covers how to choose between flat, tiered and usage-based plans; this article covers how metered usage is captured, invoiced and checked once that choice is made.

Key Takeaways

  • Keep a usage ledger in your own database as the record of what each customer used, and treat the billing platform as the pricing and invoicing engine.
  • Send each usage record with a unique identifier, so retries and replays never double-bill.
  • Design for late, duplicate and out-of-order data from day one, including webhook events from the billing platform.
  • Australian tax invoices have content rules set by the ATO. Check your invoice template against them before launch.
  • Accept the integration only when invoice quantities reconcile with the ledger for every test customer and billing period.

The Parts of a Metered SaaS Billing Integration

A metered integration has four parts, and each one can fail on its own.

  • Usage capture. The product records billable actions, such as API calls, documents processed or active seats, as rows in a usage ledger with tenant ID, quantity, time and a unique ID.
  • Usage delivery. A worker sends ledger rows to the billing platform and marks them as sent.
  • Pricing and invoicing. The billing platform aggregates usage per period, applies the price and creates invoices.
  • Feedback. Webhooks tell your system about invoices, payments and subscription changes, so access and records stay in step.

How Stripe Handles Meters

Stripe's usage-based billing uses meters. According to Stripe's documentation on configuring a meter, a meter aggregates usage over the billing period as a Sum, a Count or the Last value reported, and once a meter is configured only its display name can be changed. Choose the aggregation carefully, because a seat count suits Last while document processing suits Sum.

Stripe's guide to recording usage with the API sets several limits that shape the design:

  • Each meter event carries the event name, customer ID, a numerical value and an optional timestamp, and can carry an identifier that Stripe uses to prevent the same usage being reported twice.
  • Timestamps must be within the past 35 calendar days and no more than 5 minutes in the future.
  • Stripe processes meter events asynchronously, so usage summaries and upcoming invoices may not reflect events sent moments ago.
  • In live mode the meter event endpoint is limited to 1000 calls per second per Stripe account, and to one concurrent call per customer per meter.

The 35-day window matters for outages. If your delivery worker stops for longer than that, the missing usage cannot be backdated and has to be handled as a manual adjustment.

Invoices, Webhooks and Corrections

Stripe's subscription invoice documentation says Stripe creates an invoice at the end of each billing cycle and leaves it in draft for about an hour before finalising it, and that invoice items can be changed while it is a draft. Use that window for last checks, such as confirming that all usage for the period has been sent.

Stripe's webhook documentation says events can arrive out of order and more than once, and that live-mode deliveries are retried for up to three days. Store processed event IDs, act on the current state of the object rather than the order of events, and run a daily comparison between Stripe and your records.

Corrections need a path too. Stripe supports cancelling a meter event by its identifier through meter event adjustments, and recording negative quantities to fix over-reported usage. Build an internal screen for these so support staff do not edit the database by hand.

Australian Tax Invoice Requirements

The ATO's guidance on tax invoices sets the content your invoices need if you are registered for GST.

  • A tax invoice for a taxable sale under $1,000 must show seven details: that it is intended as a tax invoice, the seller's identity, the seller's ABN, the issue date, a brief description of items with quantity and price, the GST amount and the extent to which each sale is taxable.
  • Tax invoices for sales of $1,000 or more must also show the buyer's identity or ABN.
  • If a customer asks for a tax invoice you must provide one within 28 days, unless the sale is $82.50 including GST or less.

For metered plans, the line description should make the quantity understandable, for example the number of documents processed in the period. GST registration and tax treatment should be confirmed with your accountant, and the invoice template then built to match.

Cost Drivers and a Measurement Framework

We have not given dollar figures, because platform fees change and build effort depends on your plan design. Check current fees on the billing provider's own pricing page, and estimate build time from these drivers.

  • Number of meters and prices. Each billable metric adds capture, delivery, testing and invoice wording.
  • Event volume. High volumes need batching or pre-aggregation to stay inside rate limits.
  • Plan changes mid-period. Upgrades, downgrades and proration add test cases to every metered price.
  • Corrections and disputes. Adjustment tooling and audit trails are easy to leave out of the estimate.
  • Integrations downstream. Syncing invoices to accounting software adds another system to reconcile. Our guide to software integration services covers that work.

Measure the integration once live with a few numbers: unsent ledger rows older than one hour, invoice and ledger mismatches per period, webhook failures, and correction requests per hundred invoices. Failed payments and their effect on retention belong in churn reporting, covered in our guide to SaaS churn analytics.

SaaS Billing Integration Checklist and Acceptance Gate

  • Sending every ledger row twice produces the same invoice quantities as sending it once.
  • For each test customer and period, invoice line quantities equal the ledger totals under the meter's aggregation rule.
  • A simulated delivery outage of one day is recovered automatically, with no lost or duplicated usage.
  • Duplicate and reversed webhook deliveries leave subscription and access state correct.
  • A sample invoice above and below $1,000 is checked against the ATO's tax invoice content list.

Billing often belongs in a first release, as our related guide on SaaS MVP development explains, and the same ledger-first approach applies to the industry business systems we build where operational data drives charges.

Related Resources

Answers for Accurate Usage Invoices

1. What Is SaaS Billing Integration?

It is the connection between your product and a billing platform that turns customer plans and usage into invoices and payments, with webhooks keeping both systems in step.

2. Why Keep a Usage Ledger if the Billing Platform Stores Usage?

The ledger is your evidence of what each customer used. It lets you resend lost usage, answer disputes and reconcile invoices without depending on one vendor's records.

3. How Do You Stop Usage Being Billed Twice?

Give every usage record a unique ID and send it as the meter event identifier. Stripe uses that identifier to stop the same usage being reported more than once.

4. Can Late Usage Be Added to a Stripe Invoice?

Within limits. Stripe accepts meter event timestamps up to 35 days in the past, and renewal invoices stay in draft for about an hour, during which items can be changed.

5. How Much Does Metered Billing Cost to Build?

Build effort scales with a few cost drivers: how many meters you bill on, how much usage you send, how plan changes are priced and how much correction tooling support staff need. Scope those first, then estimate, and take platform fees from the provider's current pricing page.

Count Once, Invoice Accurately, Reconcile Always

Metered billing earns customer trust when every invoice can be traced to recorded usage. Keep your own ledger, send usage with unique identifiers, handle webhooks safely, meet the ATO's invoice rules and pass a reconciliation gate before the first real invoice goes out.

Ready to build what is next?

Talk to our Melbourne engineering team about modernising your systems or shipping your next product.