Example EJS app on how to integrate with Stripe API.
Before running the app, you will have to add some products to your Stripe account if you haven't already. When the app starts, it will load the products that are on your Stripe account.
npm install
to install dependencies.- Create
.env
file and addSTRIPE_API_KEY
andSTRIPE_WEBHOOK_ENDPOINT_KEY
(you can find the webhook endpoint key in the code at the URL https://dashboard.stripe.com/test/webhooks/create?endpoint_location=local). - Install the Stripe CLI and run
stripe listen --forward-to localhost:8000/webhook
. npm run start
.- App is now running at
localhost:8000
.