Design Stripe subscriptions
1162

Desgin something like stripe subscriptions https://stripe.com/docs/billing/subscriptions/overview

Assumptions:

  1. this is a service that can handle 10M DAUs
  2. users are billed uniformly throughout the month based on when their subscription was created (every 30 days after signup)
  3. must be able to handle partial billing (user cancelled subscription halfway through a month)
  4. must send error email to user if their credit card fails to charge
  5. must send email if credit card is about to expire/has expired
  6. after error handles retries correctly with new payment method
  7. support free trails (7,14,n days)
  8. support promotion codes (coupons)
  9. collect sales tax based on customer's state tax (usa)
Comments (1)