#mr_pablo-webhook
1 messages ยท Page 1 of 1 (latest)
๐ Happy to help
customer.subscription.deleted doesn't contain the information which flow that a subscription is cancelled
There's a non-direct way to find out the reason of cancelling a subscription with the steps here: https://stripe.com/docs/billing/subscriptions/cancel#events
There's no way to differentiate between a user cancellation and a cancellation for say exceeding payment retries
and what event, if any, is triggered if a payment is missed?
so i see that cancelling immediately triggers the delete event, and telling it to stop after the next period triggers the update event
but if payments fail, what event does that trigger?
Depends really. customer.subscription.updated would likely fire to reflect 'past due' status, but a lot this depends on your config: https://dashboard.stripe.com/settings/billing/automatic
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
and, once a sub thats been told to cancel after the next period, is the delete event triggered when that date comes around?
eg i have a monthly sub that i have told to end after before the next move, the update event is fired, but at the end of the month, is the delete event triggered?
Yes if cancel_at_period_end is true, it would fire on this timestamp: https://stripe.com/docs/api/subscriptions/object#subscription_object-current_period_end
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
so i just cancelled a sub, setting it to expire in 3 days time. its triggered the update event, with "cancel_at_period_end" set to false
in 3 days time (monday), will the delete event trigger?
with "cancel_at_period_end" set to false
In that scenario,cancel_atwill be set with the 3 days timestamp
Which is when the customer.subscription.deleted event will fire
just back to failed payments, if that triggers a sub update event, does that include info about why its failed? And, how many times does a payment fail before the subscription is automatically cancelled by stripe?
The subscription event wouldn't, you'd listen for invoice.* events: https://stripe.com/docs/billing/subscriptions/overview#subscription-events
ah ok, thanks
np!