Code RoomCoupon redemption service
MediumPrep Room Coding #3648

Coupon redemption service

System designNetworking & APIsConcurrencyEntry–Mid~35 min

Design a coupon/voucher service for an online store. Each coupon has a code, a discount, an expiry date, and a max number of redemptions (sometimes one per customer, sometimes a global cap of, say, 1,000 uses). At checkout the store calls the service to validate and redeem a code. Cover the data model, how validation and redemption work, and how you prevent a limited coupon from being over-redeemed during a sale rush.

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts (data model, bottlenecks, consistency, failure modes) and name the trade-offs you are making.

Clarify4:00 left
Estimate4:00 planned
Design11:30 planned
Deep dive9:30 planned
Failure6:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.