@trupen Well what’s the URL you’re trying to use? As the error is telling you it’s not publicly accessible, so sounds like you’re trying to use localhost or something.
Troubleshooting Stripe Webhook Setup in Laravel 10: Invalid URL Exception
When running php artisan cashier:webhook in Laravel 10 on my Ubuntu 22.04.3 LTS local environment, I encounter the Stripe\Exception\InvalidRequestException with the message "Invalid URL: URL must be publicly accessible." How can I resolve this issue and successfully set up my Stripe webhook locally for testing?
I am following: laravel.com/docs/10.x/billing#handling-stripe-webhooks
@Trupen So the answer is literally there.
Consider using a tool like Stripe CLI to test webhooks locally: github.com/stripe/stripe-cli
stripe-cli listens for and then forwards webhooks from stripe to your private network. Stripe cannot call your webhook endpoint if it is on a private network.
You can use a tool like Ngrok or Expose to create a tunnel to your local machine, but the CLI tool is easier to use and shows you additional diagnostic information.
Please or to participate in this conversation.