Plaid Assignment
Plaid Assignment
Plaid Assignment
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
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:
Please follow the best practices and make sure large asynchronous tasks are moved to celery.