#Sera
1 messages · Page 1 of 1 (latest)
Hello
Hello
Can you show me your Express initialization?
Most likely the Express framework is manipulating the raw body
Which is causing the verification to fail
Like are you using express.json() at all?
Or bodyParser?
Wait I will shoıw you
const express = require("express");
const bodyParser = require("body-parser");
const app = express();
app.use(cors());
app.use(express.static("public"));
app.use(express.json());
app.listen(port, () => {
console.log("Connected! to " + port);
});
👋 hopping in here since bismark had to head out - give me a minute to catch up
Tyt
What other solutions have you tried? and have you looked at this thread in our stripe-node github? https://github.com/stripe/stripe-node/issues/341#issuecomment-757394040
This is a common issue a lot of folks using Express have hit before - that thread has a ton of suggestions and solutions for how to get around it
I tried some of them, I will try bodyParser.raw({ type: '*/*' }) first
I will let you know if something works
Yeah definitely try those solutions - my suspicion is that requesting the raw body with router.post() is too late in the stack. You likely need to do declare it earlier (with app.use)
Yeah that worked
Thank you