ARTICLE AD BOX
I have a server application that handles checkout "post" from a user form. It create a session using stripe.checkout.sessions.create(...) and it works, meaning I can see the activity in the Stripe dashboard, in test mode.
In my Stripe account, I also created a webhook destination. It has a name chosen by me, such as "mydestination-mymarket" , and a destination ID picked by Stripe, that looks like "we_L0w3rCaS3AndUpperCas3Mess". This destination points to a webhook "post" handler that exists on the same server.
How do I tell Stripe Checkout what destination to use, i.e. which webhook to invoke?
This seems to be relevant if I have 2 different destinations registered in the dashboard, for 2 different websites. Are they both gonna fire when someone buys something one one of the websites?
4,4951 gold badge34 silver badges49 bronze badges
They are 2 completely different things:
The endpoint to create a Checkout Session will be called by your frontend code, which should redirect your frontend to the Stripe-hosted Checkout Session page.
Later, when you customer paid on the Stripe-hosted Checkout Session page, Stripe will send a webhook event to your webhook endpoint URL, event checkout.session.completed. Your backend would handle this event and mark the order as successful on your system.
See How Checkout works.
2,0391 gold badge12 silver badges9 bronze badges
3 Comments
Oh sorry, yes, the title is bad, I need to change it; I know that they are different and for the most part I got them to work. Yes, you are right, the payment needs to happen first, before the webhook is invoked. But when it does, it is a payment for a checkout session that was initiated by my backend. Shouldn't the checkout session be able to choose which destination to use? Right now it works, in the sense that I get a webhook event where event.data.object.id matches the original session.id. But what's the point of allowing multiple destinations if the checkout API cannot select one?
2026-03-23T02:54:06.57Z+00:00
For instance, the way the dashboard is structured seems to imply that it is possible to have a destination x for market-1.example.com and a separate destination y for market-2.example.com. When I buy something on "Market 1", are both webhooks gonna fire? Is "Market 2" gonna get an event that someone bought something on "Market 1"?
2026-03-23T02:56:23.423Z+00:00
I am starting to think that the point of having multiple webhooks is to route "different event types" to different webhooks URLs that implement different handling, or to route the same event to different "departments" within the same organization. It is really not for managing multiple markets from the same dashboard. That's probably an unsupported scenario.
2026-03-23T03:47:06.907Z+00:00
Explore related questions
See similar questions with these tags.
