Created
October 26, 2019 22:21
-
-
Save zlwaterfield/67db23a745a9d342e3a3fca0463b966b to your computer and use it in GitHub Desktop.
Blog post snippet - https://medium.com/gofaros/stripe-webhooks-dd2aed422837
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Stripe Webhooks | |
app.post('/api/v1/webhooks', bodyParser.raw({ type: '*/*' }), webhooks.index); | |
// Parse body to into JSON | |
app.use(bodyParser.json()); | |
app.use(bodyParser.urlencoded({ extended: true })); | |
app.use(cookieParser()); | |
// All other routes | |
app.use('/', routes); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment