Moov.Sweeps (Moov v1.0.0)

Copy Markdown View Source

Automate settlement of a wallet's balance to a linked bank account (or pull funds in to cover fees/chargebacks).

Push payment-method timing: "ach-credit-same-day" (cutoff 6pm ET), "ach-credit-standard" (next-day, 10am ET), "instant-bank-credit" (instant, via RTP - the recommended choice; "rtp-credit" is the same rail under a legacy name).

See https://docs.moov.io/api/money-movement/sweeps/.

Summary

Functions

Creates a sweep configuration for an account.

Retrieves a single sweep (an executed instance of a sweep config).

Retrieves a sweep configuration.

Lists sweeps executed for a wallet.

Lists sweep configurations for an account.

Updates a sweep configuration, e.g. to disable it.

Functions

create_config(client, account_id, params)

@spec create_config(Moov.Client.t(), String.t(), map()) ::
  {:ok, map()} | {:error, Moov.Error.t()}

Creates a sweep configuration for an account.

params: :wallet_id, :push_payment_method_id, :pull_payment_method_id, :status ("enabled"/"disabled"), :starting_balance (minimum balance to keep in the wallet before sweeping the rest out), :minimum_balance.

get(client, account_id, wallet_id, sweep_id)

@spec get(Moov.Client.t(), String.t(), String.t(), String.t()) ::
  {:ok, map()} | {:error, Moov.Error.t()}

Retrieves a single sweep (an executed instance of a sweep config).

get_config(client, account_id, sweep_config_id)

@spec get_config(Moov.Client.t(), String.t(), String.t()) ::
  {:ok, map()} | {:error, Moov.Error.t()}

Retrieves a sweep configuration.

list(client, account_id, wallet_id, opts \\ [])

@spec list(Moov.Client.t(), String.t(), String.t(), keyword()) ::
  {:ok, [map()]} | {:error, Moov.Error.t()}

Lists sweeps executed for a wallet.

list_configs(client, account_id, opts \\ [])

@spec list_configs(Moov.Client.t(), String.t(), keyword()) ::
  {:ok, [map()]} | {:error, Moov.Error.t()}

Lists sweep configurations for an account.

update_config(client, account_id, sweep_config_id, params)

@spec update_config(Moov.Client.t(), String.t(), String.t(), map()) ::
  {:ok, map()} | {:error, Moov.Error.t()}

Updates a sweep configuration, e.g. to disable it.