#msms-connect webhook

1 messages · Page 1 of 1 (latest)

orchid fossil
#

hey, I really understand the confusion you're having which is a feedback that we are receiving quite frequently lately and we are trying to address it. Basically when you create a Connect Webhook it will only listen to Connect Events, if you need to listen to events on your platform you should create another Webhook Endpoint without checking the Listen to Connect events checkbox

#

this will give you access to the other events that you are looking for

eager summit
#

We have a /stripe/webhook endpoint on our end. Can we create another Webhook Endpoint of type Account pointing to the same url?

orchid fossil
#

yes

#

but in that case what I would suggest is adding a query param to distinguish the two types of events

eager summit
#

are there "overlapping" event types between Account and Connect? I was not aware of such a thing

orchid fossil
#

something like /stripe/webhook?type=platform and /stripe/webhook?type=connect

eager summit
#

are there "overlapping" event types between Account and Connect? I was not aware of such a thing

#

like how different should the logic be in the webhook handler?

orchid fossil
#

it really depends on what type of payment you're doing Destination vs Direct Charges

eager summit
#

we are doing destination

#

with application fee

#

so the platform is very "central"

#

we have content creators that receive subscriptions with destination charges

#

they open a stripe express connect account (i believe that is the correct name)

#

I mean, all IDs are global no? so when I update something in our db, there shouldn't be a risk of ID conflict or something if I just point both endpoints to the same URL, without even using a type=<> query param?

ebon lantern
#

Hey, taking over here. Catching up!

eager summit
#

Hi

ebon lantern
#

Yep, so with destination charges the payment related events will occur on the platform account

#

So as @orchid fossil stated, you need a non-Connect webhook to forward those events on your account to your endpoint

eager summit
#

Okay so to summarize:

To listen to payments made to the platform (e.g. payment_intent.succeeded) I need a Platform webhook endpoint
To listen to account changes of the connected accounts (e.g account.updated) I need a Connect webhook endpoint

It should be safe to point both Webhook endpoints to the same /stripe/webhook URL, and it would better to distinguish between both types of webhook endpoints by using a query param ?type=platform/connect, correct?

#

@ebon lantern

ebon lantern
#

Sure, you can use the same endpoint/handler for multiple webhooks. It'd just be up to your to write the logic to handle them accordingly

#

The payload will look slightly different for events sent to the Connect endpoint, too

eager summit
#

Okay right now for connected accounts we only care about onboarding them and updating their account details on our side

#

Since the connect events already have the id and details of the account in the payload, it should be okay to just point both without any extra logic in the webhook handler, correct?

#

I just need a quick fix right now 😅

ebon lantern
#

I guess if you're only listening for account.updated on your Connect webhook, and not listening to that on your account webhook then it shouldn't be an issue

eager summit
#

That's perfect, thank you!