Billing and Usage Platform
Connecting merchant APIs, usage events, and financial state in a greenfield billing platform.
My role: Foundational contributor; co-designed platform and API capabilities
The engineering problem
Usage billing connects two very different workloads: merchants need responsive APIs, while usage arrives asynchronously and may be late or duplicated. A reliable platform has to preserve the relationship between a usage event and its financial effect through retries, aggregation, and invoicing.
The approach
I developed Java and Spring services across metering, aggregation, rating, invoicing, refunds, and subscription calculations. Working with the team, I co-designed synchronous merchant APIs and Kafka/MSK processing paths, with ClickHouse for analytical ingestion and PostgreSQL and Redis for transactional and caching workloads.
Design decisions
- Make event behavior explicit
- Transaction identifiers, deduplication, late-event handling, and replay semantics were part of the processing contract.
- Isolate merchant workloads
- Cell-based, multi-tenant design and tier-aware quotas provided controls for overload and independent scale.
- Design the operating model
- Recovery runbooks, dependency-aware health checks, telemetry, and merchant documentation accompanied the services.
Outcome and scope
The team delivered the platform to production in approximately six months. My contribution spanned service implementation, API design, performance engineering, operational readiness, and integration guidance.