Struct stripe::Payout

source ·
pub struct Payout {
Show 22 fields pub id: PayoutId, pub amount: i64, pub arrival_date: Timestamp, pub automatic: bool, pub balance_transaction: Option<Expandable<BalanceTransaction>>, pub created: Timestamp, pub currency: Currency, pub description: Option<String>, pub destination: Option<Expandable<PayoutDestinationUnion>>, pub failure_balance_transaction: Option<Expandable<BalanceTransaction>>, pub failure_code: Option<String>, pub failure_message: Option<String>, pub livemode: bool, pub metadata: Option<Metadata>, pub method: String, pub original_payout: Option<Expandable<Payout>>, pub reconciliation_status: PayoutReconciliationStatus, pub reversed_by: Option<Expandable<Payout>>, pub source_type: String, pub statement_descriptor: Option<String>, pub status: String, pub type_: PayoutType,
}
Expand description

The resource representing a Stripe “Payout”.

For more details see https://stripe.com/docs/api/payouts/object

Fields§

§id: PayoutId

Unique identifier for the object.

§amount: i64

The amount (in cents (or local equivalent)) that transfers to your bank account or debit card.

§arrival_date: Timestamp

Date that you can expect the payout to arrive in the bank.

This factors in delays to account for weekends or bank holidays.

§automatic: bool

Returns true if the payout is created by an automated payout schedule and false if it’s requested manually.

§balance_transaction: Option<Expandable<BalanceTransaction>>

ID of the balance transaction that describes the impact of this payout on your account balance.

§created: Timestamp

Time at which the object was created.

Measured in seconds since the Unix epoch.

§currency: Currency

Three-letter ISO currency code, in lowercase.

Must be a supported currency.

§description: Option<String>

An arbitrary string attached to the object.

Often useful for displaying to users.

§destination: Option<Expandable<PayoutDestinationUnion>>

ID of the bank account or card the payout is sent to.

§failure_balance_transaction: Option<Expandable<BalanceTransaction>>

If the payout fails or cancels, this is the ID of the balance transaction that reverses the initial balance transaction and returns the funds from the failed payout back in your balance.

§failure_code: Option<String>

Error code that provides a reason for a payout failure, if available.

View our list of failure codes.

§failure_message: Option<String>

Message that provides the reason for a payout failure, if available.

§livemode: bool

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

§metadata: Option<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.

§method: String

The method used to send this payout, which can be standard or instant.

instant is supported for payouts to debit cards and bank accounts in certain countries. Learn more about bank support for Instant Payouts.

§original_payout: Option<Expandable<Payout>>

If the payout reverses another, this is the ID of the original payout.

§reconciliation_status: PayoutReconciliationStatus

If completed, you can use the Balance Transactions API to list all balance transactions that are paid out in this payout.

§reversed_by: Option<Expandable<Payout>>

If the payout reverses, this is the ID of the payout that reverses this payout.

§source_type: String

The source balance this payout came from, which can be one of the following: card, fpx, or bank_account.

§statement_descriptor: Option<String>

Extra information about a payout that displays on the user’s bank statement.

§status: String

Current status of the payout: paid, pending, in_transit, canceled or failed.

A payout is pending until it’s submitted to the bank, when it becomes in_transit. The status changes to paid if the transaction succeeds, or to failed or canceled (within 5 business days). Some payouts that fail might initially show as paid, then change to failed.

§type_: PayoutType

Can be bank_account or card.

Implementations§

source§

impl Payout

source

pub fn list(client: &Client, params: &ListPayouts<'_>) -> Response<List<Payout>>

Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you.

The payouts return in sorted order, with the most recently created payouts appearing first.

source

pub fn create(client: &Client, params: CreatePayout<'_>) -> Response<Payout>

To send funds to your own bank account, create a new payout object.

Your Stripe balance must cover the payout amount. If it doesn’t, you receive an “Insufficient Funds” error. If your API key is in test mode, money won’t actually be sent, though every other action occurs as if you’re in live mode. If you create a manual payout on a Stripe account that uses multiple payment source types, you need to specify the source type balance that the payout draws from. The balance object details available and pending amounts by source type.

source

pub fn retrieve( client: &Client, id: &PayoutId, expand: &[&str] ) -> Response<Payout>

Retrieves the details of an existing payout.

Supply the unique payout ID from either a payout creation request or the payout list. Stripe returns the corresponding payout information.

source

pub fn update( client: &Client, id: &PayoutId, params: UpdatePayout<'_> ) -> Response<Payout>

Updates the specified payout by setting the values of the parameters you pass.

We don’t change parameters that you don’t provide. This request only accepts the metadata as arguments.

source§

impl Payout

source

pub fn cancel(client: &Client, id: &PayoutId) -> Response<Payout>

Cancels the payout.

For more details see https://stripe.com/docs/api/payouts/cancel.

Trait Implementations§

source§

impl Clone for Payout

source§

fn clone(&self) -> Payout

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Payout

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Payout

source§

fn default() -> Payout

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Payout

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Object for Payout

§

type Id = PayoutId

The canonical id type for this object.
source§

fn id(&self) -> Self::Id

The id of the object.
source§

fn object(&self) -> &'static str

The object’s type, typically represented in wire format as the object property.
source§

impl Serialize for Payout

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Payout

§

impl RefUnwindSafe for Payout

§

impl Send for Payout

§

impl Sync for Payout

§

impl Unpin for Payout

§

impl UnwindSafe for Payout

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,