expo-plaid-link
Plaid Link is a quick and secure way to integrate with the Plaid API. Here is an Expo component which can be easily drop into your Expo project.
Last updated 3 months ago by chentong1966 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install expo-plaid-link 
SYNC missed versions from official npm registry.

Expo Plaid Link

Plaid Link is a quick and secure way to integrate with the Plaid API. Here is an Expo component which can be easily drop into your Expo project.

To get started you need to sign up at https://plaid.com/ for free Palid API keys. This front end component need you put your PUBLIC_KEY in place, and your private key is used at backend to futhur call to get Transactions etc.

Client uses this front end component Plaid Link to establish link with bank and Plaid return a public_token, you send the public_token back to your server to use the public_token with your private key to get an access_token and item_id which you use for access transactions etc.

expo-plaid-link

Usage

npm i expo-plaid-link

API

Prop Type defaultValue
**publicKey** (required) `string`
**env** (required) `string`
**product** (required) `string`
clientName `string`
selectAccount `boolean` false
PlaidLinkUri `string` 'https://cdn.plaid.com/link/v2/stable/link.html'
webhook `string` `'https://requestb.in'`
onMessage `function`
onLoad `function`
onReady `function`
onAcknowledged `function`
onEvent `function`
onConnected `function`
onExit `function`
//******************** Code Smaple *****************************

    import React from 'react';
    import { StyleSheet, Text, View } from 'react-native';
    import PlaidClient from 'expo-plaid-link';

    export default function App() {
      return (
        <View style={{flex: 1}}>
        <Text>Plaid Client</Text>

        <PlaidClient 
          selectAccount="false" 
          env="sandbox" 
          PublicKey="[PUBLIC_KEY]" 
          origin='localhost'
          product="auth,transactions" 
          clientName="Plaid Link" 
          webhook="https://requestb.in"
          PlaidLinkUri='https://cdn.plaid.com/link/v2/stable/link.html' 
          onLoad={onLoad} 
          onEvent={onEvent}
          onConnected={onConnected} 
          onExit={onExit} 
          onReady={onReady} 
          onAcknowledged={onAcknowledged} 
          onMessage={onMessage}
          onPlaidRef={onPlaidRef} 
        />

        </View>
      );
    }

    function onLoad(obj){console.log('call back onLoad:',obj)}
    function onReady(obj){console.log('call back onReady:',obj)}
    function onAcknowledged(obj){console.log('call back onAcknowledged:',obj)}
    function onConnected(obj){console.log('call back onConnected:',obj);}
    function onExit(obj){console.log('call back onExit:',obj)}
    function onEvent(obj){console.log('call back onEvent:',obj)}
    function onMessage(obj){console.log('call back onMessage:',obj)};
    function onPlaidRef(obj){console.log('call back onPlaidRef:',obj)};

//******************************************************
Returned data object
    `{
          "action": "plaid_link-undefined::connected",
          "metadata": {
            "account": {
              "id": null,
              "name": null
            },
            "account_id": null,
            "public_token": "public-sandbox-e697e666-9ac2-4538-b152-7e56a4e58888",
            "institution": {
              "name": "Chase",
              "institution_id": "ins_3"
            }
          }
        }` 
  

For more information please read their docs

For test in Sandbox mode the credentials are:

    username: user_good
    password: pass_good

Current Tags

  • 1.0.4                                ...           latest (3 months ago)

5 Versions

  • 1.0.4                                ...           3 months ago
  • 1.0.3                                ...           3 months ago
  • 1.0.2                                ...           3 months ago
  • 1.0.1                                ...           4 months ago
  • 1.0.0                                ...           4 months ago
Maintainers (1)
Downloads
Today 1
This Week 1
This Month 2
Last Day 0
Last Week 0
Last Month 6
Dependencies (5)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |