Adding Credits to a user on purchase

Hello everyone!

In the application I am creating, I have a monthly subscription via stripe. And what I have been having difficulty is making a credit system. For example, if a user selects the “Starter” plan for 4.99 per month than they get 50 credits per month. How would I configure it so that the second the user purchases a plan they get credits added, and they stack every month.

I gather that as long as the user is paying their $4.99 a month they get 50 credits that same month, correct?

I also assume that somewhere in your app you know if that user is up to date on their payments?

If so, then could you just set up a recurring workflow to run at the start of the month to add an additional 50 credits to their account?

If they are just a user and not part of a company in your app, you could just add a new data field of type number called “credits” and add to that accordingly every month.

If this is all correct, you may want to consider creating another table called Plans, with a plan name, credits amount and effective date range. You’d then be able to have multiple plans, each with their own associated credits amount. This way, at the start of the month, you can get the user’s plan, find it in your Plans table, and use the corresponding credits amount to bump up their credits.

Thanks! I currently have a payment data table (due to the stripe plugin). Would I add a field here, or would I create a new table completely?

My thinking would be that you’d just add a field to your existing payment data table to store the # of credits the plan issues monthly.

This topic was automatically closed after 70 days. New replies are no longer allowed.