Search code examples
stripe-paymentswebhookslaravel-valet

Using Stripe Webhooks with Laravel Valet


Scenario

I'm trying to use stripe to set up payments on my application, but when i try to setup webhooks it throws an error because its trying to send to a site that technically doesn't exist (because it exists locally).

obviously internally i can provide the domain name but from an external source "mysite.test" doesnt exist.

Is there a way to get the IP address / port for my specific laravel valet site? I tried pinging "mysite.test" and it returned 127.0.0.1 but my guess is that is the valet server not the specific website because im tyring to link to stripe.

The error in question: "Test webhook error: Domain unknown"


Solution

  • Your server runs locally so it does not exist externally. To remediate this you have to use a tool that lets the rest of the world connect to your local server. I would recommend ngrok for this.