#mhiggie-node-question

1 messages · Page 1 of 1 (latest)

compact latch
#

Hey @ornate lily! Happy to try and help. Feel free to also just ask your question upfront!

ornate lily
#

will do

#

okay so my webhook endpoint is being hit

#

all is well, but idk why it is failing as
[0] ⚠️ Webhook signature verification failed. stripe is not defined

#

ahh damn fixed it

#

sry

#

first time making these webhooks

#

okay separate question for ya

#

when a payment is successful my user is redirected to a return_url

compact latch
#

that is added by Stripe so you can't hide it and it's mostly fine

ornate lily
#

okay cool

#

updated my webhook and now getting this

compact latch
#

could be many things

#

90% of the time: wrong webhook secret

ornate lily
#

yeah looks like im missing this

express.raw({type: 'application/json'})

#

from my route

compact latch
#

yeah it's hard to say because it's dependent on many other factors that I never understand

#

it's like magic, devs always go "yeah the 12 first attempts didn't work but the 13th worked like a charm" 😅

ornate lily
#

this is my webhook secret, correct?

#

i pop it in top of the same file my route lives in

#

here's my route

#

my req.headers

compact latch
#

I can't really do anything with pictures

#

But really I showed you the potential root causes and now you have to debug that

ornate lily
#

yup gotchya

#

thank you for the help here

compact latch
#

The secret from the CLI is the right one though

ornate lily
#

definitely a raw payload issue

compact latch
#

that's what trips up a lot of devs so if you use that one it's not the problem and it will be that damn raw payload 😦

ornate lily
#

yeah i've got a line of middleware that is fouling up this route for exactly that

#

cool cool okay thank you mr. koopa