View Source Stripe.Treasury.OutboundTransfer (stripity_stripe v3.2.0)
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.
Summary
Types
Hash describing payment method configuration details.
Details about a returned OutboundTransfer.
The treasury.outbound_transfer type.
Functions
An OutboundTransfer can be canceled if the funds have not yet been paid out.
Creates an OutboundTransfer.
Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
Returns a list of OutboundTransfers sent from the specified FinancialAccount.
Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list.
Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
Types
@type destination_payment_method_options() :: %{ optional(:us_bank_account) => us_bank_account() | binary() }
Hash describing payment method configuration details.
@type returned_details() :: %{
  optional(:code) =>
    :account_closed
    | :account_frozen
    | :bank_account_restricted
    | :bank_ownership_changed
    | :declined
    | :incorrect_account_holder_name
    | :invalid_account_number
    | :invalid_currency
    | :no_account
    | :other
}
      Details about a returned OutboundTransfer.
@type t() :: %Stripe.Treasury.OutboundTransfer{ amount: integer(), cancelable: boolean(), created: integer(), currency: binary(), description: binary() | nil, destination_payment_method: binary() | nil, destination_payment_method_details: term(), expected_arrival_date: integer(), financial_account: binary(), hosted_regulatory_receipt_url: binary() | nil, id: binary(), livemode: boolean(), metadata: term(), object: binary(), returned_details: term() | nil, statement_descriptor: binary(), status: binary(), status_transitions: term(), transaction: binary() | Stripe.Treasury.Transaction.t() }
The treasury.outbound_transfer type.
amountAmount (in cents) transferred.cancelableReturnstrueif the object can be canceled, andfalseotherwise.createdTime at which the object was created. Measured in seconds since the Unix epoch.currencyThree-letter ISO currency code, in lowercase. Must be a supported currency.descriptionAn arbitrary string attached to the object. Often useful for displaying to users.destination_payment_methodThe PaymentMethod used as the payment instrument for an OutboundTransfer.destination_payment_method_detailsexpected_arrival_dateThe date when funds are expected to arrive in the destination account.financial_accountThe FinancialAccount that funds were pulled from.hosted_regulatory_receipt_urlA hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.idUnique identifier for the object.livemodeHas the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.metadataSet of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.objectString representing the object's type. Objects of the same type share the same value.returned_detailsDetails about a returned OutboundTransfer. Only set when the status isreturned.statement_descriptorInformation about the OutboundTransfer to be sent to the recipient account.statusCurrent status of the OutboundTransfer:processing,failed,canceled,posted,returned. An OutboundTransfer isprocessingif it has been created and is pending. The status changes topostedonce the OutboundTransfer has been "confirmed" and funds have left the account, or tofailedorcanceled. If an OutboundTransfer fails to arrive at its destination, its status will change toreturned.status_transitionstransactionThe Transaction associated with this object.
@type us_bank_account() :: %{optional(:network) => :ach | :us_domestic_wire}
      Functions
@spec cancel( outbound_transfer :: binary(), params :: %{optional(:expand) => [binary()]}, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
An OutboundTransfer can be canceled if the funds have not yet been paid out.
Details
- Method: 
post - Path: 
/v1/treasury/outbound_transfers/{outbound_transfer}/cancel 
@spec create( params :: %{ optional(:amount) => integer(), optional(:currency) => binary(), optional(:description) => binary(), optional(:destination_payment_method) => binary(), optional(:destination_payment_method_options) => destination_payment_method_options(), optional(:expand) => [binary()], optional(:financial_account) => binary(), optional(:metadata) => %{optional(binary()) => binary()}, optional(:statement_descriptor) => binary() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Creates an OutboundTransfer.
Details
- Method: 
post - Path: 
/v1/treasury/outbound_transfers 
@spec fail( outbound_transfer :: binary(), params :: %{optional(:expand) => [binary()]}, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
Details
- Method: 
post - Path: 
/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail 
@spec list( params :: %{ optional(:ending_before) => binary(), optional(:expand) => [binary()], optional(:financial_account) => binary(), optional(:limit) => integer(), optional(:starting_after) => binary(), optional(:status) => :canceled | :failed | :posted | :processing | :returned }, opts :: Keyword.t() ) :: {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Returns a list of OutboundTransfers sent from the specified FinancialAccount.
Details
- Method: 
get - Path: 
/v1/treasury/outbound_transfers 
@spec post( outbound_transfer :: binary(), params :: %{optional(:expand) => [binary()]}, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
Details
- Method: 
post - Path: 
/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/post 
@spec retrieve( outbound_transfer :: binary(), params :: %{optional(:expand) => [binary()]}, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list.
Details
- Method: 
get - Path: 
/v1/treasury/outbound_transfers/{outbound_transfer} 
return_outbound_transfer(outbound_transfer, params \\ %{}, opts \\ [])
View Source@spec return_outbound_transfer( outbound_transfer :: binary(), params :: %{ optional(:expand) => [binary()], optional(:returned_details) => returned_details() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
Details
- Method: 
post - Path: 
/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/return