Class Transaction

All Implemented Interfaces:
BalanceTransactionSource, HasId, MetadataStore<Transaction>, StripeObjectInterface

public class Transaction extends ApiResource implements MetadataStore<Transaction>, BalanceTransactionSource
  • Constructor Details

    • Transaction

      public Transaction()
  • Method Details

    • getAuthorization

      public String getAuthorization()
      Get ID of expandable authorization object.
    • setAuthorization

      public void setAuthorization(String id)
    • getAuthorizationObject

      public Authorization getAuthorizationObject()
      Get expanded authorization.
    • setAuthorizationObject

      public void setAuthorizationObject(Authorization expandableObject)
    • getBalanceTransaction

      public String getBalanceTransaction()
      Get ID of expandable balanceTransaction object.
    • setBalanceTransaction

      public void setBalanceTransaction(String id)
    • getBalanceTransactionObject

      public BalanceTransaction getBalanceTransactionObject()
      Get expanded balanceTransaction.
    • setBalanceTransactionObject

      public void setBalanceTransactionObject(BalanceTransaction expandableObject)
    • getCard

      public String getCard()
      Get ID of expandable card object.
    • setCard

      public void setCard(String id)
    • getCardObject

      public Card getCardObject()
      Get expanded card.
    • setCardObject

      public void setCardObject(Card expandableObject)
    • getCardholder

      public String getCardholder()
      Get ID of expandable cardholder object.
    • setCardholder

      public void setCardholder(String id)
    • getCardholderObject

      public Cardholder getCardholderObject()
      Get expanded cardholder.
    • setCardholderObject

      public void setCardholderObject(Cardholder expandableObject)
    • getDispute

      public String getDispute()
      Get ID of expandable dispute object.
    • setDispute

      public void setDispute(String id)
    • getDisputeObject

      public Dispute getDisputeObject()
      Get expanded dispute.
    • setDisputeObject

      public void setDisputeObject(Dispute expandableObject)
    • list

      public static TransactionCollection list(Map<String,Object> params) throws StripeException
      Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
      Throws:
      StripeException
    • list

      public static TransactionCollection list(Map<String,Object> params, RequestOptions options) throws StripeException
      Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
      Throws:
      StripeException
    • list

      public static TransactionCollection list(TransactionListParams params) throws StripeException
      Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
      Throws:
      StripeException
    • list

      public static TransactionCollection list(TransactionListParams params, RequestOptions options) throws StripeException
      Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
      Throws:
      StripeException
    • retrieve

      public static Transaction retrieve(String transaction) throws StripeException
      Retrieves an Issuing Transaction object.
      Throws:
      StripeException
    • retrieve

      public static Transaction retrieve(String transaction, RequestOptions options) throws StripeException
      Retrieves an Issuing Transaction object.
      Throws:
      StripeException
    • retrieve

      public static Transaction retrieve(String transaction, Map<String,Object> params, RequestOptions options) throws StripeException
      Retrieves an Issuing Transaction object.
      Throws:
      StripeException
    • retrieve

      public static Transaction retrieve(String transaction, TransactionRetrieveParams params, RequestOptions options) throws StripeException
      Retrieves an Issuing Transaction object.
      Throws:
      StripeException
    • update

      public Transaction update(Map<String,Object> params) throws StripeException
      Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
      Specified by:
      update in interface MetadataStore<Transaction>
      Throws:
      StripeException
    • update

      public Transaction update(Map<String,Object> params, RequestOptions options) throws StripeException
      Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
      Specified by:
      update in interface MetadataStore<Transaction>
      Throws:
      StripeException
    • update

      public Transaction update(TransactionUpdateParams params) throws StripeException
      Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
      Throws:
      StripeException
    • update

      public Transaction update(TransactionUpdateParams params, RequestOptions options) throws StripeException
      Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
      Throws:
      StripeException
    • getAmount

      public Long getAmount()
      The transaction amount, which will be reflected in your balance. This amount is in your currency and in the smallest currency unit.
    • getAmountDetails

      public Transaction.AmountDetails getAmountDetails()
      Detailed breakdown of amount components. These amounts are denominated in currency and in the smallest currency unit.
    • 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.
    • 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.
    • getMerchantAmount

      public Long getMerchantAmount()
      The amount that the merchant will receive, denominated in merchant_currency and in the smallest currency unit. It will be different from amount if the merchant is taking payment in a different currency.
    • getMerchantCurrency

      public String getMerchantCurrency()
      The currency with which the merchant is taking payment.
    • getMerchantData

      public Authorization.MerchantData getMerchantData()
    • getObject

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

      Equal to issuing.transaction.

    • getPurchaseDetails

      public Transaction.PurchaseDetails getPurchaseDetails()
      Additional purchase information that is optionally provided by the merchant.
    • getTreasury

      public Transaction.Treasury getTreasury()
      Treasury details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
    • getType

      public String getType()
      The nature of the transaction.

      One of capture, or refund.

    • getWallet

      public String getWallet()
      The digital wallet used for this transaction. One of apple_pay, google_pay, or samsung_pay.
    • setAmount

      public void setAmount(Long amount)
      The transaction amount, which will be reflected in your balance. This amount is in your currency and in the smallest currency unit.
    • setAmountDetails

      public void setAmountDetails(Transaction.AmountDetails amountDetails)
      Detailed breakdown of amount components. These amounts are denominated in currency and in the smallest currency unit.
    • 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.
    • 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.
    • setMerchantAmount

      public void setMerchantAmount(Long merchantAmount)
      The amount that the merchant will receive, denominated in merchant_currency and in the smallest currency unit. It will be different from amount if the merchant is taking payment in a different currency.
    • setMerchantCurrency

      public void setMerchantCurrency(String merchantCurrency)
      The currency with which the merchant is taking payment.
    • setMerchantData

      public void setMerchantData(Authorization.MerchantData merchantData)
    • 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.

      Equal to issuing.transaction.

    • setPurchaseDetails

      public void setPurchaseDetails(Transaction.PurchaseDetails purchaseDetails)
      Additional purchase information that is optionally provided by the merchant.
    • setTreasury

      public void setTreasury(Transaction.Treasury treasury)
      Treasury details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
    • setType

      public void setType(String type)
      The nature of the transaction.

      One of capture, or refund.

    • setWallet

      public void setWallet(String wallet)
      The digital wallet used for this transaction. One of apple_pay, google_pay, or samsung_pay.
    • 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
    • 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.
      Specified by:
      getMetadata in interface MetadataStore<Transaction>