1.0.4 • Published 5 years ago

plaid-react-native v1.0.4

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

Plaid Link for React Native

plaid_react_native

Usage

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

API

PropTypedefaultValue
publicKey (required)string
onMessage (required)function
env (required)string
product (required)string
clientNamestring
selectAccountbooleanfalse
webhookstring
countryCodesstring
userobject{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:

StatusDescription
connectedUser completed the Link flow
requires_questionsUser prompted to answer security question(s)
requires_selectionsUser prompted to answer multiple choice question(s)
requires_codeUser prompted to provide a one-time passcode
choose_deviceUser prompted to select a device on which to receive a one-time passcode
requires_credentialsUser prompted to provide credentials for the selected financial institution or has not yet selected a financial institution
institution_not_foundUser 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