← All projects

Credit Ledger

Credit accounting that keeps every balance correct, no matter how many ways credits come in.

Role
Staff Software Engineer, Caffeine
Built with
Stripe

The problem

Credits came from several places at once — subscriptions, daily grants and one-off purchases — and every transaction needed to stay correct.

What I built

I architected a multi-balance credit accounting system with prioritized consumption, optimistic concurrency control and idempotency to protect transaction integrity.

I also integrated Stripe subscriptions, with idempotent credit grants and subscription lifecycle management.