View Source Stripe.Treasury.InboundTransfer (stripity_stripe v3.2.0)
Use InboundTransfers to add funds to your FinancialAccount via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit.
Summary
Functions
Cancels an InboundTransfer.
Creates an InboundTransfer.
Transitions a test mode created InboundTransfer to the failed
status. The InboundTransfer must already be in the processing
state.
Returns a list of InboundTransfers sent from the specified FinancialAccount.
Retrieves the details of an existing InboundTransfer.
Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded
state.
Transitions a test mode created InboundTransfer to the succeeded
status. The InboundTransfer must already be in the processing
state.
Types
@type failure_details() :: %{
optional(:code) =>
:account_closed
| :account_frozen
| :bank_account_restricted
| :bank_ownership_changed
| :debit_not_authorized
| :incorrect_account_holder_address
| :incorrect_account_holder_name
| :incorrect_account_holder_tax_id
| :insufficient_funds
| :invalid_account_number
| :invalid_currency
| :no_account
| :other
}
Details about a failed InboundTransfer.
@type t() :: %Stripe.Treasury.InboundTransfer{ amount: integer(), cancelable: boolean(), created: integer(), currency: binary(), description: binary() | nil, failure_details: term() | nil, financial_account: binary(), hosted_regulatory_receipt_url: binary() | nil, id: binary(), linked_flows: term(), livemode: boolean(), metadata: term(), object: binary(), origin_payment_method: binary(), origin_payment_method_details: term() | nil, returned: boolean() | nil, statement_descriptor: binary(), status: binary(), status_transitions: term(), transaction: (binary() | Stripe.Treasury.Transaction.t()) | nil }
The treasury.inbound_transfer
type.
amount
Amount (in cents) transferred.cancelable
Returnstrue
if the InboundTransfer is able to be canceled.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_details
Details about this InboundTransfer's failure. Only set when status isfailed
.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.linked_flows
livemode
Has the valuetrue
if the object exists in live mode or the valuefalse
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.object
String representing the object's type. Objects of the same type share the same value.origin_payment_method
The origin payment method to be debited for an InboundTransfer.origin_payment_method_details
Details about the PaymentMethod for an InboundTransfer.returned
Returnstrue
if the funds for an InboundTransfer were returned after the InboundTransfer went to thesucceeded
state.statement_descriptor
Statement descriptor shown when funds are debited from the source. Not all payment networks supportstatement_descriptor
.status
Status of the InboundTransfer:processing
,succeeded
,failed
, andcanceled
. An InboundTransfer isprocessing
if it is created and pending. The status changes tosucceeded
once the funds have been "confirmed" and atransaction
is created and posted. The status changes tofailed
if the transfer fails.status_transitions
transaction
The Transaction associated with this object.
Functions
@spec cancel( inbound_transfer :: binary(), params :: %{optional(:expand) => [binary()]}, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Cancels an InboundTransfer.
Details
- Method:
post
- Path:
/v1/treasury/inbound_transfers/{inbound_transfer}/cancel
@spec create( params :: %{ optional(:amount) => integer(), optional(:currency) => binary(), optional(:description) => binary(), optional(:expand) => [binary()], optional(:financial_account) => binary(), optional(:metadata) => %{optional(binary()) => binary()}, optional(:origin_payment_method) => binary(), optional(:statement_descriptor) => binary() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Creates an InboundTransfer.
Details
- Method:
post
- Path:
/v1/treasury/inbound_transfers
@spec fail( id :: binary(), params :: %{ optional(:expand) => [binary()], optional(:failure_details) => failure_details() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Transitions a test mode created InboundTransfer to the failed
status. The InboundTransfer must already be in the processing
state.
Details
- Method:
post
- Path:
/v1/test_helpers/treasury/inbound_transfers/{id}/fail
@spec list( params :: %{ optional(:ending_before) => binary(), optional(:expand) => [binary()], optional(:financial_account) => binary(), optional(:limit) => integer(), optional(:starting_after) => binary(), optional(:status) => :canceled | :failed | :processing | :succeeded }, opts :: Keyword.t() ) :: {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Returns a list of InboundTransfers sent from the specified FinancialAccount.
Details
- Method:
get
- Path:
/v1/treasury/inbound_transfers
@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 InboundTransfer.
Details
- Method:
get
- Path:
/v1/treasury/inbound_transfers/{id}
@spec return_inbound_transfer( id :: binary(), params :: %{optional(:expand) => [binary()]}, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded
state.
Details
- Method:
post
- Path:
/v1/test_helpers/treasury/inbound_transfers/{id}/return
@spec succeed( id :: binary(), params :: %{optional(:expand) => [binary()]}, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Transitions a test mode created InboundTransfer to the succeeded
status. The InboundTransfer must already be in the processing
state.
Details
- Method:
post
- Path:
/v1/test_helpers/treasury/inbound_transfers/{id}/succeed