#vlad-ko_webhooks

1 messages ยท Page 1 of 1 (latest)

craggy sandBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

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

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

still summit
#

๐Ÿ‘‹ Hi there!

blissful rune
#

hi

still summit
#

What do you mean by different events based on country here?

blissful rune
#

the problem is that they should be the same based on event type

#

the receiving servers should be different

#

some users and paid products should be UK based

#

the other users and products will be Thailand based

#

so UK users related data should be stored on a server in UK (webhook 1) and for Thai users -> Thailand (webhook 2)

still summit
#

It's not possible to send events, e.g. payment_intent.succeeded to different webhook endpoints based on the event contents

blissful rune
#

I am the tech guy and honestly on a dashboard level I am not sure how to advise our Business guys, should they create a Thailand account - so they will have new dashboard and from there it is obvious for me that I will have a new set of api key + webhook which will be totally separate from the UK one

#

the problem is that in future if we decided to have an entity in Thailand we want to move the existing users there which I am not sure how can be handled

still summit
#

Yeah. So one option would be to send the data to both webhook endpoints, and on each one you can inspect the event and ignore any that aren't relevant for that country, if possible

blissful rune
#

that is what i am planning to do, but i want to check if there is another way...

still summit
#

That would be one way to do it, and you can add metadata to different objects to tag them as relevant to UK or Thailand, for example

blissful rune
#

for creating another account in Thailand we will need a local entity rigth?

#

we cannot use the one in UK?

still summit
#

Yeah, to create a Stripe account based in Thailand you would need a local entity there

craggy sandBOT