#jepezi_webhooks

1 messages ยท Page 1 of 1 (latest)

fallen knollBOT
#

๐Ÿ‘‹ 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/1481845972668518460

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

smoky comet
#

Hi @nimble forge thanks for waiting. Let me take a look at it

#

Can you share with the ID of "account.updated" events that were correctly sent to "/connect-webhook/snapshot" endpoint?

nimble forge
#

here's the id

#

evt_1TALU6BNUiD32NHoHoeB3sDY

nimble forge
smoky comet
nimble forge
smoky comet
#

Ok, can you run stripe login again and confirm you are using the correct Stripe account?

nimble forge
#

but today i try onboarding connected account

#

just try changing some info again in onboarding

#

evt_1TAMGDBNUiD32NHoazOE8yE1

#

can you see this "account.updated" event. it's supposed to be connect account event

nimble forge
nimble forge
#

so what i know so far,

  • in my platform stripe account dashboard, i see "v2.core.account*" events
  • in connected account dashboard, i see "account.updated" events
smoky comet
#

Ok, so your question is why account.updated events aren't shown up in the platform Dashboard?

nimble forge
#

yes

#

that's my 2nd question.

#

and my 1st question is why these "v2.core.account*" events got sent to my local /platform/thin webhook, not /connect/thin webhook

#

should i separate platform (snapshot & thin) and connect (snapshot & thin) webhook endpoints and listen to them like this?

snapshot

stripe listen --forward-to /platform-webhook/snapshot --forward-connect-to /connect-webhook/snapshot

thin

stripe listen --forward-thin-to /platform-webhook/thin --forward-thin-connect-to /connect-webhook/thin --thin-events "*"

#

i'm super new to stripe and docs is a bit confusing

#

let me rephrase my question like this. when i run above 2 commands on terminal.

here's what i expect:

  • "v2.core.account*" events got sent to my local /connect-webhook/thin endpoint
  • "account.updated" event got sent to my local /connect-webhook/snapshot endpoint
  • i can see all these events in platform dashboard

what happening:

  • โŒ "v2.core.account*" events got sent to my local /platform-webhook/thin endpoint
  • โœ… "account.updated" event got sent to my local /connect-webhook/snapshot endpoint
  • i see only "v2.core.account*" events in platform dashboard
smoky comet
#

Hmm, can you run two stripe listen commands instead of just one?

nimble forge
#

yeah i run 2 stripe listen commands (one for snapshot, one for thin)

smoky comet
#

For example

stripe listen --forward-thin-to /platform-webhook/thin to forward thin events to platform endpoint
stripe listen --forward-thin-connect-to /connect-webhook/thin to forward connect thin events to the connect webhook endpoint?

nimble forge
#

okay let me try

smoky comet
#

About the Dashboard, you can only see the webhook events that happens in your account in your Dashboard, to view events that happens on the connected account, you need to accees the connected account's dashboard. Can you send me one example of the v2.core.account event? I want to confirm if it's happening in the platform or the connected account.

nimble forge
#

evt_test_65UJkfBaDttOAelKn0Q16UJMCD4hRFJYREZgpqeP7qKGAy

#

this is v2.core.account[identity].updated

smoky comet
#

Ok, can you share with me the Dashboard URL where you see this event in your platform Dashboard?

nimble forge
smoky comet
#

Ok, this event was created on account acct_1T9yEsBNUiRbhY4O, and that's why you are able to see it on acct_1T9yEsBNUiRbhY4O's Dashboard.

nimble forge
# smoky comet For example `stripe listen --forward-thin-to /platform-webhook/thin` to forward...

i ran this and i found interesting result.

thin connect:
--> v2.core.account_person.updated
--> v2.core.account[identity].updated
--> connect capability.updated
--> connect capability.updated
--> connect capability.updated
--> connect account.updated
--> v2.core.account[requirements].updated

thin: (platform)
--> v2.core.account_person.updated
<-- [200] POST http://localhost:3000/api/webhook/stripe/platform-webhook/thin
--> v2.core.account[identity].updated
<-- [200] POST http://localhost:3000/api/webhook/stripe/platform-webhook/thin
--> connect capability.updated
--> connect capability.updated
--> connect capability.updated
--> connect account.updated
--> v2.core.account[requirements].updated
<-- [200] POST http://localhost:3000/api/webhook/stripe/platform-webhook/thin

nimble forge
#

so from 2-command test,

the forward-thin-connect-to actually forwards the same events as forward-thin-to command.

fallen knollBOT
#

