#thierno-hamidou-diallo_webhooks
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1288846643705413663
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
need help
Hello
@mild lantern please use your own thread.
@mighty oar can you give me more details?
When you test your endpoint do you see it receiving the Webhook request?
yeah
Where are you seeing a 403 error exactly?
And do you have an example Event ID that you tested with that you can share?
on stripe dashbord
Can you share the Event ID?
Hmm that Event doesn't have any Webhook attempts / responses?
Okay I do see these failed Events when I look at your endpoint
So that 403 status is a response that is coming from your server
how to create listen url without stripe cli
Have you allowlisted the Stripe Webhook IPs: https://docs.stripe.com/ips#webhook-notifications ?
Not sure what you mean by that? You host an endpoint on your server
it's online domain
Correct
Looks like you already have an endpoint that these Events are being sent to
But that endpoint is returning a 403
on my hosting server ?
Yes, your server is sending back that 403
So you need to debug why that is happening
Most likely it is because there is some firewall or something that is blocking the reception of these Events
So I'd first allowlist the IP Addresses that I provided above and then test again
do you know laravel ?
No I'm not intimately familiar with Laravel
But Laravel is just a framework that sits on top of your server, no?
This is at the server configuration level
do i need to have a specially prepared route on post to accommodate this request from stripe
?
like local : stripe listen --forward-to localhost:8000/stripe/webhook
Yes, you would need to have Webhook handler code like we discuss at https://docs.stripe.com/webhooks#webhook-endpoint-def if that is what you are asking?
what is the equivalent of the command "stripe listen --forward-to localhost:8000/stripe/webhook" on an online hosting
just I can't use stripe cli
You just trigger an Event
You can do that by making a normal API request or if you want to use the CLI you can just do stripe trigger xyz
i can use stripe cli
So for example stripe trigger payment_intent.created
i can't install stripe cli on my hosting
You don't have to?
You just run the CLI locally
It still will send all Events to your hosted endpoint
As long as that endpoint is listening for that Event type
Yeah you are misunderstanding
You don't have to use the CLI from your hosted server
You can trigger Events locally using the CLI and they will be send to your server endpoint
okay
let's me do its
i dit it
I did it
evt_3Q3HbdIRaYjb5t8l0iL9boug
this request is from my localhost machine
Your endpoint isn't listening for payment_intent.created
So it won't receive that Event
If you want to update what Event types it listens for then you can update that here: https://dashboard.stripe.com/test/webhooks/we_1Q2zE9IRaYjb5t8lOatVxehm
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Otherwise it looks like you are listening for stuff like customer.subscription.created so you could trigger that instead for testing
stripe trigger customer.subscription.created
Great, and your Webhook endpoint returned a 403 like before
So now you need to go debug on your end why your endpoint/server did that
to configure authorization on my server
witch mode i need to allow : get or post or put or patch or delete ?
It will be a POST request to your server
they are already post authorization
Have you added a log within your endpoint code to see if that log fires when you trigger an Event?
no
Okay well that's the next step. You need to find out if your endpoint is even being reached, which I doubt it is since you are returning a 403
The issue here is almost definitely at the server configuration level
So before the request actually reaches your endpoint code
It is being rejected by your server
We are going in circles here
The issue is your server
If you aren't familiar with how to configure you server to allowlist certain IP addresses then you need to reach out to your hosting provider
I can't help you with that part
can juste allow api.stripe.com
Not necessarily for Webhooks. I provided the list of IP addresses above
this list : https://docs.stripe.com/ips#adresses-ip
I must add all :
3.18.12.63
3.130.192.231
13.235.14.237
13.235.122.149
18.211.135.69
35.154.171.200
52.15.183.38
54.88.130.119
54.88.130.237
54.187.174.169
54.187.205.235
54.187.216.72
or juste 1
All
okay
i have added all theses IP addresses but it not working
Do you still get a 403?
yeah
Okay then at this point you need to look at your server logs to see what the issue is specifically there.
I'd recommend contacting your hosting provider for help in debugging this.
Please contact your hosting provider and work with them on this.
I can't help you any further here
Your server is returning a 403 response and you need to figure out why
for online webhook need i equivalent of this command "stripe listen --forward-to localhost:8000/stripe/webhook" so a listener
or not not
stripe and my hosting can communicate directly ?
By creating a Webhook endpoint in your Dashboard you already have a "listener"
Please read through: https://docs.stripe.com/webhooks
It seems you really don't understand how Webhooks work
stripe listen --forward-to localhost:8000/stripe/webhook
what do this command on my localhost ?
In order to test your webhook endpoint code without actually having a server endpoint set up
how can i did same on my endpoint
Hi taking over here. This is a long-runing thread
What specifically are you stuck on right now? What's your exact question?
Ah glad you got it
thank you