View Source Stripe.Treasury.ReceivedCredit (stripity_stripe v3.2.0)
ReceivedCredits represent funds sent to a FinancialAccount (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount.
Summary
Types
Initiating payment method details for the object.
The treasury.received_credit type.
Optional fields for us_bank_account.
Functions
Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can’t directly create ReceivedCredits initiated by third parties.
Returns a list of ReceivedCredits.
Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.
Types
@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 linked_flows() :: %{
  optional(:source_flow_type) =>
    :credit_reversal | :other | :outbound_payment | :payout
}
      @type t() :: %Stripe.Treasury.ReceivedCredit{ 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_credit type.
amountAmount (in cents) transferred.createdTime at which the object was created. Measured in seconds since the Unix epoch.currencyThree-letter ISO currency code, in lowercase. Must be a supported currency.descriptionAn arbitrary string attached to the object. Often useful for displaying to users.failure_codeReason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen.financial_accountThe FinancialAccount that received the funds.hosted_regulatory_receipt_urlA hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.idUnique identifier for the object.initiating_payment_method_detailslinked_flowslivemodeHas the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.networkThe rails used to send the funds.objectString representing the object's type. Objects of the same type share the same value.reversal_detailsDetails describing when a ReceivedCredit may be reversed.statusStatus of the ReceivedCredit. ReceivedCredits are created eithersucceeded(approved) orfailed(declined). If a ReceivedCredit is declined, the failure reason can be found in thefailure_codefield.transactionThe 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
@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 | :us_domestic_wire }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can’t directly create ReceivedCredits initiated by third parties.
Details
- Method: 
post - Path: 
/v1/test_helpers/treasury/received_credits 
@spec list( params :: %{ optional(:ending_before) => binary(), optional(:expand) => [binary()], optional(:financial_account) => binary(), optional(:limit) => integer(), optional(:linked_flows) => linked_flows(), 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 ReceivedCredits.
Details
- Method: 
get - Path: 
/v1/treasury/received_credits 
@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 ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.
Details
- Method: 
get - Path: 
/v1/treasury/received_credits/{id}