Hello @nimble forge, we have sent you a direct message, please check it at https://discord.com/channels/@me/1481865032106115202

  • ๐Ÿ”— The message has instructions on how to grant read and write access to your Stripe Dashboard for our Developer Support team, in order to help you more effectively.
nimble forge
#

stripe listen --forward-thin-to http://localhost:3000/api/webhook/stripe/platform-webhook/thin --thin-events "*"

and

stripe listen --forward-thin-connect-to http://localhost:3000/api/webhook/stripe/connect-webhook/thin --thin-events "*"

smoky comet
#

I just sent you a DM, can you click on to give me consent to check your webhook configuraitons in Dashboard?

nimble forge
#

done

smoky comet
#

Thanks

nimble forge
#

i just checked the webhooks tab on dashboard. i only see 1 /platform/thin. the /connect/thin is not on there. but my 2 terminal tabs are still running. this may explain why my /connect/thin endpoint never receive events

fallen knollBOT
nimble forge
#

i think i narrow down the problem with stripe cli

smoky comet
#

Hi @nimble forge , I'll pass this thread to my colleague @gaunt solstice , they will continue helping you

nimble forge
#

stripe listen --forward-thin-connect-to http://localhost:3000/api/webhook/stripe/connect-webhook/thin --thin-events "*"
the --forward-thin-connect-to lists all events (both "v2.*" and "connect *" on terminal but it doesn't really forward the event to my endpoint

however,

stripe listen --forward-thin-to http://localhost:3000/api/webhook/stripe/connect-webhook/thin --thin-events "*"
when i change to --forward-thin-to, it lists all events (same behavior) and it forwards all event to my endpoint

gaunt solstice
#

Hi! Give me a moment to catch up! Thanks!

nimble forge
gaunt solstice
#

Thanks for waiting!

v2.core.account events will only be sent to the platform and not the V2 account / connected account.

v1 events (e.g. account.updated ) events will be sent to the v2 account / connected account.

If you are listening to your v2account's events, you will get v1 events (e.g. account.updated )

So what you are seeing is correct.

nimble forge
#

thanks for clarifying the behaviors. so account.updated event can be both from my own platform account and v2 connected account right? that's why i have to choose the "Events from" option in a webhook destination dashboard.

#

the only confusing part is the stripe listen command. the --forward-thin-connect-to option doesn't really send events to my webhook endpoint at all. i have to use --forward-thin-to to listen to v2 events. i'll test the --forward-to and --forward-connect-to behavior and see if account.updated event belongs to platform or connected account.

#

"v1 events (e.g. account.updated ) events will be sent to the v2 account / connected account." <- does this mean as a platform, i won't get account.updated of connected accounts? i saw some articles online say check this event for onboarding status (*_enabled properties).

gaunt solstice
#

so account.updated event can be both from my own platform account and v2 connected account right?

Yes

--forward-thin-connect-to option doesn't really send events to my webhook endpoint at all

  • --forward-thin-to / --forward-thin-connect-to are for V2 (thin) events only
  • --forward-thin-connect-to forwards thin Connect webhook events to the specified local URL.
  • Connected accounts don't have V2 thin events which is why nothing is being sent to the endpoint.

i'll test the --forward-to and --forward-connect-to behavior and see if account.updated event belongs to platform or connected account.
When you get the account.updated event you can see if there is an account = acct_abc field. That will show it is for your connected account.

does this mean as a platform, i won't get account.updated of connected accounts
You will get account.updated for connected accounts but you cannot sue thin events for them.

nimble forge
#

Connected accounts don't have V2 thin events
can you elaborate this? i thought connected accounts are v2 account.

#

oh i think i understand it now

#

i'll just make 2 webhooks. one for thin and one for snapshot and choose events to handle in my case. originally i thought i should do 4 which is really confusing

gaunt solstice
#

can you elaborate this? i thought connected accounts are v2 account.
Apologies for not being clear. v2 accounts generate V2 events for their platform. Not for themselves. So a v2 account will not recieve a V2 event.

#

i'll just make 2 webhooks. one for thin and one for snapshot and choose events to handle in my case. originally i thought i should do 4 which is really confusing
I would recommend 3 webhooks if your V2 accounts are not using any V2 API liek above:

  • Webhook 1 to listen to v1 events of your own platform account
  • Webhook 2 to listen to v2 events of the V2 accounts on your own platform account
  • Webhook 3 to listen to v1 events of the V2 accounts on your own platform account
nimble forge
#

ah make sense. right now i'm at onboarding connected accounts and most of events i see is v2 events (v2.account[*].update). i think webhook 3 (v1 events) will come in handy when i start processing payment on direct charge for them right?

gaunt solstice
#

Yeap exactly!