Plaid.Sandbox.simulate_bank_transfer

You're seeing just the function simulate_bank_transfer, go back to Plaid.Sandbox module for more information.
Link to this function

simulate_bank_transfer(bank_transfer_id, event_type, options \\ %{}, config)

View Source

Specs

simulate_bank_transfer(String.t(), String.t(), options, Plaid.config()) ::
  {:ok, Plaid.SimpleResponse.t()} | {:error, Plaid.Error.t()}
when options: %{
       optional(:failure_reason) => %{
         optional(:ach_return_code) => String.t(),
         optional(:description) => String.t()
       }
     }

Simulate a bank transfer event in the Plaid Sandbox.

Does a POST /sandbox/bank_transfer/simulate call to simulate a bank transfer in the plaid sandbox for testing purposes.

Params:

  • bank_transfer_id - Plaid’s unique identifier for a bank transfer.
  • event_type - The asynchronous event to be simulated. May be: posted, failed, or reversed.

Options:

  • :failure_reason - The failure reason if the type of this transfer is "failed" or "reversed".

Examples

Sandbox.simulate_bank_transfer("bt_123xxx", "posted", client_id: "123", secret: "abc")
{:ok, %Plaid.SimpleResponse{}}