This package has been deprecated

Author message:

this package has been deprecated

react-native-plaid

1.0.1 • Public • Published

react-native-plaid

react-native version npm version

Plaid Link implementation for React Native using a Webview and Plaid Link.

react-native-plaid

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

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:

import PlaidLinkView from 'react-native-plaid';

Displaying the Plaid Link is as simple as:

render() {
    return (
        <PlaidLinkView
          onMessage={data => console.log(data)}
          onExit={() => console.log("Exit")}
          onError={e => {console.log(e)}}
        />
    );
}

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

{
  "institution": {
    "name": "Chase",
    "institution_id": "ins_3"
  },
  "account": {
    "id": null,
    "name": null,
    "type": null,
    "subtype": null
  },
  "account_id": null,
  "accounts": [],
  "link_session_id": "c737a192-270f-4c45-adb7-6358abca8c0f",
  "public_token": "public-sandbox-5658fef9-260c-4848-b443-868413ae1521"
}

Contributions of any kind welcome!

Package Sidebar

Install

npm i react-native-plaid

Weekly Downloads

7

Version

1.0.1

License

MIT

Last publish

Collaborators

  • codealis-ar
  • faltdor
  • iamdvdendo
  • mateoguzmana
  • jccarrillo