django-stripe-subscriptions icon indicating copy to clipboard operation
django-stripe-subscriptions copied to clipboard

How to handle subscription payments with Django and Stripe.

Setting up Stripe subscriptions with Django

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. Apply the migrations:

    (venv)$ python manage.py migrate
    
  5. Add your Stripe test secret key, test publishable key, endpoint secret and price API ID to the settings.py file:

    STRIPE_PUBLISHABLE_KEY = '<your test publishable key here>'
    STRIPE_SECRET_KEY = '<your test secret key here>'
    STRIPE_PRICE_ID = '<your price api id here>'
    STRIPE_ENDPOINT_SECRET = '<your endpoint secret here>'
    
  6. Run the server:

    (venv)$ python manage.py runserver