Plaid Link
Plaid Link allows users to quickly verify bank accounts through instant account verification (IAV). If Moov is managing your Plaid relationship, you can use Moov.js to link bank accounts with Plaid. Once you have a signed contract with Moov, you can work with Moov’s customer success team to prepare your account for Plaid.
Initialize Moov.js
As with all Moov.js methods, you will need a Moov access token with the appropriate scopes.
The Moov.js Plaid functions require the following scopes:
/accounts/{accountID}/bank-accounts.write
|
|
Initialize Plaid Link
Initialize a connection to Plaid, allowing users to instantly verify and link bank accounts to an existing Moov account. Note: For Moov-managed Plaid integrations only.
Parameters
Name | Type | Description |
---|---|---|
accountID |
UUID string | ID for an existing Moov user account |
env |
"sandbox" or undefined |
Plaid environment. Use "sandbox" for testing. Use undefined for production. |
elementID |
string | Optional. If provided, Plaid flow will open when the DOM element with this ID is clicked. |
shadowRootElement |
object | Optional. Used in tandem with elementID . If provided, the shadowRootElement will be used when querying for elementID . |
redirectURL |
URL string | If Plaid forces the user to a bank’s website, they will eventually return to this URL. Must be a webpage on your current domain. Contact Moov support and select submit a support ticket for technical issues, including the redirectURL so Moov can register this URL in the Plaid dashboard. If you ever change your redirectURL , contact Moov support again and include the new URL. |
onSuccess |
(moovBankAccount) => void | Optional. Callback function executed when Plaid successfully links a bank account to Moov. Moov bank account object is passed as a parameter. |
onExit |
(err, metadata) => void | Optional. Callback function executed when the user exits the Plaid flow. |
onEvent |
(eventName, metadata) => void | Optional. Callback function executed on each Plaid event. |
|
|
|
|
Reinitialize Plaid (OAuth redirects)
Some banks use an OAuth flow to connect to Plaid. In these situations, your user will be redirected to the bank’s website to authenticate, and then redirected back to your specified redirectURL
. This redirect landing page must run moov.plaid.reinitialize
to resume the Plaid flow.
Parameters
Name | Type | Description |
---|---|---|
receivedRedirectUri |
URL string | Brings the user back to the page they were on before Plaid redirected to a bank’s website. From there, Moov will detect that the Plaid process has completed and will resume linking the bank account. This parameter will be a combination of your redirectURL and query parameters set by Plaid. |
accountID |
UUID string | ID for an existing Moov user account |
env |
"sandbox" or undefined |
Plaid environment. Use "sandbox" for testing. Use undefined for production. |
elementID |
string | Optional. If provided, Plaid flow will open when the DOM element with this ID is clicked. |
onSuccess |
(moovBankAccount) => void | Optional. Callback function executed when Plaid successfully links a bank account to Moov. Moov bank account object is passed as a parameter. |
onExit |
(err, metadata) => void | Optional. Callback function executed when the user exits the Plaid flow. |
onEvent |
(eventName, metadata) => void | Optional. Callback function executed on each Plaid event. |
|
|
Using Plaid sandbox
You can use the env: "sandbox"
setting in your Plaid configuration object to simulate the process for connecting a bank account with Plaid.
In Plaid’s sandbox environment, you can find test bank accounts by searching for Platypus
.
For all Platypus
bank accounts, the username is user_good
and the password is pass_good
.
Note that the Platypus
account cannot be used for testing transfers. The purpose of the test account is solely for simulating connecting bank accounts.
Platypus
banks may throw a duplicate account
error at the end of the Plaid Link flow. Unfortunately, this issue is outside of Moov’s control. This issue is limited to Plaid’s sandbox environment, and should not affect users in production.