#michael.fraser-webhooks

1 messages ยท Page 1 of 1 (latest)

mystic peak
#

hey, could you please provide your webhook endpoint id we_xxx?

boreal grove
#

we_1KoSciKLX8auE5d0ckghvk7Y

mystic peak
#

your Webhook Endpoint only listens to Connect Account events

boreal grove
#

It's configured to send payment_intent? Or are you saying that it's not configured in the receiving end code?

mystic peak
#

there are two types of webhook endpoints

#

and this is really confusing I know and we should document this better in the future

boreal grove
#

I'm glad you're telling me something new. ๐Ÿ™‚

mystic peak
#

when you create a new Webhook endpoint you can either check Listen to events on Connected accounts which basically means that since you are the platform you will get notified when events happens on your Connected Accounts

boreal grove
#

I think I checked that

#

(I was thinking that I'd need it checked to receive payout events for the connected accounts)

mystic peak
#

yes you do

#

but you also need to create another endpoint for your platform events

#

this is where the confusion happens

boreal grove
#

They need to be distinct urls because I assume they have separate secrets?

mystic peak
#

you could eventually use the same URL

boreal grove
#

I'm following. I'm a little amiss on which events are platform and which are connected accounts.

mystic peak
#

but usually our users often separate the handling of the Platform and the Connected Account events

#

the Platform events are the events relative to what you submit using your API keys

boreal grove
#

So, payment initiation (e.g. payment_intent) is probably the only platform event I care about.

mystic peak
#

It really depends that's why I stroke through my last message

#

Let me give you some examples

#

If you create Direct Charges

boreal grove
#

Got it. So, we're creating destination charges. I work for a property management software company. We're collecting rents on behalf of our property managers.

mystic peak
#

the creation of the Payment Intent payment_intent.created would be a Connect Account event

#

destination charges
in your case, those events are Platform events

boreal grove
#

I specifically want the payment_intent.succeeded because it has the payment method, which I need for updating our internal accounting.

mystic peak
#

so you need to create another webhook endpoint

#

without checking that checkbox

boreal grove
#

Create another webhook endpoint in the stripe dashboard, or code up a new url on our side (or both)?

#

I suspect the first, but wanted to make sure

#

especially from "without checking that checkbox" ๐Ÿ˜‰

mystic peak
#

Create another webhook endpoint in the stripe dashboard
yes
code up a new url on our side
It's recommended to treat Platform and Connect Account events separately

boreal grove
#

Bummer, you meant both. Ok. Can do!

#

Thanks for the clarification.

mystic peak
#

you could still use the same endpoint

#

oh no you can't

#

wait

boreal grove
#

I want to verify signatures, though.. I assume they differ

mystic peak
#

yes exactly

#

I was thinking of that

boreal grove
#

Precisely. Ok, I'm following. Weird that my local environment (via stripe cli) was getting both platform and connected events

mystic peak
#

because it's the same endpoint

boreal grove
#

Right, it's just proxying, not based on the push from Stripe. Gotcha.

#

Suggestion: update the webhook event selection to warn folks when selecting events that don't match with the registration?

mystic peak
#

You could still use one endpoint in your code

#

by adding an extra query param to your URL

#

and have your code figure out which secret to use

#

based on your query param

boreal grove
#

Good call

mystic peak
#

let me know if you need any more help