Code Room
System designMediumsd-g116
Subject RefundsLevel Mid–Senior~40 minCommon in Distributed systems interviewsIndustries Technology

Question

Design a refund service for a large e-commerce platform processing ~2M orders/day. Support full and partial refunds, multiple partial refunds against one payment (total refunded must never exceed captured amount), refunds that arrive via API and via async PSP webhook, and the case where the original payment used split tenders (gift card + card). Describe the model and how you prevent over-refunding under concurrent refund requests and duplicate webhooks.

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.

Narrate your design
Loading whiteboard…
Run or narrate your approach, then ask the coach.