#heavenly father

1 messages · Page 1 of 1 (latest)

foggy anvilBOT
pale ginkgo
#

Do you have a link to the webhook attempt in the Stripe dashboard?

hallow aurora
#

yes please

pale ginkgo
hallow aurora
#

Under local listener

pale ginkgo
#

Yes, but can you post the URL of the failed webhook so I can see it on my end?

hallow aurora
pale ginkgo
#

Can you post the URL of the failed webhook? I can't do anything with the screenshot

hallow aurora
pale ginkgo
#

Still not the URL

hallow aurora
#

You mean the url of my local endpoint

pale ginkgo
#

No, the URL of the view in the Dashboard that shows the failed webhook

hallow aurora
foggy anvilBOT
pale ginkgo
#

sorry, okay that URL actually doesn't have what I need. How about copy/paste one of the evt_ IDs in that command line listener

hallow aurora
#

[evt_3MyHi4BxCytoOvCp0h7qLdAU],[evt_3MyHi4BxCytoOvCp0cNn9Z8b],[evt_3MyHi4BxCytoOvCp07xmjj91],[evt_3MyIygBxCytoOvCp09Bw0XQ6],[evt_3MyIygBxCytoOvCp05nodmxZ],[evt_3MyIygBxCytoOvCp0dAjhmHv]

spark lagoon
#

That 400 error is the forward request from the CLI to your local endpoint

#

What do your local endpoint logs tell you is happening?

hallow aurora
#

I my server give no error and the code runs but I get a 400 error and I have not done anything to the boiler plate code I copied

spark lagoon
#

What exactly is that code? Can you share the details of the handler?

hallow aurora
spark lagoon
#

I imagine you must be hitting line 17

#

Can you add some debugging logs to confirm that?

#

did you configure the endpointSecret to use the secret return by the listen command?

hallow aurora
#

"stripe listen --forward-to localhost:5000/api/stripe_events/webhook" That is the command I used

hallow aurora
spark lagoon
#

Which instructions were you following? We might need to add that somewhere.

hallow aurora
#

Is this why my endpoint is reporting a 400 error =>"stripe listen --events payment_intent.created,customer.created,payment_intent.succeeded,charge.succeeded,checkout.session.completed,charge.failed
--forward-to localhost:4242/webhook"

spark lagoon
#

Yes, that 400 error response is coming from the local endpoint

#

You should add some logging to trace the path each webhook request takes to understand where/why it fails

hallow aurora
#

Its amazing here. I did what you asked but I am still getting a 400. So I went on to test the endpoint in postman and I got "Webhook Error: No stripe-signature header value was provided." So I guess my endpoint is live.. Has anyone reported something like this?? I dont know what to do

spark lagoon
#

Where are you seeing that error?

hallow aurora
#

where I am listening to the stripe events

#

Every where express middleware morgan, where I have stripe listener and stripe dashboard

#

Sorry not on my stripe dashboard. Payment succeded

spark lagoon
hallow aurora
#

I am yet to write code in the webhook. The code I provided earlier is basically boiler-plate code

spark lagoon
#

Sure, but that can still fail and you stil need to debug it if it isn't doing what you expect

hallow aurora
#

Ok I will be back

spark lagoon
#

hey there @hallow aurora we can keep chatting here about the other issue

hallow aurora
pale ginkgo
#

Hi there 👋 taking over, as my colleague needs to step away

What's your question?

hallow aurora
#

Ok.. Before I could successfully pay with my nodejs backend. I wanted to create a stripe user so I could get data when I implement my webhook. after I created the user I had invalid string error on my reponse payload

pale ginkgo
#

So I can't see anything with that URL unfortunately. Are you getting a Stripe error? Or a local error?

hallow aurora
#

Yes

#

But it shows in the event logs that is why I sent it

pale ginkgo
#

Right, but if I click on that link, it will redirect me to my own Stripe account (instead of yours)

#

Are you getting a Stripe error? Or a local error?

#

Which one?

hallow aurora
#

I have this same thing as my error payload

#

I don't know where to look

pale ginkgo
#

Can you copy/paste the Request ID here for me to look at? It looks like this --> req_abc123

hallow aurora
#

req_Hq9CieqY7Yrlyl

pale ginkgo
#

So it looks like you're passing in this to the customer attribute when you create the Checkout Session:

customer: { invoice_prefix: "F691FACA", invoice_settings: { rendering_options: "", footer: "", default_payment_method: "", custom_fields: "", }, test_clock: "", metadata: { email: redacted, mobile: "555555555", name: "redacted", }, id: "cus_NjorPQuzSzgH1U", object: "customer", delinquent: "false", description: "", discount: "", balance: "0", name: "", livemode: "false", next_invoice_sequence: "1", phone: "", tax_exempt: "none", currency: "", address: "", created: "1681850041" , email: "", default_source: "", shipping: "", },

What you should pass instead is a just a Customer ID, which looks like this --> cus_abc123

hallow aurora
#

Thanks. I passed the while customer instead of just the Id

pale ginkgo
#

I'm sorry, I don't understand. Is it working how you want it to now?

hallow aurora
#

yes please.. I have proceeded to payment.. That was the issue

#

But I have one outstanding issue with webhook.. Can I show you?

pale ginkgo
#

Can you explain it to me first?

hallow aurora
#

Sure.. So I am coding with nodejs and I copied the boiler plate code and made route on my server. The issue is I have not made any changes yet but when I trigger an event the endpoint reports a 400. code is here https://dpaste.org/fLWxv

pale ginkgo
#

As synthrider explained earlier, that 400 error seemed to be coming from your server. We can't look at your code to derive why your server is not accepting the request

hallow aurora
#

Oh waaooow. So as I have followed instructions what should I be looking for. Becouse I have tested that endpoint on postman and it give stripe hearders not found error so the endpoint is live but why It is not accepting request I don't know

#

Please has no one else reported a similar issue

pale ginkgo
#

This would be really easy to debug for most web developers, so I'm sure people run into it all the time.

It's difficult to pinpoint what is going wrong when your questions are jumping back a forth to/from different issues and different products.

hallow aurora
#

Some videos I have seen on youtube people jump the verification and just grab the event and work with it. I assume that project is not going far. People have this headache and I have jumped accross issue here.. I am hoping you can point me in the right direction

pale ginkgo
#

"people jump the verification and just grab the event and work with it"
I have no idea what this means. I would also not recommend using Youtube tutorials if you don't understand the underlying technology, as it's going to make it very difficult to improvise when stuff like this comes up.

Maybe start with this and go from there: https://stripe.com/docs/checkout/quickstart?lang=node