Plaid Assignment

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Plaid is an account aggregation service where users can login with their bank credentials and

plaid fetches last two years of transaction and account balance data for their bank account.

● Item, a set of credentials (map of key value pairs) associated with a financial institution
and a user.
○ Users can have multiple Items for multiple financial institutions.
● Each Item can have many associated accounts, which hold information such as balance,
name, and account type

● Credit and depository accounts can have Transactions associated with them

PLAID Link
Plaid Link is a quick and secure way to integrate with the Plaid API. Link is a drop-in module that
handles credential validation, multi-factor authentication, and error handling for each institution
that we support—all while keeping credentials from ever hitting your server.
● Each user authentication via Link creates an Item, post which Link passes a public_token
that you exchange for an access_token from your backend app server.
● access_token and item_id uniquely identify the Item and can be used along with client_id
and secret to access products available for an Item.

● Keys:
○ Public_key: a non-sensitive, public identifier that is used to initialize Plaid Link
○ secret client_id: private identifiers that are required for accessing any financial
data

Steps Integrating With Plaid


1. Get the client id, public key and sandbox/development secret.
2. Choose the appropriate endpoint:
a. https://sandbox.plaid.com (Sandbox)
b. https://development.plaid.com (Development)
c. https://production.plaid.com (Production)
3. Plaid offers following products :
a. Auth : POST /auth/get
i. Set up ACH transfers from banks / credit unions in US
ii. Linking via banking credentials allows immediate ACH setup
iii. Linking via microdeposits take 1-2 days (uses same day ACH for deposits)
b. Transactions : POST /transactions/get
i.
c. Identity : POST /identity/get
i. Verify user’s identity against bank details
ii. Collect names, phonno, addresses and emails for each account
d. Income : POST /income/get
e. Balance : POST /accounts/balance/get
i. Return funds in account realtime
ii. Reduce overdraft fees and enable account pre
f. Assets : POST /assets/get
i. Consolidated assets reports with account balances, historical transactions
and account holder identity information.
ii. 24 months of cleaned transaction data with categories, locations and
merchant names.

Best Practices :
1. Store access_token, item_id tuples in db :
a. Securely persist in the db
b. Never exposed on the client side
2. Log API request identifiers
a. Unique request_id in all server side responses and Link callbacks
b. Link_session_id also return for Link callbacks
c. Store to identify requests/link sessions and associate the same with other events
in the app
3. Retrieve transaction or account ids
a. Unique transaction and account ids assigned for transactions and account for
each access_token
b. Used for troubleshooting - 2 diff access_tokens will result in diff ids for diff
accounts
4. Lookout for any two processes trying to update the same row (ex : one via a fetch call and
other via webhooks)

Assignment:
Create a project in django rest framework and celery with following APIs exposed:

1) User signup, login , logout APIs


2) Token exchange API : An authenticated user can submit a plaid public token that he gets
post link integration.
a) This public token is exchanged for access token on the backend.
b) This initiates an async job on the backend for fetching account and item metadata
for the access token.
3) Expose a webhook for handling plaid transaction updates and fetch the transactions on
receival of a webhook.
4) Expose an api endpoint for fetching all transaction and account data each for a user.
5) Do appropriate plaid error handling

Please follow the best practices and make sure large asynchronous tasks are moved to celery.

You might also like