Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
try {
let sig = req.headers['stripe-signature'];
let ev = stripe.webhooks.constructEvent(req.body, sig, env.endpointSecret);
if (ev) done(null, ev);
} catch (e) {
return res.sendStatus(401);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.