#alex_api

1 messages ยท Page 1 of 1 (latest)

fresh vergeBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1296448845135216712

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

dreamy belfry
#

hi there!

slate hollow
#

Hi Soma!

dreamy belfry
#

when a Subscription is cancelled, you should get customer.subscription.deleted

#

can you share a Subscription ID (sub_xxx) where you didn't receive this event?

slate hollow
#

Ok that's what I thought as well. Does this fire right when the customer confirms the cancellation? My stripe ID I tested with was cus_Q9XKEYQhCxiRFs

#

I think the problem is that it just gets scheduled to cancel at the end of the billing period, so this fires:

Customer cus_Q9XKEYQhCxiRFs's subscription has been set to cancel at the end of the billing period

dreamy belfry
#

that subscription is still active

slate hollow
#

Yes I just renewed to test again

dreamy belfry
#

has been set to cancel at the end of the billing period
then you should listen to customer.subscription.updated, and checn the cancel_at property

slate hollow
#

I think what I need to do is listen for subscription updated and manually build my own endpoint for cancel_at

dreamy belfry
#

customer.subscription.deleted will only be sent when the Subscription is actually canceled

slate hollow
#

Yeah I was hoping to avoid that but makes sense. I'm using the stripe app within slack, and was hoping to send directly to that endpoint with a stripe webhook

dreamy belfry
#

got it. but I don't see any other way to achieve this than listening to customer.subscription.updated and check if cancel_at was set.

slate hollow
#

Ok gotcha. Thanks so much for your help soma!

dreamy belfry
#

happy to help ๐Ÿ™‚