#acffaria91-webhook-404
1 messages ยท Page 1 of 1 (latest)
Hello ๐
Can you verify if the URL you have set as a webhook endpoint is correct?
as well as it is reachable?
I'll check, but if it's the same as the localhost shouldn't it be ok? (I'm new to stripe and I'm still understanding the basics)
I get this error: Cannot POST /webhooks/stripe
When you say live, you mean a webhook hosted on a remote server correct?
I mean in my actual website that is online. It's a nodejs hosted on a windows server
Okay so what URL have you registered as a webhook endpoint?
I'd recommend checking your server logs to see what's causing the POST request to fail here
I get this error: Cannot POST /webhooks/stripe
Where exactly are you seeing this error?
๐ stepping in here.
So yeah that 404 in your first screenshot indicates that is what is being returned from your Server when the webhook is sent.
Can you share your webhook code?
Also can you share one of those event IDs
It looks like evt_xxxx
So that event is invoice.payment_succeeded but doesn't look like you have code in your handler for that event type.
Before worrying about that, can you add a log at the beginning of your handler for req.body and then trigger a new event
And see if your endpoint is getting hit at all?
sorry, I send the 1st one, this one I have in my code: evt_3L1B9NBOIcgIIZ170QWpDjJg
I'll add the log and check
I got no log
Yeah okay
So the issue lies in your server itself
You will need to talk to your hosting provider for why your endpoint isn't getting hit at all.
I'm hosting on a windows server, do you think that might be impacting something?
Hmm though shouldn't your endpoint be /webhooks/stripe?
Since you are using an Express router
Shouldn't that match?
I'll try, I had this website done by someone else a few years ago and I'm updating for the new checkout. A lot of things I'm figuring out as I go. Because it worked on localhost with the stripe CLI I though it would be ok
but I'll try that
The other option is to change the endpoint in your Dashboard to /webhook
No need to apologize!