#florian-webhook

1 messages ยท Page 1 of 1 (latest)

keen jewel
#

@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.

slender shore
#

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 ^^'

keen jewel
#

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

slender shore
#

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 ๐Ÿ™‚

keen jewel
#

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.

slender shore
#

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 ๐Ÿ™‚

slender shore
#

An other question: is it possible to trigger manually an event into stripe dashboard, for example the latest same event (like "payment_intent.succeed") ๐Ÿ™‚ ?

keen jewel
#

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

slender shore
#

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 ๐Ÿ™‚

keen jewel
#

you can add the username/password to the URL and we respect that