#celebration - webhooks
1 messages ยท Page 1 of 1 (latest)
Hello! Just starting a thread for you -- I'll review and respond as soon as I can ๐
What do you need help with exactly?
I was about to add more details. But didn't know I could not start a thread
Thanks for creating this thread. I'll add more details now
I have an web app with 2 api and one web:
webapiOneapiTwo
All three(web, apiOne, apiTwo) have different domains. web connects to both of them depending on the need.
Now for each apiOne and apiTwo there is a different hosted endpoint added into webhooks in stripe with the same exact events.
PaymentIntent is used mostly in this app.
๐ stepping in here. Reading!
Alright, I've read your response :). What's the challenge here?
apiOne and apiTwo handle different products.
So when I use web and try to buy a production from apiOne . Payment intent events are sent to both apiOne and apiTwo.
Same happens if I try with apiTwo
What I need is a way to specify for what endpoint should I deliver events.
Example
If I use web buy products using apiOne then events should be send only to apiOne.
If I use web and apiTwo then it should only send events to apiTwo
Gotcha so what you want to do here is to set metadata on your PaymentIntents. There is no way to not have the events sent to both if you are listening for the same event type
The metadata will come through and you can then handle the event based on the metadata
So each events has metadata?
The event will contain any metadata you set on the object
What should I do with events which are supposed to be handled by apiOne ?
Do I just respond with 200 when I get them in apiTwo?
Yes you always respond with a 200. Then you handle the event as you so desire.