#stokedowl

1 messages · Page 1 of 1 (latest)

unkempt bloomBOT
lost bison
#

Hi there, can you share with me your webhook code?

ivory hamlet
#

Out of 7 events I get 2 of them sent to the backend

#

this used to work a couple a day ago I haven't made any code changes

lost bison
#

You mean await SubscriptionService.handleStripeSubscriptionUpdated(event as Stripe.Event); is not getting called?

ivory hamlet
#

yeah for a few cases it gets triggered

#

for this case case 'customer.subscription.updated':

#

Stripe doesn't make a call to my backend

#

but on the local listener I see the event, however doesn't get posted to the BE

#

2023-02-20 12:12:45 --> customer.updated [evt_1MdT5FAmPvfMjSzz9sNoFBVZ]
2023-02-20 12:12:46 --> invoice.created [evt_1MdT5GAmPvfMjSzzIizdlA2z]
2023-02-20 12:12:46 --> invoice.finalized [evt_1MdT5GAmPvfMjSzzJc6Il8tA]
2023-02-20 12:12:47 --> invoice.paid [evt_1MdT5GAmPvfMjSzzKnGIY7U2]
2023-02-20 12:12:47 --> invoice.payment_succeeded [evt_1MdT5HAmPvfMjSzz0q8xNzox]
2023-02-20 12:12:47 --> customer.subscription.updated [evt_1MdT5HAmPvfMjSzzJXwlQZVJ]
2023-02-20 12:12:48 --> invoiceitem.created [evt_1MdT5HAmPvfMjSzz9EmDRXrN]
2023-02-20 12:12:56 <-- [200] POST http://localhost:3000/api/webhook/stripe [evt_1MdT5HAmPvfMjSzz0q8xNzox]
2023-02-20 12:12:56 <-- [200] POST http://localhost:3000/api/webhook/stripe [evt_1MdT5GAmPvfMjSzzJc6Il8tA]
2023-02-20 12:12:56 <-- [200] POST http://localhost:3000/api/webhook/stripe [evt_1MdT5GAmPvfMjSzzJc6Il8tA]
2023-02-20 12:12:56 <-- [200] POST http://localhost:3000/api/webhook/stripe [evt_1MdT5HAmPvfMjSzz0q8xNzox]

lost bison
#

Let me clarify your ask. Are you saying there are some customer.subscription.updated webhook events that are failed to be delivered to you webhook endpoint?

ivory hamlet
#

correct

lost bison
#

If so, can you share with me the event IDs?

ivory hamlet
#

evt_1MdT5HAmPvfMjSzzJXwlQZVJ

lost bison
ivory hamlet
#

oh that is odd, cause it doesn't make hit the backend at all

#

while others events successfully trigger this one doesn't

lost bison
#

You might want to check your code in handleStripeSubscriptionUpdated and see if there's any problems. If you have server logs, you can start investigating from there.

ivory hamlet
#

Just checked, I commented out the handler and put a log there to check if it's the issue with my handler but it doesn't seem to work.

lost bison
#

Do you have the event ID? and is your webhook endpoint running locally?