{ "info": { "author": "Ho\u00ebl Iris", "author_email": "hoel.iris@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3" ], "description": "## stripe-hooks\n\nThis is a Python web application to receive [webhooks](https://stripe.com/docs/webhooks)\nfrom Stripe and send emails accordingly.\n\nThis is a fork of [Jack Pearkes](https://github.com/pearkes/stripe-hooks/) original work:\n[stripe-hooks](https://github.com/pearkes/stripe-hooks).\n\nThere are two types of emails:\n\n- [Notifications](https://github.com/pearkes/stripe-hooks-emails/tree/master/notifications), sent to administrators\n- [Receipts](https://github.com/pearkes/stripe-hooks-emails/tree/master/receipts), sent to customers\n\nUse cases:\n\n- Sending notifications about important Stripe events, such as failed\ncharges or new customers, to administrators\n- Sending receipts to user after they have been charged\n\nIt supports **all** Stripe [events](https://stripe.com/docs/api#event_types).\n\nThe email content included by default is versatile English. Any\nof it can be modified to fit your business or use case. It's easy to\ndeploy and you shouldn't need to touch Python to configure it.\n\n### Installation\n\n```sh\n $ python3 setup.py install\n```\n\n### Configuration\n\nAll of the configuration is done in JSON.\n\nCreate a `.json` file following [`configuration_template.json`](configuration_template.json) and drop it in the command line:\n\n```sh\n $ stripe-hooks configuration.json \n```\n\nMore details below:\n\n#### Emails type\n\nAll receipts and notifications are **off by default** with a blank `configuration.json`.\n\nTo activate a notification or receipt, simply create a new key, named by the\nevent type (the list can be found [here](https://stripe.com/docs/api#event_types))\nand formatted like this:\n\n```json\n{\n ...\n \"email\": {\n \"charge.failed\": {\n \"active\": true,\n \"subject\": \"Oh nos! A Charge Has Failed!\"\n }\n }\n ...\n}\n```\n\n`subject` is optional. By default, the email subject will be the type,\nperiods replacing spaces and titlecased, prefixed with your\nbusiness name (if it exists) like so: `charge.failed -> [Acme Inc.] Charge Failed`.\n\nEverything falls back to safe, generic defaults, like not showing a business name\nif it doesn't exist.\n\nEmails type configuration could look something like this:\n\n```json\n{\n ...\n \"email\": {\n \"business\": {\n \"name\": \"Acme, Inc.\",\n \"signoff\": \"The Acme Team\",\n \"email\": \"Acme Support Team \"\n },\n \"notifications\": {\n \"balance.available\": {\n \"active\": true,\n \"subject\": \"Dat chedda is available...\"\n },\n \"charge.succeeded\": {\n \"active\": true\n },\n \"charge.failed\": {\n \"active\": true\n },\n \"charge.refunded\": {\n \"active\": true\n }\n },\n \"receipts\": {\n \"invoice.created\": {\n \"active\": true,\n \"subject\": \"New Invoice\"\n }\n }\n }\n ...\n}\n```\n\n#### Emails Content\n\nYou need to provide a path to your emails templates:\n\n```json\n{\n ...\n \"email\": {\n \"templates_path\": \"stripe-hooks-emails\",\n ...\n }\n ...\n}\n```\n\n\nYou can fork [that repository](https://github.com/pearkes/stripe-hooks-emails) and you will have a good start.\n\n#### stripe\n\nYou need to configure a stripe webhook in stripe GUI [stripe webhooks](https://dashboard.stripe.com/account/webhooks).\n\nThe service default port is `5000` and route url is `/webhook`.\n\nWhen you have your endpoint secret just drop it in the configuration file:\n\n```json\n{\n ...\n \"stripe\": {\n \"endpoint_secret\": \"whsec_...\"\n },\n ...\n}\n```\n\nThe endpoint secret will be use to authenticate stripe `POST` requests following [stripe documentation](https://stripe.com/docs/webhooks/signatures).\n\n#### Email Provider\n\nSMTP is use as the default interface with your email provider.\n\nAdd this in your configuration file:\n\n```json\n{\n ...\n \"smtp\": {\n \"url\": \"localhost:25\"\n },\n ...\n}\n```\n\nMailgun is a good provider. Stripe team use it in there own documentation.\n\n[Jack Pearkes](https://github.com/pearkes/stripe-hooks/) original work uses [Amazon SES](http://aws.amazon.com/ses/).\n\nRevert commit `refactor(mail): use a smtp server instead of aws ses` if you want to use Amazon SES.\n\n\n### Test\n\nWIP\n\n### Contributing\n\nJust drop a PR following [git karma](http://karma-runner.github.io/2.0/dev/git-commit-msg.html) style.\n\nWhen unit tests will be up-to-date, they will need to pass.\n\nProject isn't compliant with [Flake8](http://flake8.pycqa.org/en/latest/) lint for now, so it's not mandatory, but it could be cool.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tolteck/stripe-hooks", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "stripe-hooks", "package_url": "https://pypi.org/project/stripe-hooks/", "platform": "", "project_url": "https://pypi.org/project/stripe-hooks/", "project_urls": { "Homepage": "https://github.com/tolteck/stripe-hooks" }, "release_url": "https://pypi.org/project/stripe-hooks/0.1/", "requires_dist": [ "Flask (>=1.0.2)", "stripe (>=2.4.0)" ], "requires_python": "", "summary": "A low-configuration service for sending notifications andreceipts based on Stripe webhooks.", "version": "0.1" }, "last_serial": 4156099, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "052b6bac7a5bebbd66b27d3a7e3cbc2d", "sha256": "b25404a3fce26c2ba3f6e08a95de825718529cc5ca48f1068cc132a26af97293" }, "downloads": -1, "filename": "stripe_hooks-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "052b6bac7a5bebbd66b27d3a7e3cbc2d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8729, "upload_time": "2018-08-10T09:43:39", "url": "https://files.pythonhosted.org/packages/b1/b5/4eac25c3a1382c0cb646e7fabfad06499f3fa0b12d5f0ef9540ee337288c/stripe_hooks-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "037860c77307522042498fed0a565414", "sha256": "f6a2d1b99f6c460d478bfa2e043ca5a9b8c4058f446135ea514878fe454bfafe" }, "downloads": -1, "filename": "stripe-hooks-0.1.tar.gz", "has_sig": false, "md5_digest": "037860c77307522042498fed0a565414", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7360, "upload_time": "2018-08-10T09:43:40", "url": "https://files.pythonhosted.org/packages/51/f7/b579b7ed15a5c23cb0ce847de3af74ccc551e92d015c95177b3feca0c6b1/stripe-hooks-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "052b6bac7a5bebbd66b27d3a7e3cbc2d", "sha256": "b25404a3fce26c2ba3f6e08a95de825718529cc5ca48f1068cc132a26af97293" }, "downloads": -1, "filename": "stripe_hooks-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "052b6bac7a5bebbd66b27d3a7e3cbc2d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8729, "upload_time": "2018-08-10T09:43:39", "url": "https://files.pythonhosted.org/packages/b1/b5/4eac25c3a1382c0cb646e7fabfad06499f3fa0b12d5f0ef9540ee337288c/stripe_hooks-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "037860c77307522042498fed0a565414", "sha256": "f6a2d1b99f6c460d478bfa2e043ca5a9b8c4058f446135ea514878fe454bfafe" }, "downloads": -1, "filename": "stripe-hooks-0.1.tar.gz", "has_sig": false, "md5_digest": "037860c77307522042498fed0a565414", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7360, "upload_time": "2018-08-10T09:43:40", "url": "https://files.pythonhosted.org/packages/51/f7/b579b7ed15a5c23cb0ce847de3af74ccc551e92d015c95177b3feca0c6b1/stripe-hooks-0.1.tar.gz" } ] }