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

Setting up Stripe Checkout with Django

Setting up Stripe Checkout with Django

Want to learn how to build this?

Check out the tutorial.

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 and test publishable keys to the settings.py file:

    STRIPE_PUBLISHABLE_KEY = '<your test publishable key here>'
    STRIPE_SECRET_KEY = '<your test secret key here>'
    
  6. In case you're planning to confirm payments using webhooks you also need to add the webhook endpoint secret to the settings.py file:

    STRIPE_ENDPOINT_SECRET = '<your endpoint secret here>'
    
  7. Run the server:

    (venv)$ python manage.py runserver