First, you will need to create a Stripe account: https://dashboard.stripe.com/register
Follow these instructions from Stripe for creating product and plan: https://stripe.com/docs/billing/subscriptions/set-up-subscription#create-product-plan-code Once you create the product and the plan, keep the plan id nearby, you will need it here later.
- Clone the repository and install the dependencies by running
npm install
- Provide your Stripe public and secret keys here and here.
- Provide your plan id here
- Run
npm run dev
- Go to http://localhost:3000/checkout
- Try submitting billing information along with one of the test stripe cards: https://stripe.com/docs/testing
- Check your Stripe Dashboard > Payments. You should have received a payment after submission is complete.