Skip to content
All work

SaaS Billing & Subscription Platform

Multi-tenant billing engineered for messy real-world plans.

−95%

Manual fixes

<24h

Deal → billing

100%

Audit completeness

Overview

A subscription engine for a B2B SaaS handling annual prepay, mid-cycle upgrades, custom enterprise terms, and the inevitable usage-based add-on. Built as a service, used by every other surface.

The problem

Sales was selling deals that finance couldn't reconcile and engineering couldn't implement — coupons stacking with discounts stacking with usage tiers, all with different anchor dates.

Approach

  1. 01

    Modeled billing as a state machine over a ledger — every change emits an entry, every invoice rebuilds from the ledger.

  2. 02

    Ran cycle math inside Temporal workflows for idempotency and replayability across long-running renewals.

  3. 03

    Built a sandbox simulator so sales could price a deal and finance could review the projected invoices before signature.

Outcome

  • Reduced manual invoice corrections from 60+ per month to fewer than 3.

  • Cut deal-to-billing time from 6 days (legal + finance + ops) to under 24 hours.

  • Audit-grade trail for every charge — finance can answer customer questions without paging engineering.