#florian-webhook
1 messages ยท Page 1 of 1 (latest)
@slender shore well in production you don't need stripe-cli. stripe-cli is just to allow you to forward an event to your server when it doesn't have a public URL yet. In production you'd deploy your server/docker container/etc to a real server with a public URL and that's the URL you use when creating the endpoint on Stripe's side.
Thnaks ! I already know that but how handle the payment validation locally in devlopment environment ? With the "stripe-cli" ? I ask for that because before, I validated paiment directly without webhook, so I didn't have to manage asynchronous side at all ^^'
you need webhooks yes because for example the customer might close their browser immediately after paying and therefore none of your client side code might execute
not sure I follow the question, you validate the payment the way we describe in the docs, by listening to webhooks; if you're doing it locally then you can use stripe-cli to forward webhooks to a local server
So, even I am in local environment, I have to use the webhooks system or is their a way to bypass that and validate directly stripe payment without webhook, for example, by by-pass this workflow and validate directly payment ?
I ask for that because I think that webhook is production-oriented, and it is unconfortable to manage that for developers ๐
what do you mean by 'validate' specifically?
and sure, webhooks can be hard to manage locally for developers; that's one of the main reasons why we created stripe-cli though.
Yeah, this is the more efficient way, to handle the webhook callbacks to listen to validate payment in the worflow....thanks, I will continue in that way, by using the stripe-cli docker image locally ๐
An other question: is it possible to trigger manually an event into stripe dashboard, for example the latest same event (like "payment_intent.succeed") ๐ ?
the easiest way would be to call stripe trigger locally https://stripe.com/docs/cli/trigger
to be clear you don't need to run it only in a Docker container , you could install on your local machine and run it from your terminal/command line to trigger such events
Haa okay thanks.
On my preprod server, I have a "htaccess" so I required a login / password auth, is their something which allow us to do a credentials addition into header ? I could also handle this through my virtual host, by adding a bypass, but I think it is better to add an encrypted connection ๐
you can add the username/password to the URL and we respect that
i.e. the kind of format at https://serverfault.com/a/371918