Skip to content

mrhooray/plaid-elixir

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plaid

Build Status Hex.pm Version

Documentation

Elixir library for Plaid's V2 API.

Supported Plaid products:

  • Transactions
  • Auth
  • Identity
  • Balance
  • Income
  • Assets

Plaid Documentation

Usage

Add to your dependencies in mix.exs. The hex specification is required.

def deps do
  [{:plaid, "~> 1.3", hex: :plaid_elixir}]
end

Configuration

All calls to Plaid require either your client id and secret, or public key. Add the following configuration to your project to set the values.

config :plaid,
  root_uri: "https://development.plaid.com/"
  client_id: "your_client_id",
  secret: "your_secret",
  public_key: "your_public_key",
  httpoison_options: [timeout: 10_000, recv_timeout: 30_000]

By default, root_uri is set by mix environment. You can override it in your config.

  • dev - development.plaid.com
  • prod- production.plaid.com

Finally, you can pass in custom configuration for HTTPoison. It's recommended you extend the receive timeout for Plaid, especially for retrieving historical transactions.

Obtaining Access Tokens

Access tokens are required for almost all calls to Plaid. However, they can only be obtained using Plaid Link.

Once a user successfully connects to his institution using Plaid Link, a public token is returned to the client. This single-use public token can be exchanged for an access token and item id (both of which should be stored) using Plaid.Item.exchange_public_token/1.

Consult Plaid's documentation for additional detail on this process.

Compatibility

As of version 1.2, this library natively supports serialization of its structs using Jason for compatibility with Phoenix.

Tests and Style

This library uses bypass to simulate HTTP responses from Plaid.

About

An Elixir Library for Plaid

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 100.0%