#paymentplugins

1 messages · Page 1 of 1 (latest)

night mossBOT
lunar briar
#

HI 👋

austere horizon
#

Hi @lunar briar

#

Here's an example that hopefully makes the issue clear. Site A process a payment intent and Stripe sends a webhook event of payment_intent.succeeded to SiteA and SiteB since they both have webhooks configured. The webhook is only relevant to SiteA. But since the webhook was also sent to SiteB, SiteB fails the webhook validation.

#

We've instructed merchant's to create a new Stripe account per website, but they don't always follow that recommendation.

normal harbor
#

Unfortunately, webhook events can't be sent by the website processed as it's unknown to Stripe. Events will be sent to all webhook endpoints that configured to receive the event types

austere horizon
#

Hi @normal harbor thanks for the reply. That's a really good idea

#

It seems a bit odd that the webhook_id wouldn't be included in the webhook payload. that would be an efficient way to compare the webhook ID of the website receiving the event to the webhook_id of the actual event to see if validation should proceed. Or if the event should be ignored.

normal harbor
#

In fact, your Webhook URL is already identified can be identified a type of webhook identifier in your account since each Webhook ID is linked to one Webhook URL (unless you set up same Webhook URLs in your account)

austere horizon
#

That's where it gets tricky. Sometimes merchants will configured multiple webhooks within the same Stripe account. So they end up with https://example.com/stripe/webhook and https://example2.com/stripe/webhook

#

Stripe will send the webhook to both url's but the object in the webhook event is only relevant to one of the urls.

#

So it would be cool if th webhook ID was included in the payload as a way to determine if the event should be ignored by the recipient

normal harbor
#

I see! Unfortunately, webhook ID is not included in the event. In this case, adding metadata will be the recommended approach

austere horizon
#

Thanks for your input @normal harbor