Stripe Webhooks typesafety

Im getting a stripe webhook to send a post request on invoice finalized to my next lamda func, but obviously I don't have the typings of req.body.object. How do I get these?
2 Replies
Naked
Naked14mo ago
You need to construct the event using the body, when you do the stripe library will give you the type.
Naked
Naked14mo ago
Something along these lines