Design a Tariff and Billing Engine That Survives Price Cap Changes

Last updated: November 29, 2026

Quick Overview

Design the service that stores tariff versions (fixed, variable, time-of-use, dual fuel), prices each customer's consumption into bills, and reprices variable tariffs correctly when the regulated price cap changes each quarter.

Fuse Energy
System Design
Software Engineer
Fuse Energy
November 29, 2026
Software Engineer
Onsite
System Design
Medium

0

0

0 solved


Design the service that stores tariff versions (fixed, variable, time-of-use, dual fuel), prices each customer's consumption into bills, and reprices variable tariffs correctly when the regulated price cap changes each quarter.

A UK retail supplier must reprice variable tariffs every time the Ofgem price cap moves, keep fixed customers on their contracted rates, and reproduce any historic bill on request. Fuse's fast-growing retail book makes correctness and auditability the key signals here, more than raw throughput.

What the Interviewer Expects
  • Model tariffs as immutable, effective-dated versions
  • Price consumption by the version in force at each interval's timestamp
  • Split a bill period that spans a price change
  • Make bills reproducible from inputs plus versions
  • Plan the quarterly repricing run and customer notifications
Key Topics to Cover
Effective dating
Immutable versions
Bill reproducibility
Regulatory change
Batch repricing
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • A meter read correction arrives for a closed bill. What happens?
  • How would you dry-run a new price cap against the whole book before go-live?
  • How do you handle a customer switching tariffs mid-month?
  • Where do Direct Debit amounts get recalculated, and how often?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Products: fixed (rates locked for a term), variable (follows cap changes), time-of-use (rate bands), dual fuel. Each tariff has unit rates and standing charges per region. Requirements: price any cons...

High-Level Design
  • Tariff catalogue: tariff_version(tariff_id, region, valid_from, valid_to, rates_json) never updated in place; a change creates a new version.
  • Agreement service: which tariff each supply ...

Submit Your Answer
Markdown supported

Related Questions