Link a Bank Account and Fetch Transactions
This recipe was an interactive walkthrough in the previous portal. Each step below names the API call it makes; open it in the API Reference to try it.
Overview
Linking a Bank Account and Fetching Transactions
This workflow demonstrates how to use the Plaid API to connect a customer’s bank account and retrieve recent transactions.
Steps Covered
1. Initialize Plaid Link
Create a link_token to allow the customer to connect their financial institution.
2. Exchange public_token for access_token
Use the temporary public_token from Link to generate a permanent access_token.
3. Retrieve Account Metadata
Fetch details about the accounts linked by the customer.
4. Fetch Recent Transactions
Retrieve transaction history (e.g., last 30 days) for the connected account.
Step 1: Initialize Plaid Link
Create a link_token to start the Plaid Link flow.
API call: linkTokenCreate
Step 2: Exchange public_token for access_token
Exchange the public_token received from Plaid Link for a permanent access_token.
API call: itemPublicTokenExchange
Step 3: Retrieve Account Metadata
Fetch basic account information for the linked Item.
API call: accountsGet
Step 4: Fetch Recent Transactions
Retrieve transactions for the past 30 days.
API call: transactionsGet

