Is it possible to set localhost as a Stripe webhook URL?

php, stripe-payments, webhooks

Solution

Stripe now has an official tool, the Stripe CLI that makes this easy (but still requires installing another tool).

See this answer below or the official Stripe CLI docs.

Alternatively, the another way to achieve this is with http://www.ultrahook.com which allows you to receive webhooks on localhost. This alternative will work with all webhooks, not just Stripe's

Problem

I am creating a payment gateway using Stripe. I want to set my localhost url `localhost/stripe/webhook.php` as my webhook url. Is it possible to set a localhost address as a webhook url? This will be used to create a mail service that is triggered on every successful charge in Stripe.

Original source