duplxey / flask-stripe-subscriptions

Setting up and collecting monthly recurring subscription payments with Flask and Stripe.

Home Page:https://testdriven.io/blog/flask-stripe-subscriptions/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Setting up Stripe Subscriptions with Flask

Want to learn how to build this?

Check out the post.

Want to use this project?

  1. Fork/Clone

  2. Create and activate a virtual environment:

    $ python3 -m venv venv && source venv/bin/activate
  3. Install the requirements:

    (venv)$ pip install -r requirements.txt
  4. Add your Stripe test secret key, test publishable key, endpoint secret and price API ID as environmental variables:

    (venv)$ export STRIPE_PUBLISHABLE_KEY=<YOUR_STRIPE_PUBLISHABLE_KEY>
    (venv)$ export STRIPE_SECRET_KEY=<YOUR_STRIPE_SECRET_KEY>
    (venv)$ export STRIPE_PRICE_ID=<YOUR_PRICE_API_ID>
    (venv)$ export STRIPE_ENDPOINT_SECRET=<YOUR_ENDPOINT_SECRET_KEY>
  5. Run the server:

    (venv)$ FLASK_ENV=development python app.py

    Navigate to http://localhost:5000.

About

Setting up and collecting monthly recurring subscription payments with Flask and Stripe.

https://testdriven.io/blog/flask-stripe-subscriptions/

License:MIT License


Languages

Language:Python 51.5%Language:HTML 37.5%Language:JavaScript 11.1%