View Source Stripe.Treasury.DebitReversal (stripity_stripe v3.2.0)

You can reverse some ReceivedDebits depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal.

Summary

Types

t()

The treasury.debit_reversal type.

Functions

Reverses a ReceivedDebit and creates a DebitReversal object.

Returns a list of DebitReversals.

Retrieves a DebitReversal object.

Types

@type t() :: %Stripe.Treasury.DebitReversal{
  amount: integer(),
  created: integer(),
  currency: binary(),
  financial_account: binary() | nil,
  hosted_regulatory_receipt_url: binary() | nil,
  id: binary(),
  linked_flows: term() | nil,
  livemode: boolean(),
  metadata: term(),
  network: binary(),
  object: binary(),
  received_debit: binary(),
  status: binary(),
  status_transitions: term(),
  transaction: (binary() | Stripe.Treasury.Transaction.t()) | nil
}

The treasury.debit_reversal type.

  • amount Amount (in cents) transferred.
  • 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.
  • financial_account The FinancialAccount to reverse funds from.
  • hosted_regulatory_receipt_url A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
  • id Unique identifier for the object.
  • linked_flows Other flows linked to a DebitReversal.
  • livemode Has the value true if the object exists in live mode or the value false 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.
  • network The rails used to reverse the funds.
  • object String representing the object's type. Objects of the same type share the same value.
  • received_debit The ReceivedDebit being reversed.
  • status Status of the DebitReversal
  • status_transitions
  • transaction The Transaction associated with this object.

Functions

Link to this function

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

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

Reverses a ReceivedDebit and creates a DebitReversal object.

Details

  • Method: post
  • Path: /v1/treasury/debit_reversals
Link to this function

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

View Source
@spec list(
  params :: %{
    optional(:ending_before) => binary(),
    optional(:expand) => [binary()],
    optional(:financial_account) => binary(),
    optional(:limit) => integer(),
    optional(:received_debit) => binary(),
    optional(:resolution) => :lost | :won,
    optional(:starting_after) => binary(),
    optional(:status) => :canceled | :completed | :processing
  },
  opts :: Keyword.t()
) ::
  {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Returns a list of DebitReversals.

Details

  • Method: get
  • Path: /v1/treasury/debit_reversals
Link to this function

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

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

Retrieves a DebitReversal object.

Details

  • Method: get
  • Path: /v1/treasury/debit_reversals/{debit_reversal}