Use Plaid Auth

Alt text

📘

Plaid documentation

Check out the Plaid official guide for more details on how to use Checkbook with Plaid.

Overview

The sections below describe how you can use Plaid with Checkbook to add a bank account.

Get a Plaid access_token

The Plaid Link module returns a public_token and an accounts array, which is a property on the metadata object, via the onSuccess callback. Exchange this public_token for a Plaid access_token using the /item/public_token/exchange Plaid API endpoint.

The accounts array will contain information about bank accounts associated with the credentials entered by the user, and may contain multiple accounts if the user has more than one bank account at the institution. If you would like the user to specify only a single account to link so you know which account to use with Checkbook, set Select Account to "enabled for one account" in the Plaid Developer Dashboard. When this setting is selected, the accounts array will always contain exactly one account.

Create a Checkbook processor_token

Once you have identified the account you will use, send the access_token and account_id property of the account to Plaid via the /processor/token/create Plaid API endpoint in order to create a Checkbook processor_token.

You can create Checkbook processor_tokens in all three API environments:

Example

# Exchange token
curl -X POST https://sandbox.plaid.com/item/public_token/exchange \
  -H 'Content-Type: application/json' \
  -d '{
    "client_id": "[Plaid Client ID]",
    "secret": "[Plaid secret]",
    "public_token": "[Public token]"
  }'
# Create a processor token for a specific account id.
curl -X POST https://sandbox.plaid.com/processor/token/create \
  -H 'Content-Type: application/json' \
  -d '{
    "client_id": "PLAID_CLIENT_ID",
    "secret": "PLAID_SECRET",
    "access_token": "ACCESS_TOKEN",
    "account_id": "ACCOUNT_ID",
    "processor": "checkbook"
  }'

Add a bank account

Retrieve the bank account(s) associated with the Plaid token. Once you have the Checkbook processor_token, you can use it to securely retrieve account and routing numbers from Plaid. Just call the POST /v3/bank/iav/plaid endpoint with the processor_token.

Note: After retrieving the bank accounts list, you may add one of the bank accounts to Checkbook by following the instructions from the Instant Account Verification page.