plaid-react-native

1.0.4 • Public • Published

Plaid Link for React Native

plaid_react_native

Usage

yarn add plaid-react-native
yarn link react-native-webview

API

Prop Type defaultValue
publicKey (required) string
onMessage (required) function
env (required) string
product (required) string
clientName string
selectAccount boolean false
webhook string
countryCodes string
user object {legalName, emailAddress}
WebView props - -
render() {
  return <PlaidLink
    env="sandbox"
    onMessage={this.onMessage}
    product="auth,transactions"
    clientName="Amit Assaraf"
    publicKey="YOUR_PLAID_PUBLIC_KEY"
    selectAccount={false}
  />
}
 
onMessage = (plaidEventData) => {
  this.setState({plaidEventData})
}
plaidEventData object
{
  "action": "plaid_link-undefined::connected",
  "metadata": {
    "account": {
      "id": null,
      "name": null
    },
    "account_id": null,
    "public_token": "public-sandbox-f123166-541-9865-124a-54920362faac",
    "institution": {
      "name": "Bank of America",
      "institution_id": "ins_4"
    }
  }
}

For more information please read their docs

Type of actions:

Status Description
connected User completed the Link flow
requires_questions User prompted to answer security question(s)
requires_selections User prompted to answer multiple choice question(s)
requires_code User prompted to provide a one-time passcode
choose_device User prompted to select a device on which to receive a one-time passcode
requires_credentials User prompted to provide credentials for the selected financial institution or has not yet selected a financial institution
institution_not_found User exited the Link flow after unsuccessfully (no results returned) searching for a financial institution

For Sandbox mode the credentials are:

username: user_good
password: pass_good

customise account further:

const SERIALIZED_OBJ = JSON.stringify({
                                      override_accounts: [{
                                          starting_balance: 60000,
                                          type: 'depository',
                                          subtype: 'savings',
                                      }, {starting_balance: 60000, type: 'depository', subtype: 'checking'}]
                                  });

username: user_custom
password: SERIALIZED_OBJ

Get your plaid API key

  • Go to Plaid dashboard and Sign in. image
  • Add Plaid to your app image
  • Copy your Plaid public_key

Contact

Email: amit.assaraf@gmail.com Website: amitassaraf@me.com

Package Sidebar

Install

npm i plaid-react-native

Weekly Downloads

0

Version

1.0.4

License

MIT

Unpacked Size

8.21 kB

Total Files

3

Last publish

Collaborators

  • amitassaraf