tiny-quickstart/nextjs at main · plaid/tiny-quickstart · GitHub
Skip to content

Latest commit

 

History

History

Folders and files

README.md

Tiny Quickstart (Next.js)

Overview

This is a minimial application that uses Next.js for a React frontend and a Node.js backend.

After linking a sample bank account, the app retrieves balance information associated with the account and renders it on the /dash page.

If you're looking for a more fully-featured quickstart, covering more API endpoints, available in more languages, and with explanations of the underlying flows, see the official Plaid Quickstart.

Set up your environment

Install Node.js v16+.

Install pnpm to follow along with these instructions as written.

Install dependencies

Ensure you're in the nextjs/ folder, then install the necessary dependencies:

pnpm install

Equip the app with credentials

Copy the included .env.example to a file called .env.

cp .env.example .env

Fill out the contents of the .env file with the client ID and Sandbox secret in your Plaid dashboard. Don't place quotes (") around the credentials (i.e., PLAID_CLIENT_ID=adn08a280hqdaj0ad). Use the "Sandbox" secret when setting the PLAID_SECRET variable.

Start the server

pnpm dev

The app will run on port 3000 and will hot-reload if you make edits.

Using the app

The app allows you to link a sample bank account. Use the following sample credentials:

  • Username: user_good
  • Password: pass_good

If prompted to provide a multi-factor authentication code, use 1234

Troubleshooting

MISSING_FIELDS error

If you encounter a MISSING_FIELDS error, it's possible you did not properly fill out the .env file. Be sure to add your client ID and Sandbox secret to the corresponding variables in the file.