#senakaRan
1 messages · Page 1 of 1 (latest)
👋 happy to help
thanks
are you using stripe listen --forward-to?
Yup
webhook is called correctly
but return 400 error
with Webhook Error: Unable to extract timestamp and signatures from header.
some developers say that stripe request includes timestamp info, so it gives this error,
I feel lost
would you mind sharing a snippet of your code and a screenshot of the terminal where you're getting the error
that's not how you should test your webhook endpoint
instead you should use the Stripe CLI with stripe listen --forward-to ... and on another terminal session stripe trigger <fixture>
I open 2 terminals and run it
one is for this: stripe listen --forward-to localhost:4242/webhook
another is for : stripe trigger payment_intent.succeed
am I wrong?
no that's correct
I don't see the webhook endpoint secret here
could you please make sure that the endpoint secret is the same one from the stripe listen terminal
that's not the secret that you should use
but instead you should the one generated when you start the stripe listen command
go back in the terminal where you started that command
you should find it
generate?
I see
what command I have to input to generate it?
now this point I am standing...
would you mind running stripe -v
yes please
that is it
yes looking into it
thanks
Hey! Taking over for my colleague. Let me catch up.
Sorry, but could you please summarize your lastest followup question ?
thanks
I tried to implement Webhook to check PaymentIntent Success status.
I just setup the script in my node.js backend project according to the guide.
https://dashboard.stripe.com/test/webhooks/create?endpoint_location=local
Whenever I call "stripe trigger payment_intent.succeeded"
I face this issue:
Webhook Error: Unable to extract timestamp and signatures from header.
Please guide me how to solve this issue:
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
error is coming from this part
"Unable to extract timestamp and signatures from header."
just fyi, the "Unable to extract timestamp and signatures from header." is only happening when you call it from postman
each webhook endpoint has a different secret
this is why I asked you to change the webhook endpoint secret when you started the stripe listen command
on your server you need to use the webhook endpoint secret that you can find on your dashboard
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
you need to click on reveal
sorry
leave it
I will fix the issues
but now I face issues on local test
that is the staging site
I have to solve out the local issue first
ok so first things first https://dashboard.stripe.com/test/events/evt_3MTjjnHSSJFxb6zy0LpbcC6V
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
can you look into that page? under Webhook CLI responses
this is were you can find the real error message
Webhook Error: No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe? https://github.com/stripe/stripe-node#webhook-signing
this one you mean?
yes
so this means that there's something wrong with the signature
it goes back to the webhook endpoint secret
make sure you're not running multiple instances of Stripe CLI stripe listen
multiple instances?
when I run the command "stripe trigger payment_intent.succeeded"
no I meant if you're running the command on multiple terminals on the same time
3 events are running
I don't mean the events
I see
ok
not at this moment in my side
sorry
one more question plx
plz
app.post('/webhook', express.raw({type: 'application/json'}), (req, res) => {
const sig = req.headers['stripe-signature'];
if I set express.raw(): TypeError : Express is not a function error
I face this
what is the solution for this issue?
are you using express as your nodejs server?
so now I set "bodyparser.raw" instead of it
you need to import express
that's a different file right?
in the file express imported
is this related with router ?
I am not sure really!
Hi, I'm taking over my colleague!
Please give me a moment to catch up.
Is this the latest issue you're having?
current issue I have
What version of express are you using?
"express": "~4.16.1",
Apparently they added it in 4.17.0: https://expressjs.com/en/changelog/4x.html#:~:text=4.17.0 - Release date%3A 2019-05-16
Try updating the package
Happy to help. Let me know if you have any other questions.
thanks