Class BalanceTransaction

All Implemented Interfaces:
HasId, StripeActiveObject, StripeObjectInterface

public class BalanceTransaction extends ApiResource implements HasId
Balance transactions represent funds moving through your Stripe account. Stripe creates them for every type of transaction that enters or leaves your Stripe account balance.

Related guide: Balance transaction types

  • Constructor Details

    • BalanceTransaction

      public BalanceTransaction()
  • Method Details

    • getSource

      public String getSource()
      Get ID of expandable source object.
    • setSource

      public void setSource(String id)
    • getSourceObject

      public BalanceTransactionSource getSourceObject()
      Get expanded source.
    • setSourceObject

      public void setSourceObject(BalanceTransactionSource expandableObject)
    • list

      public static BalanceTransactionCollection list(Map<String,Object> params) throws StripeException
      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.

      Throws:
      StripeException
    • list

      public static BalanceTransactionCollection list(Map<String,Object> params, RequestOptions options) throws StripeException
      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.

      Throws:
      StripeException
    • list

      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.

      Throws:
      StripeException
    • list

      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.

      Throws:
      StripeException
    • retrieve

      public static BalanceTransaction retrieve(String id) throws StripeException
      Retrieves the balance transaction with the given ID.

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

      Throws:
      StripeException
    • retrieve

      public static BalanceTransaction retrieve(String id, RequestOptions options) throws StripeException
      Retrieves the balance transaction with the given ID.

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

      Throws:
      StripeException
    • retrieve

      public static BalanceTransaction retrieve(String id, Map<String,Object> params, RequestOptions options) throws StripeException
      Retrieves the balance transaction with the given ID.

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

      Throws:
      StripeException
    • retrieve

      public static BalanceTransaction retrieve(String id, BalanceTransactionRetrieveParams params, RequestOptions options) throws StripeException
      Retrieves the balance transaction with the given ID.

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

      Throws:
      StripeException
    • setResponseGetter

      public void setResponseGetter(StripeResponseGetter responseGetter)
      Description copied from interface: StripeActiveObject
      Method is used by the containing object or StripeResponseGetter implementations to set the StripeResponseGetter instance used to make further requests.
      Specified by:
      setResponseGetter in interface StripeActiveObject
      Overrides:
      setResponseGetter in class ApiResource
      Parameters:
      responseGetter - the StripeResponseGetter instance to use for making further requests.
    • getAmount

      public Long getAmount()
      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.
    • getAvailableOn

      public Long getAvailableOn()
      The date that the transaction's net funds become available in the Stripe balance.
    • getCreated

      public Long getCreated()
      Time at which the object was created. Measured in seconds since the Unix epoch.
    • getCurrency

      public String getCurrency()
      Three-letter ISO currency code, in lowercase. Must be a supported currency.
    • getDescription

      public String getDescription()
      An arbitrary string attached to the object. Often useful for displaying to users.
    • getExchangeRate

      public BigDecimal getExchangeRate()
      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.
    • getFee

      public Long getFee()
      Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed.
    • getFeeDetails

      public List<BalanceTransaction.FeeDetail> getFeeDetails()
      Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction.
    • getNet

      public Long getNet()
      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
    • getObject

      public String getObject()
      String representing the object's type. Objects of the same type share the same value.

      Equal to balance_transaction.

    • getReportingCategory

      public String getReportingCategory()
      Learn more about how reporting categories can help you understand balance transactions from an accounting perspective.
    • getStatus

      public String getStatus()
      The transaction's net funds status in the Stripe balance, which are either available or pending.
    • getType

      public String getType()
      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.

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

    • setAmount

      public void setAmount(Long amount)
      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.
    • setAvailableOn

      public void setAvailableOn(Long availableOn)
      The date that the transaction's net funds become available in the Stripe balance.
    • setCreated

      public void setCreated(Long created)
      Time at which the object was created. Measured in seconds since the Unix epoch.
    • setCurrency

      public void setCurrency(String currency)
      Three-letter ISO currency code, in lowercase. Must be a supported currency.
    • setDescription

      public void setDescription(String description)
      An arbitrary string attached to the object. Often useful for displaying to users.
    • setExchangeRate

      public void setExchangeRate(BigDecimal exchangeRate)
      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.
    • setFee

      public void setFee(Long fee)
      Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed.
    • setFeeDetails

      public void setFeeDetails(List<BalanceTransaction.FeeDetail> feeDetails)
      Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction.
    • setId

      public void setId(String id)
      Unique identifier for the object.
    • setNet

      public void setNet(Long net)
      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
    • setObject

      public void setObject(String object)
      String representing the object's type. Objects of the same type share the same value.

      Equal to balance_transaction.

    • setReportingCategory

      public void setReportingCategory(String reportingCategory)
      Learn more about how reporting categories can help you understand balance transactions from an accounting perspective.
    • setStatus

      public void setStatus(String status)
      The transaction's net funds status in the Stripe balance, which are either available or pending.
    • setType

      public void setType(String type)
      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.

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

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getId

      public String getId()
      Unique identifier for the object.
      Specified by:
      getId in interface HasId