stripe-webhook-mailer
stripe-webhook-mailer copied to clipboard
Webhook-Mailer: A simple example of using Stripe webhooks
This example was built on heroku, but should be easily deployable in any environment that can support Ruby and rack.
The app sends an email anytime an invoice.payment_succeeded Stripe event webhook is received.
To deploy on heroku:
-
Create a new heroku app heroku create <APP_NAME>
-
Add the mailgun add-on heroku addons:add mailgun:starter
-
Add your stripe api key to your heroku config environment https://manage.stripe.com/#account/apikeys heroku config:add STRIPE_SECRET_KEY=<YOUR_KEY>
-
Add your webhook url to your stripe dashboard https://manage.stripe.com/#account/webhooks
-
Customize your email body
-
Deploy your app to heroku!