4
3 Comments

Implementing coupon system for saas product

Hi everyone,
I am working on side project (SAAS) and want to implement following features:

  1. coupon/vouchers for users with some validity
  2. How to implement different plans like basic plan or free plan, PRO plan, Enterprise plan with each plan having its own pricing. (For payment integration I have explored Razorpay and Stripe) Also do I need to consider RBAC here?
    I wanted to know are there any libraries already available for such features or need to implement it from scratch? Any pointers would be very helpful.
    Thanks in Advance :)
posted to Icon for group Developers
Developers
on November 3, 2021
  1. 2

    This feels similar to my question

    I will also like to hear what solutions exist, but until then I can elaborate on my first attempt -
    After a very short hunt in Google I gave up and just implemented some no-sql DB doc structure to keep track per user:

    1. How many credits are available for the user
    2. What features are enabled
    3. What promo-codes (vouchers) were already used by the user

    It didn't take much to implement, however it does feel like a design burden - because now we probably want to expand the most basic solution and maybe change nCredits to a dictionary of different credits types. Also we probably want to keep track of the events of activation / purchase / expiration of vouchers and it can escalate quickly.

    My guess is that most products do implement this from scratch, and after an initial period with real users, it can be limited to a small enough scope and maintain a custom implementation that is tailored to the product.

  2. 1

    We use Stripe and their tools for coupons and per-customer credits. They have a pretty decent system that accommodates percentage and currency value coupons, with expiry dates and max number of uses too.

    1. 1

      I just checked it out looks good. Thanks a lot.

Trending on Indie Hackers
I'm a lawyer who launched an AI contract tool on Product Hunt today — here's what building it as a non-technical founder actually felt like User Avatar 142 comments “This contract looked normal - but could cost millions” User Avatar 54 comments 👉 The most expensive contract mistakes don’t feel risky User Avatar 41 comments The indie maker's dilemma: 2 months in, 700 downloads, and I'm stuck User Avatar 39 comments A simple way to keep AI automations from making bad decisions User Avatar 32 comments I spent weeks building a food decision tool instead of something useful User Avatar 28 comments