node-red-contrib-stripe-webhookauth

0.1.0 • Public • Published

node-red-contrib-stripe-webhookauth

Node-RED node for Stripe webhook authentication.

NPM

Install

Run the following command in the root directory of your Node-RED install

npm install node-red-contrib-stripe-webhookauth

Acknowledgements

The node-red-contrib-stripe-webhookauth uses the following open source software:

  • Stripe: Stripe API Library for webhook.
  • raw-body: Get and validate the raw body of a readable stream.

License

See license (Apache License Version 2.0).

Usage

  1. Add the "stripe webhook auth" Node to the Node-RED flow.
  2. Double click on the node and enter the webhook url, secret key, endpoint secret.
  3. Add the "http response" Node to the Node-RED flow.
  4. Add required processing between "stripe webhook auth" and "http response".
  5. Deploy flow.
  6. Before testing the flow, you need to set "httpAdminRoot" in settings.js to false, otherwise you will not be able to use the Node-RED editor.
    // By default, the Node-RED UI is available at http://localhost:1880/
    // The following property can be used to specifiy a different root path.
    // If set to false, this is disabled.
    httpAdminRoot: false,
  1. Send test webhook from Stripe API menu, if the response code is 200 then the test was successful.
  2. If the webhook succeeds, the msg.payload should be stored in the event data.
  3. If an error occurs, a 400 status code will be returned.
  4. When you want to end the test and return to the Node-RED editor, comment out "httpAdminRoot" in "settings.js".
    // By default, the Node-RED UI is available at http://localhost:1880/
    // The following property can be used to specifiy a different root path.
    // If set to false, this is disabled.
//    httpAdminRoot: false,

Warning

When using this custom node in operation/testing, you need to set "httpAdminRoot" in settings.js to false.

Package Sidebar

Install

npm i node-red-contrib-stripe-webhookauth

Weekly Downloads

0

Version

0.1.0

License

Apache-2.0

Last publish

Collaborators

  • susumukwsk