Class Transaction

java.lang.Object
com.stripe.model.StripeObject
com.stripe.model.v2.moneymanagement.Transaction
All Implemented Interfaces:
HasId, StripeObjectInterface

public class Transaction extends StripeObject implements HasId
A Transaction records how a money movement flow affects your FinancialAccount balance. A flow can create one or more Transactions.
  • Constructor Details

    • Transaction

      public Transaction()
  • Method Details

    • getAmount

      public Amount getAmount()
      The amount of the Transaction.
    • getBalanceImpact

      public Transaction.BalanceImpact getBalanceImpact()
      The change to the FinancialAccount's balance. This is the sum of the balance impacts of this Transaction's TransactionEntries with effective_at timestamps in the past.
    • getCategory

      public String getCategory()
      Open Enum. A category used to classify the Transaction.

      One of adjustment, currency_conversion, inbound_transfer, inbound_transfer_reversal, outbound_payment, outbound_payment_reversal, outbound_transfer, outbound_transfer_reversal, received_credit, received_credit_reversal, received_debit, received_debit_reversal, stripe_fee, or stripe_fee_tax.

    • getCounterparty

      public Transaction.Counterparty getCounterparty()
      Details about the counterparty to this Transaction.
    • getCreated

      public Instant getCreated()
      Time at which the object was created. Represented as an RFC 3339 timestamp in UTC with millisecond precision, for example 2022-09-18T13:22:18.123Z.
    • getDescription

      public String getDescription()
      A description of the Transaction. When applicable, the description is copied from the flow object when the Transaction is created. You can update it using the Update Transaction endpoint.
    • getFinancialAccount

      public String getFinancialAccount()
      The ID of the FinancialAccount affected by this Transaction.
    • getFlow

      public Transaction.Flow getFlow()
      Details about the flow object that created the Transaction, such as an InboundTransfer or OutboundPayment. flow.type identifies the kind of object. The corresponding field contains its ID, when available: for an InboundTransfer, flow.inbound_transfer contains the InboundTransfer's ID. Pass that ID to the flow parameter on List Transactions.
    • getLivemode

      public Boolean getLivemode()
      Has the value true if the object exists in live mode or the value false if the object exists in test mode.
    • getMetadata

      public Map<String,String> getMetadata()
      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.
    • getObject

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

      Equal to v2.money_management.transaction.

    • getRegulatoryReceipt

      public Transaction.RegulatoryReceipt getRegulatoryReceipt()
      Hosted transaction receipt that is provided when money movement is considered regulated under Stripe's money transmission licenses. If not applicable, regulatory_receipt.status will be not_applicable and no URL will be provided unless you opt in by calling /refresh_regulatory_receipt.
    • getStatus

      public String getStatus()
      Closed Enum. The current status of the Transaction. A Transaction is pending if either balance_impact.inbound_pending or balance_impact.outbound_pending is non-zero. A Transaction is posted if only balance_impact.available is non-zero. A Transaction is void if there is no balance impact. posted and void are terminal states, and no additional TransactionEntries will be added to the Transaction.

      One of pending, posted, or void.

    • getStatusTransitions

      public Transaction.StatusTransitions getStatusTransitions()
      Timestamps for when the Transaction transitioned to each status.
    • setAmount

      public void setAmount(Amount amount)
      The amount of the Transaction.
    • setBalanceImpact

      public void setBalanceImpact(Transaction.BalanceImpact balanceImpact)
      The change to the FinancialAccount's balance. This is the sum of the balance impacts of this Transaction's TransactionEntries with effective_at timestamps in the past.
    • setCategory

      public void setCategory(String category)
      Open Enum. A category used to classify the Transaction.

      One of adjustment, currency_conversion, inbound_transfer, inbound_transfer_reversal, outbound_payment, outbound_payment_reversal, outbound_transfer, outbound_transfer_reversal, received_credit, received_credit_reversal, received_debit, received_debit_reversal, stripe_fee, or stripe_fee_tax.

    • setCounterparty

      public void setCounterparty(Transaction.Counterparty counterparty)
      Details about the counterparty to this Transaction.
    • setCreated

      public void setCreated(Instant created)
      Time at which the object was created. Represented as an RFC 3339 timestamp in UTC with millisecond precision, for example 2022-09-18T13:22:18.123Z.
    • setDescription

      public void setDescription(String description)
      A description of the Transaction. When applicable, the description is copied from the flow object when the Transaction is created. You can update it using the Update Transaction endpoint.
    • setFinancialAccount

      public void setFinancialAccount(String financialAccount)
      The ID of the FinancialAccount affected by this Transaction.
    • setFlow

      public void setFlow(Transaction.Flow flow)
      Details about the flow object that created the Transaction, such as an InboundTransfer or OutboundPayment. flow.type identifies the kind of object. The corresponding field contains its ID, when available: for an InboundTransfer, flow.inbound_transfer contains the InboundTransfer's ID. Pass that ID to the flow parameter on List Transactions.
    • setId

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

      public void setLivemode(Boolean livemode)
      Has the value true if the object exists in live mode or the value false if the object exists in test mode.
    • setMetadata

      public void setMetadata(Map<String,String> 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.
    • setObject

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

      Equal to v2.money_management.transaction.

    • setRegulatoryReceipt

      public void setRegulatoryReceipt(Transaction.RegulatoryReceipt regulatoryReceipt)
      Hosted transaction receipt that is provided when money movement is considered regulated under Stripe's money transmission licenses. If not applicable, regulatory_receipt.status will be not_applicable and no URL will be provided unless you opt in by calling /refresh_regulatory_receipt.
    • setStatus

      public void setStatus(String status)
      Closed Enum. The current status of the Transaction. A Transaction is pending if either balance_impact.inbound_pending or balance_impact.outbound_pending is non-zero. A Transaction is posted if only balance_impact.available is non-zero. A Transaction is void if there is no balance impact. posted and void are terminal states, and no additional TransactionEntries will be added to the Transaction.

      One of pending, posted, or void.

    • setStatusTransitions

      public void setStatusTransitions(Transaction.StatusTransitions statusTransitions)
      Timestamps for when the Transaction transitioned to each status.
    • 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