#cristian_webhooks-accounts
1 messages ยท Page 1 of 1 (latest)
๐ 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.
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.
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?
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.
cristian_webhooks-accounts
We also have a beta ongoing where each developer can get their own "sandbox" account which might be a good fit for you: https://docs.stripe.com/sandboxes
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
@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
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?
this is very interesting
overall yes, it's not perfect and having separate accounts is the best approach (or sandboxes)
Do you have any requirements to join sandboxes beta?
I don't know much about it unfortunately, I'd recommend reaching out to the team based on the docs
Ok! thank you, I will discuss with the team ๐