We spent four years at three different companies writing the same billing system, badly.
The first was a nightly job that summed rows in Postgres. It worked until a customer asked why their invoice had gone up, and it took two engineers a week to answer. The second was a queue and a warehouse job — faster, and wrong in more interesting ways. The third we never finished. We were still arguing about how to attribute a late event when the quarter closed.
What we kept relearning is that usage-based billing isn’t an accounting problem with a data pipeline bolted to it. It’s a data problem that finance has to be able to audit. Those two requirements pull in opposite directions — one wants aggregates, the other wants every row — and most in-house systems resolve it by quietly giving up on the second.
Tessera keeps both. Every aggregate holds a pointer back to the events underneath it, from an invoice line down to the individual call, for as long as you keep the data. That decision made the system considerably harder to build, and it is the only reason finance stops asking engineering to explain invoices.