View Source Stripe.TransferReversal (Striped v0.5.0) (generated)

Stripe Connect platforms can reverse transfers made to a connected account, either entirely or partially, and can also specify whether to refund any related application fees. Transfer reversals add to the platform's balance and subtract from the destination account's balance.

Reversing a transfer that was made for a destination charge is allowed only up to the amount of the charge. It is possible to reverse a transfer_group transfer only if the destination account has enough balance to cover the reversal.

Related guide: Reversing Transfers.

Link to this section Summary

Types

t()

The transfer_reversal type.

Functions

When you create a new reversal, you must specify a transfer to create it on.

You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional reversals.

By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer.

Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Link to this section Types

@type t() :: %Stripe.TransferReversal{
  amount: integer(),
  balance_transaction: (binary() | Stripe.BalanceTransaction.t()) | nil,
  created: integer(),
  currency: binary(),
  destination_payment_refund: (binary() | Stripe.Refund.t()) | nil,
  id: binary(),
  metadata: term() | nil,
  object: binary(),
  source_refund: (binary() | Stripe.Refund.t()) | nil,
  transfer: binary() | Stripe.Transfer.t()
}

The transfer_reversal type.

  • amount Amount, in %s.
  • balance_transaction Balance transaction that describes the impact 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.
  • destination_payment_refund Linked payment refund for the transfer reversal.
  • id Unique identifier for the object.
  • 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.
  • object String representing the object's type. Objects of the same type share the same value.
  • source_refund ID of the refund responsible for the transfer reversal.
  • transfer ID of the transfer that was reversed.

Link to this section Functions

Link to this function

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

View Source
@spec create(
  client :: Stripe.t(),
  id :: binary(),
  params :: %{
    optional(:amount) => integer(),
    optional(:description) => binary(),
    optional(:expand) => [binary()],
    optional(:metadata) => %{optional(binary()) => binary()} | binary(),
    optional(:refund_application_fee) => boolean()
  },
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

When you create a new reversal, you must specify a transfer to create it on.

When reversing transfers, you can optionally reverse part of the transfer. You can do so as many times as you wish until the entire transfer has been reversed.

Once entirely reversed, a transfer can’t be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer.

Details

  • Method: post
  • Path: /v1/transfers/{id}/reversals
Link to this function

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

View Source
@spec list(
  client :: Stripe.t(),
  id :: binary(),
  params :: %{
    optional(:ending_before) => binary(),
    optional(:expand) => [binary()],
    optional(:limit) => integer(),
    optional(:starting_after) => binary()
  },
  opts :: Keyword.t()
) ::
  {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional reversals.

Details

  • Method: get
  • Path: /v1/transfers/{id}/reversals
Link to this function

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

View Source
@spec retrieve(
  client :: Stripe.t(),
  id :: binary(),
  transfer :: binary(),
  params :: %{optional(:expand) => [binary()]},
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer.

Details

  • Method: get
  • Path: /v1/transfers/{transfer}/reversals/{id}
Link to this function

update(client, id, transfer, params \\ %{}, opts \\ [])

View Source
@spec update(
  client :: Stripe.t(),
  id :: binary(),
  transfer :: 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 reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

This request only accepts metadata and description as arguments.

Details

  • Method: post
  • Path: /v1/transfers/{transfer}/reversals/{id}