Class BalanceTransaction

All Implemented Interfaces:
HasId, StripeObjectInterface

public class BalanceTransaction extends ApiResource implements HasId
Balance transactions represent funds moving through your Stripe account. They're created for every type of transaction that comes into or flows out of 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
    • getAmount

      public Long getAmount()
      Gross amount of the transaction, in %s.
    • getAvailableOn

      public Long getAvailableOn()
      The date the transaction's net funds will 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()
      The exchange rate used, if applicable, for this transaction. Specifically, if money was converted from currency A to currency B, then the amount in currency A, times exchange_rate, would be the amount in currency B. For example, suppose you charged a customer 10.00 EUR. Then the PaymentIntent's amount would be 1000 and currency would be eur. Suppose this was converted into 12.34 USD in your Stripe account. Then the BalanceTransaction's amount would be 1234, currency would be usd, and exchange_rate would be 1.234.
    • getFee

      public Long getFee()
      Fees (in %s) paid for this transaction.
    • getFeeDetails

      public List<BalanceTransaction.Fee> getFeeDetails()
      Detailed breakdown of fees (in %s) paid for this transaction.
    • getNet

      public Long getNet()
      Net amount of the transaction, in %s.
    • 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()
      If the transaction's net funds are available in the Stripe balance yet. Either available or pending.
    • getType

      public String getType()
      Transaction type: adjustment, advance, advance_funding, anticipation_repayment, application_fee, application_fee_refund, charge, connect_collection_transfer, contribution, issuing_authorization_hold, issuing_authorization_release, issuing_dispute, issuing_transaction, payment, payment_failure_refund, payment_refund, 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. If you are looking to classify transactions for accounting purposes, you might want to consider reporting_category instead.

      One of adjustment, advance, advance_funding, anticipation_repayment, application_fee, application_fee_refund, charge, connect_collection_transfer, contribution, issuing_authorization_hold, issuing_authorization_release, issuing_dispute, issuing_transaction, payment, payment_failure_refund, payment_refund, 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 the transaction, in %s.
    • setAvailableOn

      public void setAvailableOn(Long availableOn)
      The date the transaction's net funds will 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)
      The exchange rate used, if applicable, for this transaction. Specifically, if money was converted from currency A to currency B, then the amount in currency A, times exchange_rate, would be the amount in currency B. For example, suppose you charged a customer 10.00 EUR. Then the PaymentIntent's amount would be 1000 and currency would be eur. Suppose this was converted into 12.34 USD in your Stripe account. Then the BalanceTransaction's amount would be 1234, currency would be usd, and exchange_rate would be 1.234.
    • setFee

      public void setFee(Long fee)
      Fees (in %s) paid for this transaction.
    • setFeeDetails

      public void setFeeDetails(List<BalanceTransaction.Fee> feeDetails)
      Detailed breakdown of fees (in %s) paid for this transaction.
    • setId

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

      public void setNet(Long net)
      Net amount of the transaction, in %s.
    • 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)
      If the transaction's net funds are available in the Stripe balance yet. Either available or pending.
    • setType

      public void setType(String type)
      Transaction type: adjustment, advance, advance_funding, anticipation_repayment, application_fee, application_fee_refund, charge, connect_collection_transfer, contribution, issuing_authorization_hold, issuing_authorization_release, issuing_dispute, issuing_transaction, payment, payment_failure_refund, payment_refund, 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. If you are looking to classify transactions for accounting purposes, you might want to consider reporting_category instead.

      One of adjustment, advance, advance_funding, anticipation_repayment, application_fee, application_fee_refund, charge, connect_collection_transfer, contribution, issuing_authorization_hold, issuing_authorization_release, issuing_dispute, issuing_transaction, payment, payment_failure_refund, payment_refund, 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