Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Firemaps's avatar

Testing Stripe Webhooks with Ngrok and Homestead

How can I configure ngrok to tunnel myapp.dev on homestead to generate Stripe webhook responses?

I think I am on the right direction

$ ngrok http -host-header=rewrite 192.168.10.10:80

but when I click on one of the links on http://localhost:4040/inspect/http

or when I send a webhook request I get a response similar to not running vagrant provision:

Fatal error: Uncaught Error: Class 'Illuminate\Foundation\Application' not found in /home/vagrant/Code/app/bootstrap/app.php on line 14 Error: Class 'Illuminate\Foundation\Application' not found in /home/vagrant/Code/app/bootstrap/app.php on line 14

0 likes
2 replies
skefelle's avatar

Try just running:

$ ./ngrok http 8000

Use the https Forwarding address for your testing purposes.

igaster's avatar

If you have multiple local domains in your machine then ngrok will pick the "default" This is how I am testing stripe webhooks localy:

a) run ngrok http 80 -host-header=mylocaldomain.test b) configure stripe webhook to the tunnelled domain, ie: http://xxxxx.ngrok.io/path-to-webhook-route

Please or to participate in this conversation.