#kenehermitcoder

1 messages · Page 1 of 1 (latest)

quiet pumiceBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

dull vapor
#

Hi there!

#

Can you summarize your question here?

deft zephyr
#

I created a checkout session and after the checkout link was sent and I made my payment, the web hook doesn't seem to be working.
I am on the test mode, though.

dull vapor
#

Can you share the Checkout Session ID? And clarify which webhook event you where expecting to receive but didn't?

deft zephyr
#

Before I do that, here is the error I am getting on my console: "(node:32336) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [DailyRotateFile]. Use emitter.setMaxListeners() to increase limit
(Use node --trace-warnings ... to show where the warning was created)
(node:32336) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 finish listeners added to [DailyRotateFile]. Use emitter.setMaxListeners() to increase limit
".

#

Hello, are you still there?

dull vapor
#

Please be patient, Discord is busy.

#

And the error you shared seems completely unrelated to Stripe.

deft zephyr
#

But the error code is 400

dull vapor
#

You didn't share any request ID or event ID or object ID for me to check this.

deft zephyr
#

Here is the event ID: evt_1ODNsDLhCDDmT58KZWbISwnL

dull vapor
#

I see Stripe sent you the event, and your server responded with a 200 status, meaning everything when fine.

deft zephyr
#

Okay, I think that the problem comes from Stripe not passing an accessToken to the request header sent to the webhook. How can I do this, as accessToken is required to access the webhook

#

Hello?

dull vapor
#

Give you give a lot more context about your issue? I still don't understand.
When do you get the error? In your webhook endpoint code when receiving a webhook event?

deft zephyr
dull vapor
#

Can you shre the event ID?

deft zephyr
#

That's the response from the Stripe page.

#

Here is the event ID: evt_1ODNsDLhCDDmT58KZWbISwnL

dull vapor
#

But as you see Stripe successfully sent you the event. It's your server that returned a 200 status with an error. So the issue is on your end, not on Stripe's end.

#

Can you check your server's log to find the full stack trace of the error, to understand which line of code is causing this issue?

deft zephyr
#

Is the event ID I am sending in the correct format expected of an event ID

dull vapor
#

yes

deft zephyr
#

Okay.
So what I need is for me to be able to add an accessToken to every request I make to the webhook

#

That's to supply stripe with the accessToken to place in the request header of the web hook each I call it.

dull vapor
#

What is an accessToken? You can't add anything to the events Stripe sends you.

deft zephyr
#

I mean authorization token to access endpoints on my server.

shrewd canopy
#

Hi! I'm taking over from my colleague. Please, give me a moment to catch up.

#

The webhook endpoint should be publicly accessible, you can't add any tokens/headers to the request.

deft zephyr
#

So in that case please, how can I verify the authenticity of the request coming to my server as I need to confirm that the request is coming from my user through Stripe?

shrewd canopy
#

What do you mean by "coming from my user through Stripe"?
The webhook requests just come from Stripe.

deft zephyr
#

Okay, how can validate the requests coming to this webhook?

shrewd canopy
#

Are you using node?

deft zephyr
#

Yes, I am.

shrewd canopy
#

You can use constructEvent to verify the authenticity.