#yuvi00001
1 messages · Page 1 of 1 (latest)
Hi there!
We have a webhook endpoint specifically for this: customer.subscription.deleted.
But give me a few minutes to run some tests on my end.
okay sure.
Looks like only customer.subscription.deleted is sent in this case, and not customer.subscription.updated.
actually "stripe.subscriptions.del("sub_id")" was listed under the "cancel subscription" topic so I had my doubts
https://stripe.com/docs/api/subscriptions/cancel
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I believe they aren't the same .
I wanted to make a cancel button to cancel subscription, which function should I use and which webhook should I configure ?
Gotcha, yeah customer.subscription.updated will only be triggered if you set the cancel_at property which cancels the subscription at some point in the future (at which point you will only get a customer.subscription.deleted event)
You can use either update or delete and listen to either updated or deleted, just make sure to pay attention to the one that makes sense for your integration
deleted will always be the event that is fired when the subscription is actually cancelled so it is a popular one to listen to here
okay thanks, its more clear to me now. I'll configure the "deleted" webhook then.