41
loading...
This website collects cookies to deliver better user experience
git clone https://github.com/hookdeck/nodejs-webhook-server-example.git
cd nodejs-webhook-server-example
npm install
npm start
1337
./stripe-webhooks-endpoint
and can be found in the routes.js
file as shown below:router.post("/stripe-webhooks-endpoint", bodyParser.raw({type: 'application/json'}), function(req, res) {
console.log(req.body);
res.send("Stripe Successfully received Webhook request");
});
hookdeck listen 1337
Enter
key after each answer.+ Add endpoint
****button at the top right-hand side of the screen. This action will pop up a dialog similar to the one below:Endpoint URL
field. Next, click the Events to send
dropdown and select the account.updated
event which will be triggered each time your Stripe account is updated. Click the Add endpoint
button to complete this process.account.updated
event. After the webhook has been successfully added, you will see a screen like the one below:Send test webhook
button. This will pop open a dialog for you to select the event for which you want to send the test. See dialog below:account.updated
event and click the Send test webhook
button. This will trigger a webhook request to your webhook URL, which will be received at the endpoint you specified when creating the URL (i.e. /stripe-webhooks-endpoint
). hookdeck listen 1337
command. You will see the webhook request printed to the terminal as shown below: