#Kamon
1 messages ยท Page 1 of 1 (latest)
Hi, can you add more details on exactly how you're doing this so I can try to reproduce them on my end?
I'm not sure if you need to recreate anything--I just need to know the proper TypeScript type for the event payload for account.updated webhook events
The event Stripe.Event type from the stripe API in node does not have the payouts_enabled type on event.data.object if the event variable is the data that's returned from stripe.webhooks.constructEvent
๐
You have to cast the object first
event.data.object can be any API resource, so you have to explicitly say "in this case I know it's an Account" so that you can then access Account-specific properties
Howdy Koopa!
Fantastic, that's what I was figuring. My question more-so entails: where can I import/access the Account type?
I'm importing stripe like the example import Stripe from 'stripe'
But I can't access Stripe.Account (or Stripe.PaymentIntent either)
Nevermind, my TS compiler had an issue ๐
Was looking in the wrong spot so I assumed I was importing the type wrong.
Thanks for the help and pointing me in the right direction!
sure thing!