How can I run code when a subscription ends?
As the title says - what's the best way to ensure some code is run when a subscription ends?
The best way I found is that I could add an `after_update` callback on `Pay::Subscription` that `runs_code if !active?` but I haven't found a way to avoid running that code twice in case a subscription that already ended is still updated.
The best way I found is that I could add an `after_update` callback on `Pay::Subscription` that `runs_code if !active?` but I haven't found a way to avoid running that code twice in case a subscription that already ended is still updated.
The best place is to add a webhook listener for the Stripe
Braintree and such won't run a webhook on cancellation iirc, so you'd have to write a cron job for those.
customer.subscription.deleted
event. https://stripe.com/docs/api/events/types#event_types-customer.subscription.deletedBraintree and such won't run a webhook on cancellation iirc, so you'd have to write a cron job for those.
Notifications
You’re not receiving notifications from this thread.