Author name: Admin

System Design

Low-Level Design: Coupon and Discount System — Validation, Stacking Rules, Usage Limits, and Analytics

6 min read Core Entities Coupon: (coupon_id, code, discount_type=PERCENTAGE|FIXED_AMOUNT|FREE_SHIPPING|BUY_X_GET_Y, discount_value, min_order_amount_cents, max_discount_cents, start_date, end_date, is_active, usage_limit_global, usage_limit_per_user, applicable_to=ALL|CATEGORY|PRODUCT, applicable_ids[]). CouponUsage: (usage_id, coupon_id, user_id, Read article

Scroll to Top