plaid v1.1.2 Plaid.Item View Source

Functions for Plaid item endpoint.

Link to this section Summary

Functions

Creates a processor token used to create an authenticated funding source with Dwolla

Creates a public token. To be used to put Plaid Link into update mode

Exchanges a public token for an access token and item id

Invalidates access token and returns a new one

Updates an Item’s webhook

Link to this section Types

Link to this type cred() View Source
cred() :: %{required(atom()) => String.t()}
Link to this type params() View Source
params() :: %{required(atom()) => String.t()}
Link to this type t() View Source
t() :: %Plaid.Item{
  available_products: [String.t()],
  billed_products: [String.t()],
  error: String.t(),
  institution_id: String.t(),
  item_id: String.t(),
  request_id: String.t(),
  webhook: String.t()
}

Link to this section Functions

Link to this function create_processor_token(params, cred \\ get_cred()) View Source
create_processor_token(params(), cred() | nil) ::
  {:ok, map()} | {:error, Plaid.Error.t()}

Creates a processor token used to create an authenticated funding source with Dwolla.

Parameters

%{access_token: "access-env-identifier", account_id: "plaid-account-id"}

Response

{:ok, %{processor_token: "some-token", request_id: "k522f2"}}
Link to this function create_public_token(params, cred \\ get_cred()) View Source
create_public_token(params(), cred() | nil) ::
  {:ok, map()} | {:error, Plaid.Error.t()}

Creates a public token. To be used to put Plaid Link into update mode.

Parameters

%{access_token: "access-env-identifier"}

Response

{:ok, %{public_token: "access-env-identifier", expiration: 3600, request_id: "kg414f"}}
Link to this function delete(params, cred \\ get_cred()) View Source
delete(params(), cred() | nil) :: {:ok, map()} | {:error, Plaid.Error.t()}

Deletes an Item.

Parameters

%{access_token: "access-env-identifier"}
Link to this function exchange_public_token(params, cred \\ get_cred()) View Source
exchange_public_token(params(), cred() | nil) ::
  {:ok, map()} | {:error, Plaid.Error.t()}

Exchanges a public token for an access token and item id.

Parameters

%{public_token: "public-env-identifier"}

Response

{:ok, %{access_token: "access-env-identifier", item_id: "some-id", request_id: "f24wfg"}}
Link to this function get(params, cred \\ get_cred()) View Source
get(params(), cred() | nil) :: {:ok, Plaid.Item.t()} | {:error, Plaid.Error.t()}

Gets an Item.

Parameters

%{access_token: "access-env-identifier"}
Link to this function rotate_access_token(params, cred \\ get_cred()) View Source
rotate_access_token(params(), cred() | nil) ::
  {:ok, map()} | {:error, Plaid.Error.t()}

Invalidates access token and returns a new one.

Parameters

%{access_token: "access-env-identifier"}

Response

{:ok, %{new_access_token: "access-env-identifier", request_id: "gag8fs"}}
Link to this function update_version_access_token(params, cred \\ get_cred()) View Source
update_version_access_token(params(), cred() | nil) ::
  {:ok, map()} | {:error, Plaid.Error.t()}

Updates a V1 access token to V2.

Parameters

%{access_token_v1: "test_wells"}

Response

{:ok, %{access_token: "access-env-identifier", item_id: "some-id", request_id: "f24wfg"}}
Link to this function update_webhook(params, cred \\ get_cred()) View Source
update_webhook(params(), cred() | nil) ::
  {:ok, Plaid.Item.t()} | {:error, Plaid.Error.t()}

Updates an Item’s webhook.

Parameters

%{access_webhook: "access-env-identifier", webhook: "http://mywebsite/api"}