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

You can reverse some ReceivedCredits depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal.

Summary

Types

t()

The treasury.credit_reversal type.

Functions

Reverses a ReceivedCredit and creates a CreditReversal object.

Returns a list of CreditReversals.

Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list

Types

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

The treasury.credit_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.
  • 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_credit The ReceivedCredit being reversed.
  • status Status of the CreditReversal
  • 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_credit) => binary()
  },
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Reverses a ReceivedCredit and creates a CreditReversal object.

Details

  • Method: post
  • Path: /v1/treasury/credit_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_credit) => binary(),
    optional(:starting_after) => binary(),
    optional(:status) => :canceled | :posted | :processing
  },
  opts :: Keyword.t()
) ::
  {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Returns a list of CreditReversals.

Details

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

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

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

Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list

Details

  • Method: get
  • Path: /v1/treasury/credit_reversals/{credit_reversal}