Thanks for responding @julian @PitaJ
Stripe requires the incoming data to be parsed to raw data.
Here is a snippet of their recommended method of handling incoming hook event data:
// ...
// Match the raw body to content type application/json
app.post('/webhook', bodyParser.raw({type: 'application/json'}), (request, response) => {
const sig = request.headers['stripe-signature'];
let event;
try {
event = stripe.webhooks.constructEvent(request.body, sig, endpointSecret);
}
catch (err) {
response.status(400).send(`Webhook Error: ${err.message}`);
}
// ...
It looks like the stripe event construction requires the incoming data to passed as raw data.
Here is the link to the documentation page: https://stripe.com/docs/webhooks/signatures
Like I said before I might be missing something. I am aware there was/is a stripe plugin already so I assume there is a way to handle this situation without the introduction of a new hook.