Skip to main content
All Questions

Design and implement a coupon management system.

Unlock detailed company stats for this questionUpgrade

Design and implement a coupon management system for an e-commerce platform. Users can browse a product catalog, add multiple items to a cart (no limits), view available coupons and apply one.

Coupons are flat or percentage-based (percentage coupons have an upper limit) and must be validated: not expired, applicable to the current purchase amount, and not already used by the user.

The system should:

  • compute the final payment amount
  • support placing the order
  • show order history with applied coupons
  • allow removing cart items
  • maintain coupon usage history across all users

The design should be extensible, scalable and thread safe for concurrent access. Out of scope: scheduled removal of expired coupons, searching products by name or id, and user- or product-specific coupons (assume any coupon works for any user on any product).

Expect follow-ups like

  • Scheduled removal of expired coupons; searching products by name/id; user- or product-specific coupons were clarified with the interviewer as below-the-line requirements.
  • Cap a coupon code for certain users only, for example DIWALI10 for the first 1000 users, and handle contention when only 1000 coupons exist across concurrent users.
  • How would you support applying multiple coupons in the same order?

Community answers

No answers contributed by the community yet.

Related courses

Course

Software Engineering Interview Prep

Land your dream software engineering role at Google, Amazon, Microsoft, Meta, Apple, and other top companies. Learn from mock interviews, frameworks, and advice from senior candidates—practice data structures, algorithms, system design, people management, behavioral interviews, and more.

Course

System Design Interviews

Learn how to answer the latest system design questions across product, infrastructure, and AI domains. Features in-depth video examples, written breakdowns, and helpful reference patterns. Watch senior engineers and managers answer these questions in mock interview videos.