#cat.noir
1 messages · Page 1 of 1 (latest)
There's a few really, depends what you're trying to do?
Well, I need to store the current users plan if they didnt pay in time. to do that, i store stripeLastPaymentDate in my database. if they didnt pay in time, their plan status changes to FREE
(I'm new to stripe and payment stuff btw)
Got it! You'd generally want invoice.paid: https://stripe.com/docs/billing/subscriptions/webhooks#active-subscriptions
I see, thanks!
What about when the user cancels their monthly uh "subscription"? is customer.subscription.deleted good?
Yes that will fire when the subscription actually ends: https://stripe.com/docs/billing/subscriptions/cancel#events
hm "immediately". but I want it to fire at the end of the month. I guess I dont need a webhook for that as i store the stripeLastPaymentDate and change the plan anyway manually. Thanks!
Then you'd set cancel_at_period_end and we'll cancel at the end of the period (i.e. end of month) and the event will fire then
If you instead cancel a subscription at the end of the billing period (that is, by setting cancel_at_period_end to true), a customer.subscription.updated event is immediately triggered. That event reflects the change in the subscription’s cancel_at_period_end value. When the subscription is actually canceled at the end of the period, a customer.subscription.deleted event then occurs.
i see, thanks!