#yuvi00001

1 messages · Page 1 of 1 (latest)

hot micaBOT
exotic sky
#

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.

ruby ivy
#

okay sure.

exotic sky
#

Looks like only customer.subscription.deleted is sent in this case, and not customer.subscription.updated.

hot micaBOT
ruby ivy
#

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 ?

frozen socket
#

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

ruby ivy
#

okay thanks, its more clear to me now. I'll configure the "deleted" webhook then.