Marqeta.InstantFunding (marqeta v1.0.0)

Copy Markdown View Source

Fund a Marqeta-issued card from an external debit or prepaid card using card network push-payment rails (Visa Direct / MC Send).

Examples

{:ok, transfer} = Marqeta.InstantFunding.create(%{
  amount: 200.00,
  currency_code: "USD",
  destination_card_token: "card_01",
  source_card_token: "src_card_01"
})

Summary

Functions

Retrieves instant funding configuration for the program.

Creates a new instant funding transfer.

Creates a new instant funding transfer. Raises Marqeta.Error on failure.

Retrieves a instant funding transfer by token.

Retrieves a instant funding transfer by token. Raises Marqeta.Error on failure.

Lists instant funding transfer resources.

Lists instant funding transfer resources. Raises Marqeta.Error on failure.

Returns a lazy Stream that auto-paginates instant funding transfer resources.

Updates instant funding configuration.

Functions

config(opts \\ [])

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

Retrieves instant funding configuration for the program.

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

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

Creates a new instant funding transfer.

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

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

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

Creates a new instant funding transfer. Raises Marqeta.Error on failure.

get(token, opts \\ [])

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

Retrieves a instant funding transfer by token.

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

get!(token, opts \\ [])

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

Retrieves a instant funding transfer by token. Raises Marqeta.Error on failure.

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

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

Lists instant funding transfer 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 instant funding transfer resources. Raises Marqeta.Error on failure.

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

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

Returns a lazy Stream that auto-paginates instant funding transfer resources.

update_config(params, opts \\ [])

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

Updates instant funding configuration.