#Marques

1 messages ยท Page 1 of 1 (latest)

whole sinewBOT
mighty bramble
#

hello

#

summary: endpoint works just fine when using "stripe listen" (even from different machines) but doesnt work when using at Stripe Website

cosmic compass
#

Hello ๐Ÿ‘‹
Not sure what you mean by "but doesnt work when using at Stripe Website"

Based on the second screenshot you've provided, it seems like your server is returning a 500 for the attempts Stripe has made for event delivery.

Have you looked into your server logs to see what error is being thrown by your code?

mighty bramble
#

Im running the server on the IDE and doing port-forwarding so I can debug

cosmic compass
#

Can you share the complete code?
What function are you catching in the catch block?

mighty bramble
#

sure

cosmic compass
#

Based on the code, it looks like ConstructEvent could be failing.

Are there any other logs than just these? There must be more logs..

mighty bramble
#

I get a bunch of errors in the breakpoint, would you like me to show you each?

cosmic compass
#

If not, can you add more logging in your try block to narrow down on what code is throwing an error.

#

Sure

#

Stripe CLI webhook secret is different from the webhook endpoint secret

mighty bramble
#

there u go

cosmic compass
#

The errors here are quite generic and don't really help much
Can you check if you're using the correct whsec_xxx from the dashboard?

#

Stripe CLI will have its own webhook secret

cosmic compass
#

It should be under this option on the dashboard

mighty bramble
#

oh wow

#

so the secret was working for the stripe --listen but not for the other one

cosmic compass
#

Correct because Stripe CLI received the event and then forwarded it

#

Compared to the other case where Stripe directly sent it to your aws server

mighty bramble
#

I see, let me double check

#

perfect! thanks so much