Skip to content
This repository was archived by the owner on Jan 23, 2021. It is now read-only.

Support to verify Webhook signatures #5

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,9 @@ npm install
npm start
```

Take note of the public URL provided by ngrok: it should be listed when the monitor starts.
A [Stripe webhook endpoint](https://stripe.com/docs/webhooks/setup) will be automatically provisioned and pointed at your ngrok tunnel, subscribed to all Stripe events.

**Don't want to use ngrok?** As long as Stripe can reach the webhooks endpoint via a public URL, you'll receive updates.

### Subscribe to webhook notifications

In your Stripe Dashboard, go to the _API_ section, then click on the _Webhooks_ tab.

You should add a receiving endpoint by clicking _Add Endpoint_. Fill in the public URL provided by ngrok, or any other public URL that can reach the webhook monitor.

![](https://raw.githubusercontent.com/stripe/stripe-webhook-monitor/master/screenshots/setting-up-webhooks.png)
**Don't want to use ngrok?** As long as Stripe can reach the webhooks endpoint via a public URL, you'll receive updates. Set the `webhookSigningSecret` configuration to ensure your events are signed correctly.

## Troubleshooting

Expand Down
5 changes: 4 additions & 1 deletion config.sample.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ module.exports = {
port: 4000,
stripe: {
// Include your Stripe secret key here
secretKey: 'YOUR_STRIPE_SECRET_KEY'
secretKey: 'YOUR_STRIPE_SECRET_KEY',
// If not using ngrok, include your Webhook signing secret here
// i.e., whsec_somerandomcharacters
webhookSigningSecret: null
},
/*
Stripe needs a public URL for our server that it can ping with new events.
Expand Down
98 changes: 44 additions & 54 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"body-parser": "^1.17.2",
"boxen": "^1.2.1",
"express": "^4.15.3",
"ngrok": "^3.1.1",
"ngrok": "^3.2.4",
"socket.io": "^2.2.0",
"stripe": "^4.23.1"
"stripe": "^7.5.0"
}
}
Binary file removed screenshots/setting-up-webhooks.png
Binary file not shown.
Loading