#cristian_webhooks-accounts

1 messages ยท Page 1 of 1 (latest)

teal hatchBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1250112864778326069

๐Ÿ“ Have more to share? Add details, code, screenshots, videos, etc. below.

scarlet lynxBOT
tacit sky
#

Hi there ๐Ÿ‘‹ the approach that readily comes to mind for that is to put a unique value in a query param in the URL for each of your endpoints pointing to the same base URL. Then you can use the query param value to filter/route Events that are received as you need.

safe orbit
#

Right, but doesnt all URLs receive all events? how can I know that the event im receiving belongs to the environment that is receiving it?

teal hatchBOT
tacit sky
#

Because you use a query param to make the URL unique for each "environment" (let me know if it seems I'm not grasping what you're referring to by environment here), while allowing them to all point to the same place.

lone gate
#

cristian_webhooks-accounts

safe orbit
#

If lets say I have 5 environments (A, B, C, D, E) that share the same account, and I have 5 webhook URLs registered with ?env=A ?env=B etc, they all receive the same events. I.e. when A creates a customer, B will be listening to customer.created but that event belongs to A

lone gate
#

@safe orbit there isn't really a way unless you use custom metadata for each request.

#

Usually we recommend having separate Stripe accounts for each environments otherwise

safe orbit
#

right

#

the metadata approach only covers events resulting from an API request, correct?

#

If I create a resource via an API request passing the env in the metadata, but stripes fires a different event, say payment intents and mandates, mandate wont have the metadata, right?

lone gate
#

overall yes, it's not perfect and having separate accounts is the best approach (or sandboxes)

safe orbit
#

Do you have any requirements to join sandboxes beta?

lone gate
#

I don't know much about it unfortunately, I'd recommend reaching out to the team based on the docs

safe orbit
#

Ok! thank you, I will discuss with the team ๐Ÿ™‚