A Django-based template for building apps using Plaid

I am not endorsed in any way by Plaid to share this info, just helping others get a head start on using Plaid with Django.

Plaid is a plaform-as-a-service API which you can use to build your own financial apps. It has features such as easily linking to existing bank accounts, and also auto-categorization of transactions. Plaid’s API brings all the data from different financial sources into one place and one format so you can build apps with a holistic view of a user’s finances.

Ok. Now all praise of Plaid aside, I’m sure you are here because you want to build a Django app that uses Plaid to obtain users’ financial data. In all of Plaid’s tutorials shown in their quickstart github page, they have a tutorial for Python, but it’s using Flask for the backend rather than Django.

I’ve taken the time to translate their tutorial from Flask to Django. The main difference was Django’s requirement of having CSRF protection.

Plaid Django Example Repo

Here is a link to my repo in case you want to clone or fork it and play around with Plaid: https://github.com/ribab/plaid_django_example

Use this template as a starting point to build amazing fintech apps using Plaid.

To try out the repo, follow these steps:

  1. Clone the repo

    1
    git clone https://github.com/ribab/plaid_django_example.git
  2. Navigate to the repo

    1
    cd plaid_django_example
  3. Start venv for python3

    1
    2
    python3 -m venv env
    source env/bin/activate
  4. Install required python packages into venv

    1
    pip3 instal -r requirements.txt
  5. Set up environment variables as shown on the sandbox page after logging into Plaid: https://dashboard.plaid.com/overview/sandbox

    1
    2
    3
    4
    export PLAID_CLIENT_ID=???
    export PLAID_SECRET=???
    export PLAID_PUBLIC_KEY=???
    export PLAID_ENV=???
  6. Run the web server

    1
    ./manage.py runserver
  7. Now you should be able to access the webpage at http://localhost:8000

  8. Click on “Open Link”, and then click on “Bank Of America”. When it asks you for username and password, give it “user_good” and “pass_good”, which are the sandbox credentials.

  9. After this, “Get Accounts”, “Get Item”, and “Get Transactions” should all work.

Get new posts by email:

Comments

Hint: To type code with Disqus, use
<code><pre>insert.code.here()<pre/><code/>
2020-05-20