pub struct BalanceTransaction {
Show 14 fields pub id: BalanceTransactionId, pub amount: i64, pub available_on: Timestamp, pub created: Timestamp, pub currency: Currency, pub description: Option<String>, pub exchange_rate: Option<f64>, pub fee: i64, pub fee_details: Vec<Fee>, pub net: i64, pub reporting_category: String, pub source: Option<Expandable<BalanceTransactionSourceUnion>>, pub status: BalanceTransactionStatus, pub type_: BalanceTransactionType,
}
Expand description

The resource representing a Stripe “BalanceTransaction”.

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

Fields§

§id: BalanceTransactionId

Unique identifier for the object.

§amount: i64

Gross amount of this transaction (in cents (or local equivalent)).

A positive value represents funds charged to another party, and a negative value represents funds sent to another party.

§available_on: Timestamp

The date that the transaction’s net funds become available in the Stripe 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.

§exchange_rate: Option<f64>

If applicable, this transaction uses an exchange rate.

If money converts from currency A to currency B, then the amount in currency A, multipled by the exchange_rate, equals the amount in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent’s amount is 1000 and currency is eur. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction’s amount is 1234, its currency is usd, and the exchange_rate is 1.234.

§fee: i64

Fees (in cents (or local equivalent)) paid for this transaction.

Represented as a positive integer when assessed.

§fee_details: Vec<Fee>

Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction.

§net: i64

Net impact to a Stripe balance (in cents (or local equivalent)).

A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by amount - fee.

§reporting_category: String

Learn more about how reporting categories can help you understand balance transactions from an accounting perspective.

§source: Option<Expandable<BalanceTransactionSourceUnion>>

This transaction relates to the Stripe object.

§status: BalanceTransactionStatus

The transaction’s net funds status in the Stripe balance, which are either available or pending.

§type_: BalanceTransactionType

Transaction type: adjustment, advance, advance_funding, anticipation_repayment, application_fee, application_fee_refund, charge, climate_order_purchase, climate_order_refund, connect_collection_transfer, contribution, issuing_authorization_hold, issuing_authorization_release, issuing_dispute, issuing_transaction, obligation_outbound, obligation_reversal_inbound, payment, payment_failure_refund, payment_network_reserve_hold, payment_network_reserve_release, payment_refund, payment_reversal, payment_unreconciled, payout, payout_cancel, payout_failure, refund, refund_failure, reserve_transaction, reserved_funds, stripe_fee, stripe_fx_fee, tax_fee, topup, topup_reversal, transfer, transfer_cancel, transfer_failure, or transfer_refund.

Learn more about balance transaction types and what they represent. To classify transactions for accounting purposes, consider reporting_category instead.

Implementations§

source§

impl BalanceTransaction

source

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

Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth).

The transactions are returned in sorted order, with the most recent transactions appearing first. Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.

source

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

Retrieves the balance transaction with the given ID.

Note that this endpoint previously used the path /v1/balance/history/:id.

Trait Implementations§

source§

impl Clone for BalanceTransaction

source§

fn clone(&self) -> BalanceTransaction

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 BalanceTransaction

source§

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

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

impl Default for BalanceTransaction

source§

fn default() -> BalanceTransaction

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

impl<'de> Deserialize<'de> for BalanceTransaction

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 BalanceTransaction

§

type Id = BalanceTransactionId

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 BalanceTransaction

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§

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

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

§

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