Managing external accounts

How to list and delete linked external accounts.

📘

Note

To link external accounts, you need to use the v0 APIs.

Listing linked accounts

To list all external accounts associated with a customer, use the GET /v0/accounts/{customer_id}/external_accounts operation and provide the body parameter as shown in the table below.

ParameterTypeDescription
list_full_accountstringReturns the account and routing numbers for the external account. Options are:
  • true—returns account and routing number.
  • false—does not return account and routing number.

An example of a request to retrieve linked accounts is shown below.

curl --request GET \
     --url 'https://sandbox.bond.tech/api/v0/accounts/931e2341-c3eb-4681-97d4-f6e09d90da14/external_accounts?list_full_account=true' \
     --header 'Authorization: YOUR-AUTHORIZATION' \
     --header 'Identity: YOUR-IDENTITY'
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://sandbox.bond.tech/api/v0/accounts/931e2341-c3eb-4681-97d4-f6e09d90da14/external_accounts?list_full_account=true")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Identity"] = 'YOUR-IDENTITY'
request["Authorization"] = 'YOUR-AUTHORIZATION'

response = http.request(request)
puts response.read_body
const options = {
  method: 'GET',
  headers: {Identity: 'YOUR-IDENTITY', Authorization: 'YOUR-AUTHORIZATION'}
};

