#rhythmbhiwani-subscription-events

1 messages · Page 1 of 1 (latest)

pastel hatch
#

rhythmbhiwani-subscription-events

#

Hi there 👋 the events you're going to want to listen to are largely going to depend on the logic that you want to build.

#

Can you give an example of what you're hoping to achieve?

astral fable
#

it's a SaaS application, which has 3 plans, with monthly and yearly pricing options. I just want to give the services to user according to plan he selects and is subscribed. Once he stops his subscription, I'll downgrade him to free services only

#

currently I'm checking these events
customer.subscription.created
customer.subscription.deleted
customer.subscription.updated
customer.subscription.trial_will_end

#

I want to reset his limits, on each new billing cycle if he continue the subscription

pastel hatch
#

Those are good events to listen to for the subscription lifecycle. What do you mean by "reset their limits"?

astral fable
#

limits are according to my application logic, which I can update in my database on each new billing cycle

#

Are these events enough or I need some more according to production setup

#

and customer.subscription.updated is a bit confusing as it does not specify if a user has cancelled to continue the subscription, but will cancel at end of billing cycle

#

how can I check that

pastel hatch
#

You can then compare those to the new values in data.object to determine exactly what changed.

astral fable
#

this sounds good, let me check it out. Thanks for you help