#dvsk
1 messages · Page 1 of 1 (latest)
Hello 👋
Even though the code is same, It is possible that the instance itself is configured differently. Can you share an example event ID where you're seeing this behavior?
Didn’t understand what you mean by ‘instance itself is configured differently’. The difference is yes, the webhook secret is different for both of them.
And the example event ID, I am afraid I can give because it’s on production that I see this
You can share the ID here, sharing the ID is safe.
It seems like your server is returning a 500 error with the error message being
Cannot read properties of undefined (reading 'status')
So something on that instance is indeed crashing. You'd likely want to look into your logs to see what the actual error is. Unfortunately, that is all the information we'll have on our end.
Ok thank you Hanzo
But just another one
How to generally configure such a case? Should I write an if condition with respect to the domain that the event is called from?
Should I write an if condition with respect to the domain that the event is called from?
Not sure I completely understand. Are you asking if you should check the domain before running the function handling the webhook event OR something else?
Yes, what should I do to not to call the other webhook because it’s completely the other domain right?
Hmm the only way Stripe won't send an event to the other endpoint is if you disable it. Otherwise, Stripe will continue to send events to the registered endpoints.
Ok so ideally should that other webhook should send success response though the order fullfilment doesn’t happen there?
That's correct. We expect 200 response as an acknowledgement of the successful delivery. If we don't receive a 200 response then we keep retrying until we exhaust all retries.
You likely want to add some logic in your code that tells you if the webhook event was handled already or not. If it was then just respond with 200 otherwise handle it as usual
NP! 🙂 Happy to help