trailpack-stripe
Stripe API Trailpack for Trails
Handles and validates Stripe Webhooks. It checks the time the webhooks were received and keeps the DB in sync.
Optionally, it can perform Round Trip
validation of every Stripe webhook that hits the endpoint.
Stores Stripe event models with lifecyle handler for after a Stripe event occurs.
Makes call via Stripe API using a Stripe Service.
Supports waterline and sequelize.
Install
With yo:
$ yo trails:trailpack trailpack-stripe
With npm:
$ npm install --save trailpack-stripe
Configure
module.exports = {
packs: [
require('trailpack-stripe')
]
}
module.exports = {
public: process.env.STRIPE_PUBLIC || '<test_public_key>',
secret: process.env.STRIPE_SECRET || '<test_secret_key>',
validate: process.env.STRIPE_VALIDATE || false
}
Then on Stripe
In Account settings Webhooks
Point webhook to <yourdomain>/stripe/webhook
Enable whatever webhooks you desire