---
title: How do I use the linkExternalAccount (Plaid) Method for my web application?
description: Using Transact API's integration with Plaid, you can easily facilitate connecting your investor’s bank account for making investments.
---

[Skip to content](https://support.northcapital.com/knowledge/how-do-i-use-the-linkexternalaccount-method#main-content)

English

Show submenu for translations

![TransactAPI logo (1).png\]](https://support.northcapital.com/hs-fs/hubfs/TransactAPI%20logo%20(1).png?height=30&name=TransactAPI%20logo%20(1).png)

- [North Capital Resource Center](https://blog.northcapital.com/resource-center)

Open main navigation

Close main navigation

- [North Capital Resource Center](https://blog.northcapital.com/resource-center)
- English
  
  Show submenu for translations
- [Go to northcapital.com](https://www.northcapital.com/)

[Go to northcapital.com](https://www.northcapital.com/)

 Hello. How can we help you?

- There are no suggestions because the search field is empty.

1. [Help Center](https://support.northcapital.com/knowledge?hsLang=en)
2. [Trades & Payments](https://support.northcapital.com/knowledge/trades-payments?hsLang=en)
3. [Plaid integration](https://support.northcapital.com/knowledge/trades-payments?hsLang=en#plaid-integration)

# How do I use the linkExternalAccount (Plaid) Method for my web application?

## Using Transact API's integration with Plaid, you can easily facilitate connecting your investor’s bank account for making investments.

The following code is for server side only and should not be exposedUsing Transact API's integration with Plaid, you can easily facilitate connecting your investor’s bank account for making investments. This article discusses the way to do this on a web application.

The following is a diagram that explains how the connectivity is established on portals powered by TransactAPI:

![](https://lh3.googleusercontent.com/yhzpQAsXMTaqDBqO-xHtKhLAgIz9ilxJA80k5LjgpMLyNW8mc9DY-q6E1JQD1YcC05d7y99lOX9eqX6RQ3CPDeRjNB4ky4t0_ltyt83JwDAMMJJNslR8s8tOBDH1MqLBzH839Oye)

Once you invoke a call to /LinkExternalAccount. This call will give you a response with a URL. The URL should be used in the div section so your investor user sees the Plaid widget loaded for them. They interact within the widget by authenticating the desired bank account, selecting the specific account etc.

There may be 2 actions at this point. The user may prematurely exit the widget, in which case, the callback URL processes the OnExit(). If the user completes the process within the widget, then the onSuccess() collects the data (i.e. Routing number and Account number) and makes the necessary updates into your account.

NOTE: If the investor needs to change the connected account, you may invoke /updateLinkExternalAccount **\*\*you do not need to invoke this method unless a change is needed\*\***

Please note! in order to protect your API keys, any code that contains your clientID or developerAPIKey needs to be kept on the server-side. 

Step 1. create client side code.

Below is some example code using HTML, CSS, Javascript and Axios.

```
//This code is for the client-side<!DOCTYPE html><html>  <head>      <meta charset="utf-8">      <meta name="viewport" content="width=device-width, initial-scale=1">      <style>          #link_button {            text-align: center;            padding: 10px;            border-radius: 5px;            background-color: black;            color: white;            width: 150px;            cursor: pointer;            margin: 20px;          }          #tapi_iframe {            width: 600px;            height: 420px;            border: none;          }          #iframe_container {            display: none;            padding: 10px;            border-radius: 5px;            -webkit-box-shadow: 0010px rgb(122, 122, 122);            box-shadow: 0010px rgb(122, 122, 122);         }         #close_button {           text-align: right;           float: right;           text-decoration: underline;           cursor: pointer;           width: fit-content;         }      </style>  </head>  <body>      <div id="link_button">Link Bank Account</div>      <div id="iframe_container">          <div id="close_button">Close</div>          <iframe id="tapi_iframe"></iframe>      </div>  </body></html>function closeStripeIframe() {   document.getElementById('iframe_container').style.display = 'none';}document.getElementById('close_button').onclick = function () {    closeStripeIframe();}window.addEventListener('message', function(event) {    let response = JSON.parse(event.data);    if(response.statusCode == 101) { closeStripeIframe(); }    else if(response.errorCode) {} //Handle error case (not required)};document.getElementById('close_button').onclick = function () {    closeStripeIframe();}function closeStripeIframe() {   document.getElementById('iframe_container').style.display = 'none';}
```

The following code is for server side only and should not be exposed

```
import axios from 'axios';function linkPlaidAccount() {    const options = {        method: 'POST',        url: 'https://api-sandboxdash.norcapsecurities.com/tapiv3/index.php/v3/linkExternalAccount',        header: {'content-type': 'application/json'},        data: {            clientID: 'yourClientID',            developerAPIKey: 'yourDeveloperAPIKey',            accountId: 'theAccountID'        }    };    axios.request(options)    .then(function (response) {        //handle success        return response;    })    .catch(function (error) {        console.error(error); //handle error    });}
```

PHP server side example code

```
<?php    // Get the key and url information from your constant file    $fields = array(        'developerAPIKey' => 'yourDeveloperAPIKey',        'clientID' => 'yourClientID',        'accountId' => 'theAccountID'    );    $url = 'https://*******/*****/index.php/v3/linkExternalAccount' . ;    $fields_string = '';    foreach ($fields as $key => $value) {        $fields_string .= $key . '=' . rawurlencode($value) . '&';    }    rtrim($fields_string, '&');    //open connection    $ch = curl_init();    //set the url, number of POST vars, POST data    curl_setopt($ch, CURLOPT_URL, $url);    curl_setopt($ch, CURLOPT_USERPWD,     'nc_admin_rest_basic:nc_admin_basic_pwd');    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');    curl_setopt($ch, CURLOPT_POST, count($fields));    curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);    //execute post    $result = curl_exec($ch);    $r_str = str_replace("\'", "&#x27;", $result);    $response = json_decode($r_str, true);    print_r($response);?>
```

Step 3. call your server side code from the client side. This may differ depending on your code stack. You should add this code to the client side code file we created earlier in Step 1.

```
document.getElementById('link_button').onclick = function(){   //This function should make a call to your server side code shown above   //It should also handle successful and failure responses correctly} 
```

 

- [Getting Started](https://support.northcapital.com/knowledge/getting-started?hsLang=en#main-content)

    - [How do I get my production API keys and go live?](https://support.northcapital.com/knowledge/getting-started?hsLang=en#how-do-i-get-my-production-api-keys-and-go-live)
    - [What are the standard TransactAPI integration workflows?](https://support.northcapital.com/knowledge/getting-started?hsLang=en#what-are-the-standard-transactapi-integration-workflows)
- [Trades & Payments](https://support.northcapital.com/knowledge/trades-payments?hsLang=en#main-content)

    - [General Trade & Payment Management](https://support.northcapital.com/knowledge/trades-payments?hsLang=en#general-trade-payment-management)
    - [Trade documents & uploads](https://support.northcapital.com/knowledge/trades-payments?hsLang=en#trade-documents-uploads)
    - [DocuSign subscription documents](https://support.northcapital.com/knowledge/trades-payments?hsLang=en#docusign-subscription-documents)
    - [Trade statuses explained](https://support.northcapital.com/knowledge/trades-payments?hsLang=en#trade-statuses-explained)
    - [Wire Transfers](https://support.northcapital.com/knowledge/trades-payments?hsLang=en#wire-transfers)
    - [Payment statuses & error codes](https://support.northcapital.com/knowledge/trades-payments?hsLang=en#payment-statuses-error-codes)
    - [Canceling & unwinding trades / Refunds & returns](https://support.northcapital.com/knowledge/trades-payments?hsLang=en#canceling-unwinding-trades-refunds-returns)
    - [ACH transfers](https://support.northcapital.com/knowledge/trades-payments?hsLang=en#ach-transfers)
    - [Credit & debit card payments](https://support.northcapital.com/knowledge/trades-payments?hsLang=en#credit-debit-card-payments)
    - [Plaid integration](https://support.northcapital.com/knowledge/trades-payments?hsLang=en#plaid-integration)
- [Offerings](https://support.northcapital.com/knowledge/offerings?hsLang=en#main-content)

    - [General](https://support.northcapital.com/knowledge/offerings?hsLang=en#general)
    - [Creating an offering](https://support.northcapital.com/knowledge/offerings?hsLang=en#creating-an-offering)
    - [Offering documents](https://support.northcapital.com/knowledge/offerings?hsLang=en#offering-documents)
    - [Post-offering management](https://support.northcapital.com/knowledge/offerings?hsLang=en#post-offering-management)
- [Accounts & Parties](https://support.northcapital.com/knowledge/accounts-parties?hsLang=en#main-content)

    - [Accreditation Verification](https://support.northcapital.com/knowledge/accounts-parties?hsLang=en#accreditation-verification)
    - [Account/Party management](https://support.northcapital.com/knowledge/accounts-parties?hsLang=en#account-party-management)
    - [KYC & AML](https://support.northcapital.com/knowledge/accounts-parties?hsLang=en#kyc-aml)
- [North Capital Escrow Services](https://support.northcapital.com/knowledge/north-capital-escrow-services?hsLang=en#main-content)

    - [Connecting escrow to an offering](https://support.northcapital.com/knowledge/north-capital-escrow-services?hsLang=en#connecting-escrow-to-an-offering)
    - [Accessing escrow accounts](https://support.northcapital.com/knowledge/north-capital-escrow-services?hsLang=en#accessing-escrow-accounts)
    - [Managing an escrow raise](https://support.northcapital.com/knowledge/north-capital-escrow-services?hsLang=en#managing-an-escrow-raise)
    - [Closing & disbursing funds](https://support.northcapital.com/knowledge/north-capital-escrow-services?hsLang=en#closing-disbursing-funds)
    - [Refunds & failed raises](https://support.northcapital.com/knowledge/north-capital-escrow-services?hsLang=en#refunds-failed-raises)
- [North Capital Custody Services](https://support.northcapital.com/knowledge/north-capital-custody-services?hsLang=en#main-content)

    - [Opening a custody account](https://support.northcapital.com/knowledge/north-capital-custody-services?hsLang=en#opening-a-custody-account)
    - [Updating account information](https://support.northcapital.com/knowledge/north-capital-custody-services?hsLang=en#updating-account-information)
    - [Investor Distributions](https://support.northcapital.com/knowledge/north-capital-custody-services?hsLang=en#investor-distributions)
- [Account & Admin](https://support.northcapital.com/knowledge/account-admin?hsLang=en#main-content)

    - [API keys & rotation](https://support.northcapital.com/knowledge/account-admin?hsLang=en#api-keys-rotation)
    - [User permissions & access](https://support.northcapital.com/knowledge/account-admin?hsLang=en#user-permissions-access)
    - [Two-factor authentication (2FA)](https://support.northcapital.com/knowledge/account-admin?hsLang=en#two-factor-authentication-2fa)
    - [Webhooks & notifications](https://support.northcapital.com/knowledge/account-admin?hsLang=en#webhooks-notifications)
    - [Billing & invoices](https://support.northcapital.com/knowledge/account-admin?hsLang=en#billing-invoices)
    - [Security](https://support.northcapital.com/knowledge/account-admin?hsLang=en#security)
    - [Error codes & system status](https://support.northcapital.com/knowledge/account-admin?hsLang=en#error-codes-system-status)
- [Opera](https://support.northcapital.com/knowledge/opera?hsLang=en#main-content)

    - [Administrative setup](https://support.northcapital.com/knowledge/opera?hsLang=en#administrative-setup)
    - [Login & access](https://support.northcapital.com/knowledge/opera?hsLang=en#login-access)
    - [Webhooks](https://support.northcapital.com/knowledge/opera?hsLang=en#webhooks)
    - [IQ Tutorials](https://support.northcapital.com/knowledge/opera?hsLang=en#iq-tutorials)

- [North Capital Resource Center](https://blog.northcapital.com/resource-center)

[![Chill listening crop-3](https://support.northcapital.com/hs-fs/hubfs/TransactAPI%20logo%20(1)-1.png?width=132&height=24&name=TransactAPI%20logo%20(1)-1.png "Chill listening crop-3")](http://northcapital.com)

northcapital.com Help Center

Copyright © 2026, North Capital Private Securities