#BrianC-Webhooks
1 messages · Page 1 of 1 (latest)
Hi there, sounds like this is a Connect Webhook endpoint? This is expected in that case: https://stripe.com/docs/connect/webhooks#connect-webhooks
There isn't a way to specify endpoints, you will need to filter the Events when they hit your handler
For instance, ignore if livemode: false
OK. Thanks!
Sure!
Just to clarify, it seems like all webhooks (live and test) are sent to all endpoints. Is this correct?
For Connect endpoints yes. For Direct endpoints, no. Direct livemode endpoints will only receive livemode events from your account (and testmode likewise).
I am actually looking for clarification between live and test server endpoints, regardless of direct or connect charges. It seems like all webhooks (live and test) are sent to all endpoints created (regardless of what their purpose is). Is this correct?
Ah no that is dependent on how you set up the endpoint. You decide which webhooks the endpoint listens for when you create the endpoint.
But then both live and testmode webhooks for that type of webhook will be sent to that Connect endpoint.
So, for example, if you create the Connect webhook to just listen for account.updated, then only account.updated webhooks will go to that endpoint, but both livemode and testmode account.updated hooks.
So yes, all webhooks are sent to all endpoints (even if they are carved out). There is no way to control that except after it is sent. I need clarification on this when setting up testing. We don;t want our live endpoints to have to field a lot of garbage requests (even though we will conditiionally only process livemode). Seems inefficient use of resources so trying to get our heads around it here.
Yes what you stated above is the expected behavior.
OK. Just trying to get our heads around this. So, if test event is sent to both our test and live endpoints, the live endpoint will fail and the test will succeed. How does Stripe handle that? Will the live endpoint eventually be disabled due to the number of failed requests?
You want to make sure to always respond to the Webhook, otherwise yes the endpoint would eventually be disabled. You can respond without performing any actions though.
What response code should we send? I'm hoping not a 200 for a failed request 🙂
lol it isn't a failed request though. You respond with a 200 to say "yes we received this successfully".
OK. We will do that. How do we deal with app stress testing though? If we send a large number of requests for testing purposes, each one will hit our live server too? It just seems like we are missing something here. Doesn't make sense.
If you need to stress test then you can always create a different test account so that your livemode endpoint is not hit.
OK. Maybe defeats the purpose of having a test mode as all of the settings, etc would have to be exact. It would be MUCH easier if Stripe didn't sent test webhooks to live endpoints. We will work with what we have though. Thanks