Plaid

Plaid helps people to securely connect and share data from their financial institutions with the apps and platforms. They allow it by providing their client SDK, Plaid Link, that abstracts and eases the process.

Plaid Link SDK is a quick and secure way to link bank accounts to Plaid from within your app. It’s a drop-in component that your users will interact with in order to link their bank accounts. Plaid Link will handle credential validation, multi-factor authentication, and error handling for each institution that Plaid supports. LinkKit is a drop-in framework that handles connecting a financial institution to your app without passing sensitive information to the Alviere platform.

On this guide you find useful links and advice to common integration scenarios within your app as well as steps that you need to take in order to have it correctly integrated with the Alviere platform.

SetupCopied!

Before writing code using the Plaid Link SDK, you must first perform some setup steps to register your app with Plaid, through the Alviere platform, and configure your project.

Web Setup

The first step to setup Plaid on your website is to create a redirect URI that is typically the address of a blank web page you'll need to create and host. This web page will be used to allow the end user to resume and complete the Link flow after completing the OAuth flow on their bank's website or app (for example https://example.com/oauth-page.html). After you set up the redirect URI path for Plaid you must provide it to an Alviere representative so it can be configured on your account.

After you’ve completed this step you can start integrating the Plaid Link that is available from Plaid. You can follow the steps to do it on Plaid official documentation where you can choose to integrate through the vanilla JavaScript library or the React one.

Mobile Setup

iOS

The first step to setup the Plaid Link SDK is to have universal links configured for your iOS application as Plaid uses it to handle the bank institutions that use OAuth as an authentication method.

If you have universal links already setup for your application you just need to specify a path for Plaid (for example https://app.example.com/plaid). If you don’t have universal links already setted up you can follow Plaid’s documentation on it that covers how to set it up and configure the path /plaid. After you set up the universal link path for Plaid you must provide it to an Alviere representative so it can be configured on your account.

When you finish the setup you can advance to the Plaid Link SDK installation. Plaid offers multiple ways to integrate their SDK on iOS, so you can choose to do it by Swift Package Manager (SPM), CocoaPods or Manually. You can follow the steps to integrate the SDK on Plaid official documentation. You don’t need to do the final step about camera support as Alviere will not have it enabled.

Android

Before you even start to install and configure the Plaid Link SDK you should provide your app package name to an Alviere representative so it can be configured on your account.

After you’ve completed this step you can start installing the Plaid Link SDK that is available from Plaid as a Maven package. You can follow the steps to do it on Plaid official documentation. You don’t need to do the final step about identity verification as Alviere will not have it enabled.

React Native

Before starting to integrate with the Plaid Link React Native SDK you need to set up the platform-specific requirements (iOS and Android).

For iOS, you need to have universal links configured for your application as Plaid uses it to handle the bank institutions that use OAuth as an authentication method. Please follow the instructions on how to specify a universal link on the native iOS setup section and then you just need to provide it to an Alviere representative so it can be configured on your account.

For Android, you should provide your app package name to an Alviere representative so it can be configured on your account.

After you finish the setup of the platform-specific requirements you can advance to the Plaid Link SDK installation. You can follow the steps to integrate the SDK on iOS Plaid official documentation (through CocoaPods or manually) and Android Plaid official documentation.

Linking an accountCopied!

In order for users to be able to link their bank accounts with the Alviere platform through Plaid they need to integrate what is shown on the diagram below.

image.png

The first step to link an account should be to get a fresh Plaid token from the Alviere API (1). The token is needed to instantiate and launch the Plaid Link SDK and it’s the only piece of data that you need to open it. To set up the result callbacks and open the Plaid Link SDK on each platform/framework (2) please check Plaid official documentation below:

After presenting to the user the Plaid Link UI and authenticates and chooses the bank account that wants to link with success, the Plaid Link SDK will return on the onSuccess callback (3) the linked account data. On that callback you should capture the result.publicToken and result.account.id values that then should be used to link a Plaid bank account on the Alviere platform (4). To link the Plaid bank account you can either call the Alviere API directly or use the Alviere mobile Payments SDK:

After this step the user bank account is successfully linked to the Alviere platform through the Plaid link SDK.

OAuth Flow

Some bank institutions (eg. Chase) requires the user to authenticate with OAuth on the device native browser or on the bank mobile app. With the OAuth authentication the users temporarily leave the app to authenticate and authorize data sharing using the bank institution's website or mobile app instead. Afterward, they're redirected back to the app to complete the Link flow.

image.png

The only difference on the flow, when comparing with the main one, is that the mobile app will direct the users outside the app for authentication and then back but this is all managed by the Plaid Link SDK and no additional setup is required. The process to request the Plaid token at the beginning and the linking of the bank account at the end requires no additional changes too.

Updating an AccountCopied!

Update mode is used to update authentication or authorization for a bank. This scenario is represented on the Alviere API through a Bank with PENDING status and a NEEDS_UPDATE status reason.

The most common reason for this is when access to an existing bank stops working: if the user changes a password, if the multi-factor authentication (MFA) requirements change, or if the login becomes locked.

image.png

Before opening the Plaid Link SDK for the user to update the bank account you need to request a fresh Plaid token from the Alviere API (1). This token request is the same as the one used to link a bank account but this time you need to provide the Alviere

payment_method_uuid

that identifies the user bank account on the Alviere platform.

In this scenario, the token is an update token and when you instantiate and launch the Plaid Link SDK it will already be in the update mode. You just need to launch the Plaid Link SDK (2) the same way you do for linking an account.

After presenting to the user the Plaid Link update UI and the user re-authenticates the bank account you just need to notify the Alviere platform that the bank account was updated. This can be done through the Alviere API directly or use the Alviere mobile Payments SDK:

After this step the user bank account should be activated again and the status should change to

ACTIVE

on the Alviere platform.

Testing the ImplementationCopied!

After you set up and integrate the linking of a bank account with the Alviere platform through the Plaid Link library you may want to test if it’s working correctly. To do that you can use the Alviere sandbox environment which is compatible with the Plaid sandbox environment. This means that you can use the Plaid testing credentials to simulate a wide range of scenarios within your app before promoting it to production.