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

DjangoDev picture DjangoDev · Mar 12, 2013 · Viewed 21k times · Source

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.

Answer

Vinay Sahni picture Vinay Sahni · Jul 16, 2013

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