How to use plaid - 10 common examples

To help you get started, we’ve selected a few plaid examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github azeemba / lpaid / lib / plaid-wrapper.js View on Github external
// external deps
var config = require('config');
var plaid = require('plaid');
var moment = require('moment');

var PLAID_CLIENT_ID = config.get('PLAID.CLIENT_ID');
var PLAID_SECRET = config.get('PLAID.SECRET');
var PLAID_PUBLIC_KEY = config.get('PLAID.PUBLIC_KEY');
var PLAID_ENV = config.get('PLAID.ENV');

// Initialize the Plaid client
var client = new plaid.Client(
  PLAID_CLIENT_ID,
  PLAID_SECRET,
  PLAID_PUBLIC_KEY,
  plaid.environments[PLAID_ENV]
);

const SIMULTANEOUS_REQS = 3;

exports.getItems = (accessTokens) => {
  let promises = accessTokens.map((token) => {
    return client.getItem(token);
  }, {concurrency: SIMULTANEOUS_REQS});
  return Promise.all(promises);
}

exports.validateItem = (accessToken) => {
  return client.getAccounts(accessToken)
    .then(() => true)
    .catch((e) => {
      console.log("Looks like item is unlinked");
github plaid / pattern / server / plaid.js View on Github external
constructor() {
    // Initialize the Plaid client.
    this.client = new plaid.Client(
      PLAID_CLIENT_ID,
      PLAID_SECRET,
      PLAID_PUBLIC_KEY,
      plaid.environments[PLAID_ENV],
      OPTIONS
    );

    // Wrap the Plaid client methods to add a logging function.
    forEach(clientMethodLoggingFns, (logFn, method) => {
      this[method] = this.createWrappedClientMethod(method, logFn);
    });
  }
github azeemba / lpaid / lib / plaid-wrapper.js View on Github external
'use strict';

// external deps
var config = require('config');
var plaid = require('plaid');
var moment = require('moment');

var PLAID_CLIENT_ID = config.get('PLAID.CLIENT_ID');
var PLAID_SECRET = config.get('PLAID.SECRET');
var PLAID_PUBLIC_KEY = config.get('PLAID.PUBLIC_KEY');
var PLAID_ENV = config.get('PLAID.ENV');

// Initialize the Plaid client
var client = new plaid.Client(
  PLAID_CLIENT_ID,
  PLAID_SECRET,
  PLAID_PUBLIC_KEY,
  plaid.environments[PLAID_ENV]
);

const SIMULTANEOUS_REQS = 3;

exports.getItems = (accessTokens) => {
  let promises = accessTokens.map((token) => {
    return client.getItem(token);
  }, {concurrency: SIMULTANEOUS_REQS});
  return Promise.all(promises);
}

exports.validateItem = (accessToken) => {
github plaid / pattern / server / plaid.js View on Github external
constructor() {
    // Initialize the Plaid client.
    this.client = new plaid.Client(
      PLAID_CLIENT_ID,
      PLAID_SECRET,
      PLAID_PUBLIC_KEY,
      plaid.environments[PLAID_ENV],
      OPTIONS
    );

    // Wrap the Plaid client methods to add a logging function.
    forEach(clientMethodLoggingFns, (logFn, method) => {
      this[method] = this.createWrappedClientMethod(method, logFn);
    });
  }
github kevinschaich / mintable / src / lib / plaid / plaidClient.js View on Github external
const environment = () => {
  switch (process.env.PLAID_ENVIRONMENT) {
    case 'sandbox':
      return plaid.environments.sandbox
    case 'production':
      return plaid.environments.production
    default:
      return plaid.environments.development
  }
}
github kevinschaich / mintable / src / lib / plaid.js View on Github external
const environment = () => {
  switch (process.env.PLAID_ENVIRONMENT) {
    case 'sandbox':
      return plaid.environments.sandbox
    case 'production':
      return plaid.environments.production
    default:
      return plaid.environments.development
  }
}
github kevinschaich / mintable / src / lib / plaid / plaidClient.js View on Github external
const environment = () => {
  switch (process.env.PLAID_ENVIRONMENT) {
    case 'sandbox':
      return plaid.environments.sandbox
    case 'production':
      return plaid.environments.production
    default:
      return plaid.environments.development
  }
}
github kevinschaich / mintable / src / lib / plaid / plaidClient.js View on Github external
const environment = () => {
  switch (process.env.PLAID_ENVIRONMENT) {
    case 'sandbox':
      return plaid.environments.sandbox
    case 'production':
      return plaid.environments.production
    default:
      return plaid.environments.development
  }
}
github kevinschaich / mintable / src / lib / plaid.js View on Github external
const environment = () => {
  switch (process.env.PLAID_ENVIRONMENT) {
    case 'sandbox':
      return plaid.environments.sandbox
    case 'production':
      return plaid.environments.production
    default:
      return plaid.environments.development
  }
}
github kevinschaich / mintable / src / lib / plaid.js View on Github external
const environment = () => {
  switch (process.env.PLAID_ENVIRONMENT) {
    case 'sandbox':
      return plaid.environments.sandbox
    case 'production':
      return plaid.environments.production
    default:
      return plaid.environments.development
  }
}

plaid

A node.js client for the Plaid API

MIT
Latest version published 16 days ago

Package Health Score

87 / 100
Full package analysis

Popular plaid functions