#Thnks_CJ-node-webhook
1 messages · Page 1 of 1 (latest)
hello
this is a ~relatively common issue with Node and its web server middleware
you're using TS with stripe-node and presumably some Node web server framework (like Express), right?
yes
yeah so same thing, basically some middleware/framework you're using is modifying the raw Event body from the Webhook Event that is sent to you
there are different fixes depending on what framework you're using and how your code is structured
there is a large Github thread here with different answers depending: have a read through this: https://github.com/stripe/stripe-node/issues/341
and try out the approaches there like this one: https://github.com/stripe/stripe-node/blob/master/examples/webhook-signing/node-express/express.js
which sends the raw request to the /webhook endpoint and everything else is pushed on to Express
If you use in your express app bodyParser.json() for all routes, and then have a dedicated route for stripe's webhook, then the second call to bodyParser.json({verify: ...}) as done in the ...
so removing
app.use(express.json());
app.use(express.urlencoded({ extended: false }));```
should fix it?
I can't say
the answer really depends on what your code is doing, you'll have to try out the solutions in that thread
also what happened to google pay?
OLD
NEW
its removed the option for google pay?
@vital sentinel
there are many factors for this, the Google Pay option wasn't removed, rather it can be factors like your browser not being set up for Google Pay correctly
so first
go here:
at the top, do you see the Google Pay button with your browser (do NOT use incognito mode!)
?
yes
ok now, can you send me an example CheckoutSession ID for the "NEW" case, which does not show Google Pay button
ah yeah Apple and Google Pay only work when shipping address is requested on Checkout along with Tax
this is using Tax but not shipping address. It doesn't work cause Google/Apple Pay don't return a full address at the time when the customer selects a payment method so they can't be shown as options