#vasynyt-connect-webhooks

1 messages · Page 1 of 1 (latest)

fossil portal
#

Do you have the ID of an event that did not come through (evt_123)?

#

It doesn't have to be a seperate URL but your server will have to differentiate so it can use the proper webhook secret and whatnot

boreal sun
#

The events are not popping on the dashboard even. What do you mean by proper webhook secret? If I have one endpoint then I shouldn't I have only one signin_secret also?

#

Just tried with payment_intent and the event comes thourgh to the dashboard, but no luck with account_updated

fossil portal
#

Can you send me the ID of your platform account (acct_123) and the ID of an event you expected to see on that account (evt_123)?

boreal sun
#

Do I share them here or should I PM you directly?

fossil portal
#

You can share them here

rain crest
#

I'm around and catching up so Pompey has shared context

boreal sun
#

This is the account id acct_1K2IGVPTiN20PHzw

#

So while updating something from the accounts dashboard like the name I should get account.updated webhook, but nothing is popping up either on the dashboards webhooks tab nor on my server.

#

I've checked that I'm listening to the events account.updated and account.application.authorized

rain crest
#

where are you listening for webhook evnets/

#

Stripe CLI?

#

the https:// application_url .com/webhook URL you have is for "account" webhooks, on your Platform

#

you need to create a "Connect webhook endpoint" which you dont' have righ tnow

#

that sends you events happening on Connect accts

boreal sun
#

I'm listening them on my dev server that's up and running on heroku. I'm not sure if I understood what you meant. Just previously Pompey said that I wouldn't need seperate endpoint for connect webhooks?

rain crest
#

so Pompey meant something else, problem is you don't have a Connect webhook endpoint created

#

that explains what you need (the webhook endpoint you don't have)

boreal sun
#

I see. Can I still configure then both to point to /webhook instead of /webhook/connect?

rain crest
#

you should not do that actually

#

because

#

you'll get evt_1 for e.g

#

and your code wouldn't know whether it is a Connect event or an Account event

#

and you won't know which webhook signing secret to verify signatures with

boreal sun
#

I see. This might be a bit problematic for me since I’m using the stripe_event gem, but not sure if it supports multiple endpoints.

rain crest
#

ah not familiar with stripe_event gem

boreal sun
#

The connect events will always contain event.account id right?

rain crest
#

yes

#

both connect and account ones will

#

you could technically do this

#

keep one webhook endpoint and before you verify signatures (I assume stripe_event gem does that), you can look at the event request and see if it has a account: acct_123 field on it, if it does, it is a Connect event, otherwise no https://stripe.com/docs/api/events/object?lang=node#event_object-account

#

otherwise it is an Account event

boreal sun
#

I see. This is a bit hacky though. Perhaps I will consider handling the webhooks without any gems.