{"id":19542302,"url":"https://github.com/ruffrey/stripe-webhook-server","last_synced_at":"2025-04-26T17:31:10.243Z","repository":{"id":10625034,"uuid":"12847180","full_name":"ruffrey/stripe-webhook-server","owner":"ruffrey","description":"Backend webhook server for Stripe payment gateway, written in Node.js","archived":false,"fork":false,"pushed_at":"2014-09-27T16:38:35.000Z","size":1609,"stargazers_count":15,"open_issues_count":1,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T16:41:48.224Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruffrey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-09-15T15:00:15.000Z","updated_at":"2023-09-19T05:04:29.000Z","dependencies_parsed_at":"2022-09-17T05:23:38.883Z","dependency_job_id":null,"html_url":"https://github.com/ruffrey/stripe-webhook-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruffrey%2Fstripe-webhook-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruffrey%2Fstripe-webhook-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruffrey%2Fstripe-webhook-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruffrey%2Fstripe-webhook-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruffrey","download_url":"https://codeload.github.com/ruffrey/stripe-webhook-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251025700,"owners_count":21524843,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T03:14:05.365Z","updated_at":"2025-04-26T17:31:10.012Z","avatar_url":"https://github.com/ruffrey.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stripe-webhook-server\n\nThis is a standalone scaffold or middleware for responding to [Stripe webhooks](https://stripe.com/docs/webhooks). \n\nBy default it sends emails upon receiving a webhook. You can reprogram it to do whatever. It's mean to be an example of how to implement Stripe webhooks in Node, but you can deploy it as-is for a webhook MVP.\n\nThere is no user interface. [Postman REST Client](https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomcm?hl=en) is a great tool for local webhook development.\n\n## Prerequisites\n\n- You have a [Stripe](https://stripe.com) account.\n- You're running [Node.js](http://nodejs.org) \u003e= 8.x.x\n- You are storing the customer's email address in the Stripe `email` field. Otherwise the emails won't work!\n\n## Usage - Standalone service\n\n\t$  git clone https://github.com/ruffrey/stripe-webhook-server\n\t$  cd stripe-webhook-server\n\t$  npm install\n\n(or, fork it, then clone your own)\n\nEdit `config.example.js` to suit your needs and rename it to `config.js`.\n\n\t$  npm start\n\nto run the server.\n\n\n## Usage - Connect or Express middleware\n\n\t$  npm install stripe-webhook-server\n\nThen bind the middleware to a route. You must pass some configuration options.\n\n\n```javascript\nvar app = require('express')();\nvar webhooks = require('stripe-webhook-server');\nvar config = {\n\n\t// application settings\n\tport: process.env.PORT || 3000,\n\tappProtocol: \"http://\",\n\tappdomain: \"localhost\",\n\thelpUrl: \"http://change.this.com/support\",\n\twebhookEndpointPath: '/',\n\n\t// stripe\n\tstripe: {\n\t\tpublic_key: '',\n\t\tsecret_key: ''\n\t},\n\n\t// email templates\n\temailTemplateDir: 'templates/', // relative to root of the application\n\temailTemplateExt: '.html',\n\t\n\t// email template fields\n\tfromAddress: '',\n\tfromAddressName: '',\n\tsupportAddress: '',\n\tsincerely: '',\n\t\n\t// settings for Nodemailer email module\n\tnodemailer: {\n\t\tservice: \"\",\n\t\tgenerateTextFromHTML: true,\n\t\tauth: {\n\t\t\tuser: \"\",\n\t\t\tpass: \"\"\n\t\t},\n\t\t//validateRecipients: true,\n\t\t//debug: true,\n\t\tmaxConnections: 1\n\t}\n};\n\n// setup the route\napp.post('/my-webhook-endpoint', webhooks.webhookServer(config));\n\n```\n\n## Customization\n\nEmail templates use Handlebars and are at `templates/`.\n\n`lib/webhooks.js` is a list of the webhooks you support.\n\nIf you don't want to respond to a webhook, leave the function empty, or just delete the entry completely.\n\nIf you have custom application logic, you would edit `lib/webhooks.js`. This project is really more of a scaffold than a module, in that respect.\n\n\n## Modules\n\n- [Express 3](http://expressjs.com)\n- [Nodemailer](https://github.com/andris9/Nodemailer) for sending email.\n\t- The `config.nodemailer` options are passed directly to the Nodemailer module.\n- [Handlebars](http://handlebarsjs.com) for email templates\n\n## Shameless plug\n\nCheck out [Paastor](https://paastor.com) for painless Node.js deployments - to your own server. For example, you can have stripe-webhook-server deployed in a few minutes using Paastor.\n\n## Bugs\n\nPlease branch, fix, and submit pull request.\n\n## Legal\n\n(c) 2014 Jeff Parrish\n\nNot affiliated with Stripe.\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruffrey%2Fstripe-webhook-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruffrey%2Fstripe-webhook-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruffrey%2Fstripe-webhook-server/lists"}