Is the current date the time on the users computer?

But the renew event only happens 30 days after the subscription is made…

You would assume that’s what should happen, but I’d guess that’s not what’s happening (i.e. the renew event is triggering immediately)

January 30th + 30 Days is 1st March… he said the date is showing as 3rd March…

So maybe the Renew event is triggering on 1st of the month? i.e. someone subscribed yesterday… it renewed today, and now sets their Subscription date to today + 30 days = 3rd March…

But I’d be willing to bet the issue is with how the recurring workflow is being scheduled, rather than any strange anomalies with how Bubble is handling dates here…

1 Like

I bet it too!

1 Like

What you need to do instead is setup webhooks inside of your payment processor and a backend workflow call for bubble to catch it that then renews the credits. This insures that as soon as the payment is successful they get credits renewed.

@adamhholmes @rpetribu @rccanlas2

1 Like

@chris.williamson1996 @adamhholmes @rpetribu

Hi everyone, sorry for the late response.
This is how I trigger the recurring workflow on the front end

image

So basically, when the page is loaded it will check user if subscription date is not empty.
This is how I Identify if a user is a paying subscriber if they have a subscription date

When they cancel plan they will be turn into free account and the subscription date would be deleted and cleared.

So if the user has subscription date, it means they are paying subscriber and thus the recurring workflow would be trigger

Within the backend workflow I have this two workflow for PRO and FREE

PRO users will get 200k credits again
and subscription date will be updated

those who cancelled and became FREE users will get zero credits and subscription date deleted

Hope this make sense

Hope this make sense

Yep, it’s clear what’s happening now…

  1. A user converts to a Pro Plan - you set the Subscription Date to the Current Date/Time

  2. The User reloads the page for some reason, so your workflow checks to see if their Subscription Date is empty and, as it’s not, it triggers your recurring event to start at the Current User’s Subscription Date - which as it’s actually now a date in the past, will trigger immediately.

  3. Your Recuring Event starts (as triggered by the pageload workflow), which changes their Subscription Date to their Current Subscription Date plus 30 days.

So everything is working exactly as it’s expected to based on what you’re currently doing.

So basically, when the page is loaded it will check user if subscription date is not empty.
This is how I Identify if a user is a paying subscriber if they have a subscription date

This is where you’re going wrong.

You don’t want to use a pageload conditional workflow for this - it will cause all kinds of problems and is not reliable (as you’ve already seen). You’ll be changing the subscription date every time the page loads.

As @chris.williamson1996 already said, use webhooks to confirm whether a User has a valid Subscription and if/when it changes etc.

(or at the very least, have two separate fields… one for the Subscription date, and one for the renewal date)

1 Like

Are you able to give a little bit of example?
I am really having a hard time wrapping my head on this
I am very new with back end workflow
But only if you have spare time