Karolis Stulgys
06/06/2022, 1:27 PMwebhook endpoint validation. I have secret and I receive the stripe-signature, still getting 400. This might has todo with the event.body ?
try {
if (!sig || !endpointSecret) return { statusCode: 400 };
e = stripe.webhooks.constructEvent(
event.body as string,
sig as string,
endpointSecret
);
} catch (err) {
return { statusCode: 400 };
}Frank
Karolis Stulgys
06/06/2022, 5:55 PM