fetch('https://sandbox.bond.tech/api/v0/accounts/931e2341-c3eb-4681-97d4-f6e09d90da14/external_accounts?list_full_account=true', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
import requests

url = "https://sandbox.bond.tech/api/v0/accounts/931e2341-c3eb-4681-97d4-f6e09d90da14/external_accounts"

querystring = {"list_full_account":"true"}

headers = {
    "Identity": "YOUR-IDENTITY",
    "Authorization": "YOUR-AUTHORIZATION"
}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
var client = new RestClient("https://sandbox.bond.tech/api/v0/accounts/931e2341-c3eb-4681-97d4-f6e09d90da14/external_accounts?list_full_account=true");
var request = new RestRequest(Method.GET);
request.AddHeader("Identity", "YOUR-IDENTITY");
request.AddHeader("Authorization", "YOUR-AUTHORIZATION");
IRestResponse response = client.Execute(request);
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://sandbox.bond.tech/api/v0/accounts/931e2341-c3eb-4681-97d4-f6e09d90da14/external_accounts?list_full_account=true")
  .get()
  .addHeader("Identity", "YOUR-IDENTITY")
  .addHeader("Authorization", "YOUR-AUTHORIZATION")
  .build();

Response response = client.newCall(request).execute();

An example of a response to a successful request to retrieve information for all linked accounts associated with the customer_id is shown below.

[
    {
        "linked_account_id": "f02ad0f9-1945-4cbc-b1b7-0e96b0189842",
        "plaid_access_token": "access-sandbox-04159b72-7e5a-47f1-b2b8-f5a05464332a", 
        "customer_id": "0c9d3027-a22c-4653-a341-146fa689eb48", 
        "card_id": "edf4905f-2067-465e-b495-ad4f349eb8ae", 
        "date_created": "2021-02-11 12:01:36.122439-08",
        "date_updated": "2021-02-11 12:01:36.122456-08",
        "status": "active",
        "verification_status": "instantly_verified",
        "bank_name": "Chase",
        "account_number": "2222333344445555",
        "routing_number": "011401533",
        "account_type": "checking",
        "account_category": "depository"
    },
    {
        "linked_account_id": "133f6934-d3b7-4711-8600-0a8119b48c6c",
        "plaid_access_token": "access-sandbox-9a4ac1ee-8d85-464d-bb39-e4a9427008e0", 
        "customer_id": "0c9d3027-a22c-4653-a341-146fa689eb48", 
        "card_id": "d48c4f5e-a535-4740-829b-ff1c8feb70ea", 
        "date_created": "2021-01-13 10:38:07.148335-08",
        "date_updated": "2021-02-09 13:40:32.090811-08",
        "status": "active",
        "verification_status": "instantly_verified",
        "bank_name": "Bank of America",
        "account_number": "1111222233330000",
        "routing_number": "011401533",
        "account_type": "savings",
        "account_category": "depository"
    }
]

For a complete specification and interactive examples, see List external accounts in the Bond API Reference.

Removing external accounts

When a customer no longer wants their external bank account to be associated with a Plaid item, you can revoke their Plaid access_token.

To revoke an access_token, use the DELETE /v0/accounts/{account_id} operation and provide the body parameters as shown in the table below.

ParameterTypeDescription
account_id
required
stringCard account ID, for example 9dc86a8a-4c12-4107-84a8-e7cf6a76586f.

An example of a request to to remove an external account is shown below.

curl --request DELETE \
     --url https://sandbox.bond.tech/api/v0/accounts/9dc86a8a-4c12-4107-84a8-e7cf6a76586f \
     --header 'Authorization: YOUR-AUTHORIZATION' \
     --header 'Identity: YOUR-IDENTITY'
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://sandbox.bond.tech/api/v0/accounts/9dc86a8a-4c12-4107-84a8-e7cf6a76586f/external_accounts/8dd4e2de-33be-4bb3-9a19-25069033a5e2")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["Identity"] = 'YOUR-IDENTITY'
request["Authorization"] = 'YOUR-AUTHORIZATION'

response = http.request(request)
puts response.read_body
const options = {
  method: 'DELETE',
  headers: {Identity: 'YOUR-IDENTITY', Authorization: 'YOUR-AUTHORIZATION'}
};

fetch('https://sandbox.bond.tech/api/v0/accounts/9dc86a8a-4c12-4107-84a8-e7cf6a76586f/external_accounts/8dd4e2de-33be-4bb3-9a19-25069033a5e2', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
import requests

url = "https://sandbox.bond.tech/api/v0/accounts/9dc86a8a-4c12-4107-84a8-e7cf6a76586f/external_accounts/8dd4e2de-33be-4bb3-9a19-25069033a5e2"

headers = {
    "Identity": "YOUR-IDENTITY",
    "Authorization": "YOUR-AUTHORIZATION"
}

response = requests.request("DELETE", url, headers=headers)

print(response.text)
var client = new RestClient("https://sandbox.bond.tech/api/v0/accounts/9dc86a8a-4c12-4107-84a8-e7cf6a76586f/external_accounts/8dd4e2de-33be-4bb3-9a19-25069033a5e2");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Identity", "YOUR-IDENTITY");
request.AddHeader("Authorization", "YOUR-AUTHORIZATION");
IRestResponse response = client.Execute(request);
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://sandbox.bond.tech/api/v0/accounts/9dc86a8a-4c12-4107-84a8-e7cf6a76586f/external_accounts/8dd4e2de-33be-4bb3-9a19-25069033a5e2")
  .delete(null)
  .addHeader("Identity", "YOUR-IDENTITY")
  .addHeader("Authorization", "YOUR-AUTHORIZATION")
  .build();

Response response = client.newCall(request).execute();

Once the access_token is revoked, Bond deletes the external account. If the customer wants to reconnect their Bond card account to this external bank account, the account must be relinked.

{
    "deleted_at": "2021-04-01T04:07:53.685055+00:00",
    "date_created": "2021-04-01T04:07:08.598071+00:00",
    "linked_account_id": "13eaf2ec-2b1b-4cd2-ba67-89266be37cb3",
    "account_id": "b7d9ba73-8189-4df3-a550-0c417c693f4a",
    "customer_id": "cfd0bb6e-d0da-4d4e-8e06-819eeb4d0284",
    "bank_name": "Casino Royale",
    "status": "removed"
}

For a complete specification and interactive examples, see Removing an external account in the Bond API Reference.