StripeElixir.Services.Treasury.OutboundTransferService (stripe_elixir v0.1.0)

Copy Markdown View Source

TreasuryOutboundTransfersResourceOutboundTransfer

Use OutboundTransfers to transfer funds from a FinancialAccount to a PaymentMethod belonging to the same entity. To send funds to a different party, use OutboundPayments instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.

Simulate OutboundTransfer state changes with the /v1/test_helpers/treasury/outbound_transfers endpoints. These methods can only be called on test mode objects.

Related guide: Moving money with Treasury using OutboundTransfer objects

Summary

Functions

cancel(client, outbound_transfer, params \\ %{}, opts \\ [])

@spec cancel(StripeElixir.Client.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, StripeElixir.Error.t()}

Cancel an OutboundTransfer

An OutboundTransfer can be canceled if the funds have not yet been paid out.

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

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

Create an OutboundTransfer

Creates an OutboundTransfer.

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

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

List all OutboundTransfers

Returns a list of OutboundTransfers sent from the specified FinancialAccount.

retrieve(client, outbound_transfer, params \\ %{}, opts \\ [])

@spec retrieve(StripeElixir.Client.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, StripeElixir.Error.t()}

Retrieve an OutboundTransfer

Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list.