#mtanzi-multiple-webhooks

1 messages ยท Page 1 of 1 (latest)

rancid phoenix
#

Hi there ๐Ÿ‘‹ please bear with me while I confirm that.

timid lark
#

sure!

rancid phoenix
#

Are you using one of our libraries to handle the signature verification?

timid lark
#

yes I am using the ruby library

rancid phoenix
#

I think the easiest approach is to just try verifying the event with each endpoint signing secret, and stop trying when one succeeds.

timid lark
#

I am using the following API:

event = Stripe::Webhook.construct_event(@payload, @signature, @signing_key)
timid lark
rancid phoenix
#

Sorry, juggling a lot of threads so it took a second to remember the better approach. You can add query params at the end of the URL you provide for your webhook endpoint (a unique value for each account), and then consume this param on your end to determine which account sent the event.