#normanlove_checkout-event-metadata
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1498366513105600756
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
HI ๐
I"m a little confused what you mean here. Are you creating the Checkout Sessions on a different account and you are not receiving those events? Or do you want two separate apps to receive the same events?
Also, what do you mean by "apps"? Are these separate Web applications? Stripe Apps?
I'm looking at this event: https://dashboard.stripe.com/acct_1TNoLwBfaFNIwgML/test/events/evt_1TQrXrBfaFNIwgMLiVVo6guK
And I see it was delivered to a single Webhook endpoint.
yes, 2 seperate web applications. I want 2 seperate apps to receive receive the checkout.sessions.completed and let their respective websites know it was fired and they handle things their own way.
Okay but the Checkout Sessions are still created on the same Stripe account, correct?
we had the 1st site setup with a webook and it workd and we had not setup the webhook for the 2nd site yet, but when testing the payments for the 2nd it fired the 1st, and then claude is saying that whenever there is a checkout for the accout it will fire all the webhooks listening to that, and thats the issue
Let's ignore what claude said
yes checkouts sessions are on the same stripe accounts, cause its the same business
So any Checkout Session created/confirmed on that account will send a webhook event to the one endpoint you have registered
one app is the CRM that can send clients products to pay for and the other app is an offering that sells reports
If you want your second app to receive this information too, you need to create a new webhook endpoint for that app
But both will receive EVERY checkout.session.completed event
we will eventuall have 2 endpoints
So, if you don't want to create a new Stripe Account, you will need to handle event filtering on your end
that is the issue. so a business can't have 2 payment apps that are both looking for a checkout completed ?
how do we handle the event filtering on my end? whats the best practice on that. any documentation?
You can, if you handle the filtering on your end
E.g. add some metadata key:value pair that identifies the events your app should care about
add meta data how, where, example?
But if you want each app to only receive the events that are specific to that app, you will need a separate Stripe account
Metadata is a core part of our API designs and most Stripe APIs include that as a parameter
OK, I see, when the API keys are sent, we add a metadata like "app1" to what is sent, right? I see that. And that meta data will be returned when the webhook is triggered?
OK, I see, when the API keys are sent
I don't know what you mean by that. You set metadata when you make a Create or Update request via the API. For creating a Checkout Session it is one of the parameters we list here.
That key:value pair is then available on the Checkout Session object, which is part of the webhook response data you get. So your app could check the metadata property to see if the value matches what it expects. If it does, your app processes the information. If the value is for a different app, it ignores it.
this is the perfect solution I was looking for. Yoou guys continue to be the best support on the planet. thank yoou so much! ๐ have a great day
I'm glad we found a simple way to address the issue. Have a good one!