6. Linking an external account to a card

This article gives an overview of the process that links a card account to an external account. The detailed procedures for configuring the Plaid SDK and executing the steps are described in the Cards documentation.

A verified customer can connect an external bank account to a card account, and transfer funds between them. Customers can only make ACHACH - Automated Clearing House. The network that coordinates electronic payments and automated money transfers. transfers between cards and verified bank accounts. Bond uses Plaid Link to authenticate customers' bank account information. Plaid's Javascript-based Link web SDK, installed on the frontend, communicates with Bond to execute API requests.

Note: To make a purchase with a card, your customer can transfer funds to the card from another card. This means that they can fund a card without having an external account linked to the card used for a purchase.

When you link a customer's card account to an external account, you generate an ID and an access token that represent the connection. Using these objects in requests to Plaid allows you to securely access a bank account without needing to pass customers' bank login details in requests.

The process to link a card with a bank account consists of 4 main stages:

  1. The customer activates a request to link a bank account. Bond passes a temporary link_token from Plaid to the customer's app.
  2. The link_token allows the customer to start Plaid Link to log in to the bank and choose the account they want to link to.
  3. On successful execution of Plaid Link, a new temporary token, public_token, is returned.
  4. Bond sends the temporary public_token to Plaid and requests a permanent access_token.

These four stages are executed by objects in the Plaid SDK in the frontend communicating with the Bond API, which sends requests to the Plaid API. This process is shown below.

  1. The customer makes a request to link their card to a bank account.
    1. The Plaid SDK in the frontend passes the customer's Bond card_account_id in a GET request to /accounts/:account_id/external_accounts/plaid.
    2. The response returns the link_token and Bond's linked_account_id:
      • The linked_account_id UUID is Bond's representation of the customer's external bank account ID.
      • Bond obtains the link_token from Plaid's /link/token/create API.
      • Bond passes the link_token to the Plaid SDK.
  2. In the Plaid SDK, Plaid.create Link object starts Plaid Link for the customer.
    Plaid Link is a module that handles the authentication process for the bank account.
    1. The customer selects their banking institution on Plaid Link.
    2. The customer submits login credentials for the bank to Plaid Link.
    3. The customer selects a bank account within Plaid Link.
  3. Plaid Link creates a link between the customer and the bank. It returns a temporary public_token via the onSuccess callback.
  4. The Plaid SDK passes the public_token to your server.
  5. A GET request to accounts/{account_id}/external_accounts/plaid exchanges the temporary public_token for a permanent access_token. Bond stores this token which is associated with the account ID.

The access_token uniquely represents the customer's login for their bank; it is a required argument for most Plaid API endpoints.

Listing external accounts

A customer can link to more than one bank account. To view a list of all external accounts associated with a customer, use the GET /accounts/{customer_id}/external_accounts operation.

The response returns the linked_account_id, the access_token and the card_id, as well as details about the linked account.

Did this page help you?