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.

t()

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

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 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.

  • 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 ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen.
  • financial_account The FinancialAccount that received the funds.
  • 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 rails used to send the funds.
  • object String representing the object's type. Objects of the same type share the same value.
  • reversal_details Details describing when a ReceivedCredit may be reversed.
  • status Status of the ReceivedCredit. ReceivedCredits are created either succeeded (approved) or failed (declined). If a ReceivedCredit is declined, the failure reason can be found in the failure_code field.
  • 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 | :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
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(: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
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 ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.

Details

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