Marqeta.AccountHolderFundingSources (marqeta v1.0.0)

Copy Markdown View Source

ACH funding sources for individual account holders.

Supports micro-deposit verification to confirm account ownership.

Examples

# Create an ACH funding source
{:ok, fs} = Marqeta.AccountHolderFundingSources.create(%{
  account_number: "123456789",
  routing_number: "021000021",
  account_type: "checking",
  name_on_account: "Jane Doe",
  user_token: "user_01"
})

# Verify via micro-deposits
{:ok, _} = Marqeta.AccountHolderFundingSources.verify(fs["token"], %{
  first_amount: 0.15,
  second_amount: 0.32
})

Summary

Functions

Creates a new account holder ACH funding source.

Creates a new account holder ACH funding source. Raises Marqeta.Error on failure.

Retrieves a account holder ACH funding source by token.

Retrieves a account holder ACH funding source by token. Raises Marqeta.Error on failure.

Lists account holder ACH funding source resources.

Lists account holder ACH funding source resources. Raises Marqeta.Error on failure.

Lists funding sources for a business.

Lists funding sources for a user.

Returns a lazy Stream that auto-paginates account holder ACH funding source resources.

Transitions the ACH funding source to active, cancelled, etc.

Updates an existing account holder ACH funding source.

Updates an existing account holder ACH funding source. Raises Marqeta.Error on failure.

Verifies micro-deposit amounts for an ACH funding source.

Functions

create(params \\ %{}, opts \\ [])

@spec create(
  map(),
  keyword()
) :: {:ok, map()} | {:error, Marqeta.Error.t()}

Creates a new account holder ACH funding source.

Returns {:ok, map()} on success, {:error, %Marqeta.Error{}} on failure.

create!(params \\ %{}, opts \\ [])

@spec create!(
  map(),
  keyword()
) :: map()

Creates a new account holder ACH funding source. Raises Marqeta.Error on failure.

get(token, opts \\ [])

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

Retrieves a account holder ACH funding source by token.

Returns {:ok, map()} on success, {:error, %Marqeta.Error{}} on failure.

get!(token, opts \\ [])

@spec get!(
  String.t(),
  keyword()
) :: map()

Retrieves a account holder ACH funding source by token. Raises Marqeta.Error on failure.

list(params \\ %{}, opts \\ [])

@spec list(
  map(),
  keyword()
) :: {:ok, map()} | {:error, Marqeta.Error.t()}

Lists account holder ACH funding source resources.

Accepts standard Marqeta pagination params: count, start_index, sort_by, sort_order, fields.

Use stream/2 to lazily iterate all pages automatically.

list!(params \\ %{}, opts \\ [])

@spec list!(
  map(),
  keyword()
) :: map()

Lists account holder ACH funding source resources. Raises Marqeta.Error on failure.

list_by_business(token, params \\ %{}, opts \\ [])

@spec list_by_business(String.t(), map(), keyword()) ::
  {:ok, map()} | {:error, Marqeta.Error.t()}

Lists funding sources for a business.

list_by_user(user_token, params \\ %{}, opts \\ [])

@spec list_by_user(String.t(), map(), keyword()) ::
  {:ok, map()} | {:error, Marqeta.Error.t()}

Lists funding sources for a user.

stream(params \\ %{}, opts \\ [])

@spec stream(
  map(),
  keyword()
) :: Enumerable.t()

Returns a lazy Stream that auto-paginates account holder ACH funding source resources.

transition(token, params, opts \\ [])

@spec transition(String.t(), map(), keyword()) ::
  {:ok, map()} | {:error, Marqeta.Error.t()}

Transitions the ACH funding source to active, cancelled, etc.

update(token, params, opts \\ [])

@spec update(String.t(), map(), keyword()) ::
  {:ok, map()} | {:error, Marqeta.Error.t()}

Updates an existing account holder ACH funding source.

Returns {:ok, map()} on success, {:error, %Marqeta.Error{}} on failure.

update!(token, params, opts \\ [])

@spec update!(String.t(), map(), keyword()) :: map()

Updates an existing account holder ACH funding source. Raises Marqeta.Error on failure.

verify(token, params, opts \\ [])

@spec verify(String.t(), map(), keyword()) ::
  {:ok, map()} | {:error, Marqeta.Error.t()}

Verifies micro-deposit amounts for an ACH funding source.