#dimi - webhook id

1 messages · Page 1 of 1 (latest)

vocal cairn
tepid lake
#

hi 👋

vocal cairn
#

Hello

#

Checking this really quick

#

What's your use-case here?

tepid lake
#

we have more than just a dev and production environment, so I've added our testing/staging webhooks on Stripe dashboard to also take events

#

and I want to use the webhook id in the webhook endpoint

#

to decide whether to ignore or process the event

#

the codebase (Node) knows which env it represents

#

so if it keeps an association of webhook ids

#

it will just respond with 200 and ignore the dev events sent to staging

#

and vice-versa

vocal cairn
#

So if you have multiple webhook endpoints for the test environment, all events will be sent to all webhook endpoints added

#

There isn't a webhook id in the event

#

And it wouldn't really help in this scenario since each endpoint in the test env would get the event

#

You could use metadata on all requests to differentiate the environment

#

And check the metadata in the event's data

tepid lake
#

ok

#

what about the events of Connect Custom onboarding

#

such as "account.updated"

#

would they contain the metadata if the onboarding was initiated w/ the metadata?

vocal cairn
#

For onboarding, are you using Connect Onboarding (hosted through Stripe), or are you doing it through a series of API calls?

tepid lake
#

stripe***

#

no ability to add a custom header to a webhook?

vocal cairn
#

Unfortunately not

#

Another thing I recommend if you have test, staging, and prod envs is to use multiple stripe accounts

#

Will be easier to keep webhooks separate