View Source Stripe.Payout (stripity_stripe v3.2.0)
A Payout
object is created when you receive funds from Stripe, or when you
initiate a payout to either a bank account or debit card of a connected
Stripe account. You can retrieve individual payouts,
and list all payouts. Payouts are made on varying
schedules, depending on your country and
industry.
Related guide: Receiving payouts
Summary
Functions
You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the funds to your available balance. You can’t cancel automatic Stripe payouts.
To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If it doesn’t, you receive an “Insufficient Funds” error.
Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you. The payouts return in sorted order, with the most recently created payouts appearing first.
Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list. Stripe returns the corresponding payout information.
Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is in the pending
status, use /v1/payouts/:id/cancel
instead.
Updates the specified payout by setting the values of the parameters you pass. We don’t change parameters that you don’t provide. This request only accepts the metadata as arguments.
Types
@type t() :: %Stripe.Payout{ amount: integer(), arrival_date: integer(), automatic: boolean(), balance_transaction: (binary() | Stripe.BalanceTransaction.t()) | nil, created: integer(), currency: binary(), description: binary() | nil, destination: (binary() | Stripe.ExternalAccount.t() | Stripe.DeletedExternalAccount.t()) | nil, failure_balance_transaction: (binary() | Stripe.BalanceTransaction.t()) | nil, failure_code: binary() | nil, failure_message: binary() | nil, id: binary(), livemode: boolean(), metadata: term() | nil, method: binary(), object: binary(), original_payout: (binary() | t()) | nil, reconciliation_status: binary(), reversed_by: (binary() | t()) | nil, source_type: binary(), statement_descriptor: binary() | nil, status: binary(), type: binary() }
The payout
type.
amount
The amount (in cents (or local equivalent)) that transfers to your bank account or debit card.arrival_date
Date that you can expect the payout to arrive in the bank. This factors in delays to account for weekends or bank holidays.automatic
Returnstrue
if the payout is created by an automated payout schedule andfalse
if it's requested manually.balance_transaction
ID of the balance transaction that describes the impact of this payout on your account balance.created
Time at which the object was created. Measured in seconds since the Unix epoch.currency
Three-letter ISO currency code, in lowercase. Must be a supported currency.description
An arbitrary string attached to the object. Often useful for displaying to users.destination
ID of the bank account or card the payout is sent to.failure_balance_transaction
If the payout fails or cancels, this is the ID of the balance transaction that reverses the initial balance transaction and returns the funds from the failed payout back in your balance.failure_code
Error code that provides a reason for a payout failure, if available. View our list of failure codes.failure_message
Message that provides the reason for a payout failure, if available.id
Unique identifier for the object.livemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.metadata
Set 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.method
The method used to send this payout, which can bestandard
orinstant
.instant
is supported for payouts to debit cards and bank accounts in certain countries. Learn more about bank support for Instant Payouts.object
String representing the object's type. Objects of the same type share the same value.original_payout
If the payout reverses another, this is the ID of the original payout.reconciliation_status
Ifcompleted
, you can use the Balance Transactions API to list all balance transactions that are paid out in this payout.reversed_by
If the payout reverses, this is the ID of the payout that reverses this payout.source_type
The source balance this payout came from, which can be one of the following:card
,fpx
, orbank_account
.statement_descriptor
Extra information about a payout that displays on the user's bank statement.status
Current status of the payout:paid
,pending
,in_transit
,canceled
orfailed
. A payout ispending
until it's submitted to the bank, when it becomesin_transit
. The status changes topaid
if the transaction succeeds, or tofailed
orcanceled
(within 5 business days). Some payouts that fail might initially show aspaid
, then change tofailed
.type
Can bebank_account
orcard
.
Functions
@spec cancel( payout :: binary(), params :: %{optional(:expand) => [binary()]}, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the funds to your available balance. You can’t cancel automatic Stripe payouts.
Details
- Method:
post
- Path:
/v1/payouts/{payout}/cancel
@spec create( params :: %{ optional(:amount) => integer(), optional(:currency) => binary(), optional(:description) => binary(), optional(:destination) => binary(), optional(:expand) => [binary()], optional(:metadata) => %{optional(binary()) => binary()}, optional(:method) => :instant | :standard, optional(:source_type) => :bank_account | :card | :fpx, optional(:statement_descriptor) => binary() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If it doesn’t, you receive an “Insufficient Funds” error.
If your API key is in test mode, money won’t actually be sent, though every other action occurs as if you’re in live mode.
If you create a manual payout on a Stripe account that uses multiple payment source types, you need to specify the source type balance that the payout draws from. The balance object details available and pending amounts by source type.
Details
- Method:
post
- Path:
/v1/payouts
@spec list( params :: %{ optional(:arrival_date) => arrival_date() | integer(), optional(:created) => created() | integer(), optional(:destination) => binary(), optional(:ending_before) => binary(), optional(:expand) => [binary()], optional(:limit) => integer(), optional(:starting_after) => binary(), optional(:status) => binary() }, opts :: Keyword.t() ) :: {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you. The payouts return in sorted order, with the most recently created payouts appearing first.
Details
- Method:
get
- Path:
/v1/payouts
@spec retrieve( payout :: binary(), params :: %{optional(:expand) => [binary()]}, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list. Stripe returns the corresponding payout information.
Details
- Method:
get
- Path:
/v1/payouts/{payout}
@spec reverse( payout :: binary(), params :: %{ optional(:expand) => [binary()], optional(:metadata) => %{optional(binary()) => binary()} }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is in the pending
status, use /v1/payouts/:id/cancel
instead.
By requesting a reversal through /v1/payouts/:id/reverse
, you confirm that the authorized signatory of the selected bank account authorizes the debit on the bank account and that no other authorization is required.
Details
- Method:
post
- Path:
/v1/payouts/{payout}/reverse
@spec update( payout :: binary(), params :: %{ optional(:expand) => [binary()], optional(:metadata) => %{optional(binary()) => binary()} | binary() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Updates the specified payout by setting the values of the parameters you pass. We don’t change parameters that you don’t provide. This request only accepts the metadata as arguments.
Details
- Method:
post
- Path:
/v1/payouts/{payout}