THIS PACKAGE HAS BEEN DEPRECATED!
With the official release of Stripe CLI, this project is no longer under active development.
A library to receive Stripe Webhooks locally with Node. Uses real events from your Stripe account by polling for them at a defined interval and passing the data to your local server.
Stripe Local will only receive events that occur while it is running. Because of this, you will never receive old events.
NOTE: This package is meant for a local development environment. For live environments with a publicly accessible URL, you should use Stripe webhooks themselves.
# to use the CLI$ npm install -g stripe-local# or the API$ npm install --save-dev stripe-local# or Dockerdocker run jsonmaur/stripe-local
# start listening for events$ stripe-local --key $STRIPE_KEY --url http://localhost:7000/stripe# get a list of options$ stripe-local help
/* make sure you only run in dev environment */if processenvNODE_ENV === 'development'secretKey: processenvSTRIPE_KEYwebhookUrl: ''
If you want a quick and easy way to get started, use Docker. This image is located at jsonmaur/stripe-local on Docker Hub. The two required environment variables are
docker run -e "STRIPE_KEY=..." -e "WEBHOOK_URL=..." jsonmaur/stripe-local
secretKeyYour Stripe test secret key. You should set this in an environment variable to avoid committing to version control.
webhookUrlThe local URL to send Stripe webhooks as events are received. This endpoint should be setup in your application to handle Stripe webhooks.
intervalThe amount of time (in milliseconds) to wait between polling for new events.
overlapThe amount of time (in milliseconds) to overlap with the last request. Because multiple stripe events can happen per second if there is no overlap some events may be missed.
Type: number Default:
quietWhether to hide all logged messages.
- Store requests so we can monitor their statuses
- Retry failed requests
- Log request responses