Free Django eCommerce  -  Use Stripe Products

Mini eCommerce for Django with products download from Stripe - Open-source project (MIT License).

Django & Stripe Mini eCommerce - Pull data from Stripe
Django & Stripe Mini eCommerce - Pull data from Stripe 

Hello! This article presents an open-source Django & Stripe Mini eCommerce starter that builds product pages using the information saved in Stripe Dashboard. Once the Stripe Secrets are provided in the .env file, the superusers are able to pull the products from Stripe and edit the information via a simple UI. The sources, released under the MIT License, can be used in commercial projects and eLearning activities. Thanks for reading!  

Django & Stripe - Pull data from Stripe

How it works

The sources come with a default product, saved in the local filesystem. If the user initiates the purchase, the application warns that the Stripe Secrets are not provided and the flow cannot continue. The steps, as explained in the video, are the following:

👉 Step #1 - Clone the source code from the public repository
$ git clone https://github.com/app-generator/ecommerce-django-stripe.git
$ cd ecommerce-django-stripe
👉 Step #2 - Follow up the usual set up for a Django Project
$ python -m venv env
$ source env/bin/activate
$ pip install -r requirements.txt
👉 Step #3 - Migrate the database & Create a Superuser
$ python manage.py migrate          # migrate DB
$ python manage.py createsuperuser  # create the app King
👉 Step #4 - Create .env file in the root of the project
DEBUG=True
SECRET_KEY=WhateEver_KEY
STRIPE_SECRET_KEY=<FROM_STRIPE>
STRIPE_PUBLISHABLE_KEY=<FROM_STRIPE>

# Server Address (used by Stripe callback)
# Should be the URL used to start the APP
DOMAIN_URL=http://localhost:8000/

The most important settings are the Stripe Secrets that will authorize the payment flow using Stripe as the payment provider. The values can be found on your Stripe Dashboard and the newcomers should use the "TEST" mode during the tests.

Once the env file is edited and saved, we can safely start the project and import the data from Stripe using a simple UI.

👉 Stripe Dashboard - Three products
Django eCommerce - Stripe Dashboard (free product)
Django eCommerce - Stripe Dashboard (free product)

Before import, the app warns the users to authenticate and add more products using a superuser account.  

Django & Stripe - Products Warning
Django & Stripe - Products Warning

In the page, reserved for superusers, if the configuration is correct, the information from Stripe becomes available and editable.

Django eCommerce - Information pulled from Stripe
Django eCommerce - Information pulled from Stripe 

For each product, all product fields are editable using a minimal UI: price, name, description, and IMAGES. A live payment flow should look like this:

Django & Stripe eCommerce - Payment Flow
Django & Stripe eCommerce - Payment Flow

The sample used in the video demonstration can be found on GitHub with all the products already downloaded:

GitHub - app-generator/mini-ecomm: Django Mini eCommerce - Products DW from Stripe
Django Mini eCommerce - Products DW from Stripe . Contribute to app-generator/mini-ecomm development by creating an account on GitHub.
Django Stripe - Free Sample

Thanks for reading! For more tools and support feel free to access: