#devangbhuva97-connect-webhooks
1 messages · Page 1 of 1 (latest)
So how to differentiate webhook event by applications? Like which event is for which application?
You mean you have a single webhook endpoint that's used across multiple Stripe accounts?
No, I registered multiple webhook endpoint. Like 1 for staging, 1 for production
So now problem is, all event data will come on both endpoint. So is there anyway to fix that?
We have only 1 Stripe account & that used in every environment
Got it. Unfortunately Stripe events triggered in a certain mode (test/live) will be sent to all webhook endpoints configured to listen for that event type
I saw that - there is setAppInfo option while initialize stripe sdk. So can you pass those details with webhook?
You can't, no
Any alternative solution for this except multiple accounts for each environment?
And any plan to support this type of things in stripe roadmap?
Thinking
Not that I'm aware of (most people use separate accounts for test/live)
Thank you @heady cove
Let me know if you find any alternative solution
My suggestion would be maybe using some kind of URL parameters in the webhook endpoint to differentiate between stages
Then in your handler you can ignore certain events depending on that parameter
I don't think it will work.. because we need some data in webhook event to differentiate
Another option is to filter based on the signing secret of the webhook, which is unique per endpoint
Yeah, not possible to manipulate the Event payload I'm afraidf
One thing we can pass some env details in metadata of every stripe request but not sure that metadata will get in all events