Invoking the Link Accounts Tile

In order to aggregate data through Link Accounts, invoke the Link Accounts Tile within CDP:

var callbackFunc = function(response) {
    if (response.success == false) {
        container.tile.ui.showMessage('Error', 'Error opening tile');
        consolelog('Error calling tile.opentile - ' + response.message);
    }
};
//To test in ADP you can retrieve the tilecode by going to Manage Projects -> Edit and finding the GUID in the url.
var tilecode = 'AAAAAAAA-AAAA-1AAA-8AAA-AAAAAAAAAAAA';
var tileversion = '1.1';
var opendata = {
  client_id: "YOUR LINK MONEY CLIENT_ID",
  client_secret: "YOUR LINK MONEY CLIENT_SECRET",
};
container.tile.opentile(tilecode, tileversion, callbackFunc, opendata);

From the tile, a user can see their existing accounts, add another account, refresh their balances, update an existing account, and delete an account.

Once the user chooses to add an account, they will be redirected to the Link Money Gateway. Upon linking an account, the Gateway will close and return the user to the Link Money Tile. Accounts and transactions will be aggregated, cleaned up and sent to the CDP Core where they will now return with the getTransactions and getAccounts Container API calls.

*If the data is not written to the core, service providers can call the Link Money connector.

Screen Shot 2021-10-14 at 7.31.28 PM.png

Retrieving Transactions

In order to retrieve transactions you can call the Link Money connector directly or review the Link Accounts API documentation to set up webhooks or make the calls externally. See data models for the response schema.

container.connectors.sendRequest(
    "LinkAccountsConnector",
    "1.3",
    "GetTransactions",
    {
        developerId: "YOUR LINK MONEY CLIENT_ID",
        dataType: "plaid", //optional can be any of plaid, cdp, yodlee, mx
        desiredData: "transaction",
    },
    (res) => {
        console.log("GetTranasctions response", res);
    }
);container.connectors.sendRequest(
    "LinkAccountsConnector",
    "1.3",
    "GetAccounts",
    {
        developerId: "YOUR LINK MONEY CLIENT_ID",
        dataType: "plaid", //optional can be any of plaid, cdp, yodlee, mx
        desiredData: "account",
    accountId: "accountId" //optional if you'd like a specific account
    },
    (res) => {
        console.log("GetAccounts response", res);
    }
);

Retrieving Accounts

In order to retrieve accounts you can call our connector directly or review the Link Accounts API documentation to set up webhooks or make the calls externally. See data models for the response schema.


container.connectors.sendRequest(
    "LinkAccountsConnector",
    "1.3",
    "GetAccounts",
    {
        developerId: "YOUR LINK MONEY CLIENT_ID",
        dataType: "plaid", //optional can be any of plaid, cdp, yodlee, mx
        desiredData: "account",
		    accountId: "accountId" //optional if you'd like a specific account
    },
    (res) => {
        console.log("GetAccounts response", res);
    }
);

Retrieving Link Accounts Gateway Metadata

To complete the CDP-specific flows described by the Calling Back from the Gateway documentation, the Link Accounts connector can pull the most recent link accounts events for a particular authenticated user.

This method is offered to developers who want to see which items and accounts were linked during the most recent LinkMoney Web Gateway linking session.

var requestParams = {}

container.connectors.sendRequest("LinkAccountsConnector", "1.1.0", "GetLinkDataFromGateway"

This returns an events JSON array in the connector response, that contains data on the nature and content of the most-recent link for the authenticated user. These events can either be errors encountered during the link, or successfully-linked new items. For example:

"events": [
	{
		"type": "error",
		"message": "The credentials you've entered are incorrect. Verify that CAPS LOCK is not on and that the desired financial institution was selected."
	}, 
	{
		"type": "success",
		"data": {
			"user_id": "testorg1:testuser1",
			"item_id": "13774750",
			"institution_id": "16441",
			"accounts": [ "19730080" ]
		}
	}
]