# Reset a User's Credits every month starting from SignUp date

**URL:** <https://forum.bubble.io/t/reset-a-users-credits-every-month-starting-from-signup-date/239062>\
**Category:** Need help\
**Created:** [December 29, 2022, 5:23pm UTC](https://forum.bubble.io/t/reset-a-users-credits-every-month-starting-from-signup-date/239062 "2022-12-29T17:23:14Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![pshirole12](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@pshirole12](https://forum.bubble.io/u/pshirole12)\
**Post date:** [December 29, 2022, 5:23pm UTC](https://forum.bubble.io/t/reset-a-users-credits-every-month-starting-from-signup-date/239062/1 "2022-12-29T17:23:15Z")

</div>

Hello,

I’m making an app that provides user’s with a certain number of credits for free every month (say 100 credits). I need the credits to reset every month starting from the date that the user signed up for the app.  
I know that there are posts on this forum regarding something similar but it is still confusing and there’s nothing for this specific use case.  
So can somebody please give me a step-by-step answer or guide me to someplace where I could find an answer?  
I’m on the Personal plan and I do have access to Backend Workflows. I don’t know if I should create an API workflow or a recurring event or something else. Any help would be much obliged.

---

<div class="post-metadata">

**Author:** ![mikeloc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mikeloc/32/93001_2.png) [@mikeloc](https://forum.bubble.io/u/mikeloc)\
**Post date:** [December 29, 2022, 5:34pm UTC](https://forum.bubble.io/t/reset-a-users-credits-every-month-starting-from-signup-date/239062/2 "2022-12-29T17:34:48Z")

</div>

Hi there, @pshirole12… what you described should be pretty easy to do. First, create a backend workflow that takes a user as a parameter.

 ![backend1](https://us1.discourse-cdn.com/bubble/original/3X/e/0/e0b136a5999008b192a2957eb7bc586340767bbf.png)

Then, add a step to the workflow that resets the user’s credits to 100.

 ![backend2](https://us1.discourse-cdn.com/bubble/original/3X/e/3/e3b7266324e5713caf85d8d1c153e2e1879b5bca.png)

Then, add a second step that schedules the backend workflow to run again 1 month from the current date/time.

 ![backend3](https://us1.discourse-cdn.com/bubble/original/3X/6/d/6d537252c76b211af0a0cfcf80adc9d6644511d7.png)

Finally, add a step to your signup workflow that schedules the backend workflow to run 1 month from the current date/time.

 ![signup](https://us1.discourse-cdn.com/bubble/original/3X/e/0/e04b1f84a70dac0c122f10cda26a2ee6c8555470.png)

Hope this helps.

Best…  
Mike

---

<div class="post-metadata">

**Author:** ![pshirole12](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@pshirole12](https://forum.bubble.io/u/pshirole12)\
**Post date:** [December 29, 2022, 8:25pm UTC](https://forum.bubble.io/t/reset-a-users-credits-every-month-starting-from-signup-date/239062/3 "2022-12-29T20:25:23Z")

</div>

Thank you for the detailed explanation @mikeloc

---

<div class="post-metadata">

**Author:** ![pshirole12](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@pshirole12](https://forum.bubble.io/u/pshirole12)\
**Post date:** [December 30, 2022, 5:53pm UTC](https://forum.bubble.io/t/reset-a-users-credits-every-month-starting-from-signup-date/239062/4 "2022-12-30T17:53:52Z")

</div>

@mikeloc I have done exactly what you told me and it seems to have worked. One question I have is that when I set the Schedule API Workflow action after the Sign Up process (as shown by you in your last step/image), before that step, I still do need to “Make Changes to the User” and set the credits to 100 right?  
As per my understanding, I set the user credits (make changes to the user) right after the sign up is done and then I add the schedule API workflow action. Is that correct?

---

<div class="post-metadata">

**Author:** ![tylerboodman](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/tylerboodman/32/242142_2.png) [@tylerboodman](https://forum.bubble.io/u/tylerboodman)\
**Post date:** [December 30, 2022, 6:06pm UTC](https://forum.bubble.io/t/reset-a-users-credits-every-month-starting-from-signup-date/239062/5 "2022-12-30T18:06:41Z")

</div>

Where you set up the database fields you can set the Credits to 100 by default, so on creation it already has the 100. Otherwise yes in the “Sign the user up” action you can set their credits to 100 there

---

<div class="post-metadata">

**Author:** ![mikeloc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mikeloc/32/93001_2.png) [@mikeloc](https://forum.bubble.io/u/mikeloc)\
**Post date:** [December 30, 2022, 7:04pm UTC](https://forum.bubble.io/t/reset-a-users-credits-every-month-starting-from-signup-date/239062/6 "2022-12-30T19:04:03Z")

</div>

Yup, like Tyler said, I would definitely just set a default for the credits field like this.

 ![credits](https://us1.discourse-cdn.com/bubble/original/3X/c/2/c29f47671c927a64efa2120974f6c5adfcc5620a.png)

---

<div class="post-metadata">

**Author:** ![georgecollier](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/georgecollier/32/182327_2.png) [@georgecollier](https://forum.bubble.io/u/georgecollier)\
**Post date:** [December 31, 2022, 9:09am UTC](https://forum.bubble.io/t/reset-a-users-credits-every-month-starting-from-signup-date/239062/7 "2022-12-31T09:09:10Z")

</div>

You might want to get the credits value from an option set that you set in your app. This means if you want to change the value you only have to change it once from the option set.

My app has a sort of credit limit, and I schedule workflows so that the limit is reset to Current user’s plan’s limit where the plan is an option which has the limit as a number attribute. This will make it easier for you to add paid plans that increase the limit in future

---

<div class="post-metadata">

**Author:** ![pshirole12](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@pshirole12](https://forum.bubble.io/u/pshirole12)\
**Post date:** [December 31, 2022, 6:58pm UTC](https://forum.bubble.io/t/reset-a-users-credits-every-month-starting-from-signup-date/239062/8 "2022-12-31T18:58:11Z")

</div>

Thank you for the idea! @georgecollier

---

<div class="post-metadata">

**Author:** ![will.nft.works](https://avatars.discourse-cdn.com/v4/letter/w/3bc359/32.png) [@will.nft.works](https://forum.bubble.io/u/will.nft.works)\
**Post date:** [February 11, 2023, 12:51am UTC](https://forum.bubble.io/t/reset-a-users-credits-every-month-starting-from-signup-date/239062/9 "2023-02-11T00:51:39Z")

</div>

Thanks, Mike. So no cron job needed? Never knew this

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [March 9, 2023, 5:24pm UTC](https://forum.bubble.io/t/reset-a-users-credits-every-month-starting-from-signup-date/239062/10 "2023-03-09T17:24:06Z")

</div>

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