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

ReceivedDebits represent funds pulled from a FinancialAccount. These are not initiated from the FinancialAccount.

Summary

Types

Initiating payment method details for the object.

t()

The treasury.received_debit type.

Optional fields for us_bank_account.

Functions

Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can’t directly create ReceivedDebits initiated by third parties.

Returns a list of ReceivedDebits.

Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list

Types

Link to this type

initiating_payment_method_details()

View Source
@type initiating_payment_method_details() :: %{
  optional(:type) => :us_bank_account,
  optional(:us_bank_account) => us_bank_account()
}

Initiating payment method details for the object.

@type t() :: %Stripe.Treasury.ReceivedDebit{
  amount: integer(),
  created: integer(),
  currency: binary(),
  description: binary(),
  failure_code: binary() | nil,
  financial_account: binary() | nil,
  hosted_regulatory_receipt_url: binary() | nil,
  id: binary(),
  initiating_payment_method_details: term(),
  linked_flows: term(),
  livemode: boolean(),
  network: binary(),
  object: binary(),
  reversal_details: term() | nil,
  status: binary(),
  transaction: (binary() | Stripe.Treasury.Transaction.t()) | nil
}

The treasury.received_debit 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.
  • description An arbitrary string attached to the object. Often useful for displaying to users.
  • failure_code Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen.
  • financial_account The FinancialAccount that funds were pulled 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.
  • initiating_payment_method_details
  • linked_flows
  • livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
  • network The network used for the ReceivedDebit.
  • object String representing the object's type. Objects of the same type share the same value.
  • reversal_details Details describing when a ReceivedDebit might be reversed.
  • status Status of the ReceivedDebit. ReceivedDebits are created with a status of either succeeded (approved) or failed (declined). The failure reason can be found under the failure_code.
  • transaction The Transaction associated with this object.
@type us_bank_account() :: %{
  optional(:account_holder_name) => binary(),
  optional(:account_number) => binary(),
  optional(:routing_number) => binary()
}

Optional fields for us_bank_account.

Functions

Link to this function

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

View Source
@spec create(
  params :: %{
    optional(:amount) => integer(),
    optional(:currency) => binary(),
    optional(:description) => binary(),
    optional(:expand) => [binary()],
    optional(:financial_account) => binary(),
    optional(:initiating_payment_method_details) =>
      initiating_payment_method_details(),
    optional(:network) => :ach
  },
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can’t directly create ReceivedDebits initiated by third parties.

Details

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

Returns a list of ReceivedDebits.

Details

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

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

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

Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list

Details

  • Method: get
  • Path: /v1/treasury/received_debits/{id}