Plaid Integration

If you have implemented your own Plaid Integration, then you will also want to take advantage of the Hurdlr Embedded experience's registerPlaidLinkListener functionality. By registering a listener, the Hurdlr Embedded experience's existing Plaid-related CTAs will invoke the callback function you provide, so that you can route the user to your own Plaid Link-related UI.

To register the listener, simply add the following line of JS to be ran once after Hurdlr.init({...}):

Hurdlr.registerPlaidLinkListener(myPlaidLinkCallback);

Whenever a user presses a Plaid Link CTA in Hurdlr's Embedded experience, myPlaidLinkCallback will be invoked, with a JSON object as the single argument, containing the following attributes:

FieldDescriptionFormat
typeType of Plaid Link CTA that was pressed by your user. If PLAID_LINK_RESET then you will need to open Plaid Link Update Mode. If PLAID_LINK_RELINK, then you will need to unlink the user's Plaid Item, and ask them to link again. If PLAID_LINK_UNLINK, then you will need to unlink the user's Plaid Item.Must be one of the following enumerations: Hurdlr.PLAID_LINK_NEW, Hurdlr.PLAID_LINK_RESET, Hurdlr.PLAID_LINK_RELINK, Hurdlr.PLAID_LINK_UNLINK
errorCodePlaid Item Error code. Only populated if type is Hurdlr.PLAID_LINK_RESET or Hurdlr.PLAID_LINK_RELINK. Useful for debugging purposes.Must be one of Plaid's Item Errors
plaidAccessTokenYour user's Plaid access_token; only populated if type is Hurdlr.PLAID_LINK_RESET, Hurdlr.PLAID_LINK_RELINK, or Hurdlr.PLAID_LINK_UNLINK.Any string
screenScreen in the Hurdlr Embedded experience where the user initiated Plaid Link. Useful for analytics and/or custom routing in your app.Any string

An example of the arguments passed to myPlaidLinkCallback for an item requiring a Plaid Link Update is shown below:

{
  type: "PLAID_LINK_RESET", // compare to Hurdlr.PLAID_LINK_RESET
  errorCode: "ITEM_LOGIN_REQUIRED",
  plaidAccessToken: "YOUR_USERS_PLAID_ACCESS_TOKEN",
  screen: "expenseDash"
}

Contact us directly at [email protected] should you need any help understanding how to use Plaid listeners with the Hurdlr Embedded experience.