View Source Stripe.Transfer (stripity_stripe v3.2.0)
A Transfer object is created when you move funds between Stripe accounts as
part of Connect.
Before April 6, 2017, transfers also represented movement of funds from a Stripe account to a card or bank account. This behavior has since been split out into a Payout object, with corresponding payout endpoints. For more information, read about the transfer/payout split.
Related guide: Creating separate charges and transfers
Summary
Functions
To send funds from your Stripe account to a connected account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.
Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.
Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information.
Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Types
@type t() :: %Stripe.Transfer{ amount: integer(), amount_reversed: integer(), balance_transaction: (binary() | Stripe.BalanceTransaction.t()) | nil, created: integer(), currency: binary(), description: binary() | nil, destination: (binary() | Stripe.Account.t()) | nil, destination_payment: binary() | Stripe.Charge.t(), id: binary(), livemode: boolean(), metadata: term(), object: binary(), reversals: term(), reversed: boolean(), source_transaction: (binary() | Stripe.Charge.t()) | nil, source_type: binary(), transfer_group: binary() | nil }
The transfer type.
amountAmount in cents (or local equivalent) to be transferred.amount_reversedAmount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued).balance_transactionBalance transaction that describes the impact of this transfer on your account balance.createdTime that this record of the transfer was first created.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.destinationID of the Stripe account the transfer was sent to.destination_paymentIf the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer.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.reversalsA list of reversals that have been applied to the transfer.reversedWhether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false.source_transactionID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance.source_typeThe source balance this transfer came from. One ofcard,fpx, orbank_account.transfer_groupA string that identifies this transaction as part of a group. See the Connect documentation for details.
Functions
@spec create( params :: %{ optional(:amount) => integer(), optional(:currency) => binary(), optional(:description) => binary(), optional(:destination) => binary(), optional(:expand) => [binary()], optional(:metadata) => %{optional(binary()) => binary()}, optional(:source_transaction) => binary(), optional(:source_type) => :bank_account | :card | :fpx, optional(:transfer_group) => binary() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
To send funds from your Stripe account to a connected account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.
Details
- Method: 
post - Path: 
/v1/transfers 
@spec list( params :: %{ optional(:created) => created() | integer(), optional(:destination) => binary(), optional(:ending_before) => binary(), optional(:expand) => [binary()], optional(:limit) => integer(), optional(:starting_after) => binary(), optional(:transfer_group) => binary() }, opts :: Keyword.t() ) :: {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.
Details
- Method: 
get - Path: 
/v1/transfers 
@spec retrieve( transfer :: binary(), params :: %{optional(:expand) => [binary()]}, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information.
Details
- Method: 
get - Path: 
/v1/transfers/{transfer} 
@spec update( transfer :: binary(), params :: %{ optional(:description) => binary(), optional(:expand) => [binary()], optional(:metadata) => %{optional(binary()) => binary()} | binary() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
This request accepts only metadata as an argument.
Details
- Method: 
post - Path: 
/v1/transfers/{transfer}