react-native-plaid
Plaid Link implementation for React Native using a Webview and Plaid Link.
Documentation
Installation
npm install --save react-native-plaid
Setup
Environment Variables
Environment Variables
will need to be set for react-native-plaid
to work. See react-native-config
to learn more on how to use environment variables.
In your .env
file, use the following variables:
Variable | Type | default value | Description |
---|---|---|---|
PLAID_LINK_PUBLIC_KEY (required) | string |
Public identifier that is used to initialize Plaid Link | |
PLAID_LINK_ENV | string |
sandbox |
API environment |
PLAID_LINK_PRODUCT | string |
auth |
Plaid Product |
PLAID_LINK_CLIENT_NAME | string |
Plaid Test |
|
PLAID_LINK_WEBHOOK | string |
||
PLAID_LINK_TOKEN | string |
||
PLAID_LINK_API_VERSION | string |
v2 |
For more information please read their docs
Get Plaid API key
- Go to Plaid dashboard and
Sign in
. - Go to Keys and copy your Plaid public_key
Usage
Once you've install the library and setup the environment variables, you'll want to make it available to your app by importing it:
;
Displaying the Plaid Link is as simple as:
{ return <PlaidLinkView onMessage= console onExit= console onError= {console} /> ;}
API
Prop | Type | defaultValue | Description |
---|---|---|---|
onMessage (required) | function |
Returns authentication data. | |
onExit | function |
Execute any action at exit to Plaid . |
|
onError | function |
Returns any error on WebView or Plaid . |
|
publicKey | string |
||
env | string |
||
product | string |
||
clientName | string |
||
webhook | string |
||
token | string |
||
selectAccount | boolean |
||
apiVersion | string |
||
WebView props | - | - | - |
Returned data object
Contributions of any kind welcome!