#geordi-webhook
1 messages ยท Page 1 of 1 (latest)
Hi! Subscriptions and subscription schedules are not the same thing. Are you using subscription schedules?
No we aren't yet - but were looking for an event to tell us a subscription was expiring in a given a time period (and the above event fitted well)
I saw this on Stack Overflow: https://stackoverflow.com/questions/59213428/stripe-send-email-notification-before-a-subscription-is-cancelled-at-period-end
Where they mentioned it worked.. but their use case is most likely different ๐
But seems to be very similar at least
What do you mean by "a subscription was expiring in a given a time period"? Can you clarify your use case and what you are trying to achieve?
For your information there's the event customer.subscription.deleted that occurs whenever a customer's subscription ends.
Sure! We want to trigger an email to users who have cancelled auto renewal of their subscription within 7 days of expiration to prompt them to toggle it on again
there isn't really a direct event for that("a subscription that has cancel_at_period_end:true is going to reach the end of the period soon"). The closest thing is invoice.upcoming which you can configure to be sent a few days before an invoice, but generally there's no invoice at the time of such a cancellation so it wouldn't get fired here.
ah okay
subscription_schedule.expiring isn't really the same thing, but it might work for you(if you are actually using SubscriptionSchedules) since it's fired when a schedule is ending(and a schedule can be configured to cancel the underlying subscription when the schedule ends; not sure if that's actually what you're doing or if you're just doing cancel_at_period_end)
Okay thats great, we'll use local DB state to manage this then ๐