Package com.stripe.model.tax
Class Transaction
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.tax.Transaction
- All Implemented Interfaces:
- HasId,- StripeActiveObject,- StripeObjectInterface
A Tax Transaction records the tax collected from or refunded to your customer.
 
Related guide: Calculate tax in your custom payment flow
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classFor more details about CustomerDetails, please refer to the API Reference.static classFor more details about Reversal, please refer to the API Reference.static classFor more details about ShipFromDetails, please refer to the API Reference.static classFor more details about ShippingCost, please refer to the API Reference.Nested classes/interfaces inherited from class com.stripe.net.ApiResourceApiResource.RequestMethod
- 
Field SummaryFields inherited from class com.stripe.net.ApiResourceCHARSET, GSON, INTERNAL_GSONFields inherited from class com.stripe.model.StripeObjectPRETTY_PRINT_GSON
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected booleanstatic TransactionCreates a Tax Transaction from a calculation, if that calculation hasn’t expired.static TransactioncreateFromCalculation(TransactionCreateFromCalculationParams params, RequestOptions options) Creates a Tax Transaction from a calculation, if that calculation hasn’t expired.static TransactioncreateFromCalculation(Map<String, Object> params) Creates a Tax Transaction from a calculation, if that calculation hasn’t expired.static TransactioncreateFromCalculation(Map<String, Object> params, RequestOptions options) Creates a Tax Transaction from a calculation, if that calculation hasn’t expired.static TransactionPartially or fully reverses a previously createdTransaction.static TransactioncreateReversal(TransactionCreateReversalParams params, RequestOptions options) Partially or fully reverses a previously createdTransaction.static TransactioncreateReversal(Map<String, Object> params) Partially or fully reverses a previously createdTransaction.static TransactioncreateReversal(Map<String, Object> params, RequestOptions options) Partially or fully reverses a previously createdTransaction.booleanTime at which the object was created.Three-letter ISO currency code, in lowercase.The ID of an existing Customer used for the resource.getId()Unique identifier for the transaction.The tax collected or refunded, by line item.Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.Set of key-value pairs that you can attach to an object.String representing the object's type.The Unix timestamp representing when the tax liability is assumed or reduced.A custom unique identifier, such as 'myOrder_123'.Iftype=reversal, contains information about what was reversed.The details of the ship from location, such as the address.The shipping cost details for the transaction.Timestamp of date at which the tax rules and rates in effect applies for the calculation.getType()Ifreversal, this transaction reverses an earlier transaction.inthashCode()Retrieves the line items of a committed standalone transaction as a collection.Retrieves the line items of a committed standalone transaction as a collection.listLineItems(TransactionListLineItemsParams params, RequestOptions options) Retrieves the line items of a committed standalone transaction as a collection.listLineItems(Map<String, Object> params) Retrieves the line items of a committed standalone transaction as a collection.listLineItems(Map<String, Object> params, RequestOptions options) Retrieves the line items of a committed standalone transaction as a collection.static TransactionRetrieves a TaxTransactionobject.static Transactionretrieve(String transaction, RequestOptions options) Retrieves a TaxTransactionobject.static Transactionretrieve(String transaction, TransactionRetrieveParams params, RequestOptions options) Retrieves a TaxTransactionobject.static TransactionRetrieves a TaxTransactionobject.voidsetCreated(Long created) Time at which the object was created.voidsetCurrency(String currency) Three-letter ISO currency code, in lowercase.voidsetCustomer(String customer) The ID of an existing Customer used for the resource.voidsetCustomerDetails(Transaction.CustomerDetails customerDetails) voidUnique identifier for the transaction.voidsetLineItems(TransactionLineItemCollection lineItems) The tax collected or refunded, by line item.voidsetLivemode(Boolean livemode) Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.voidsetMetadata(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.voidString representing the object's type.voidsetPostedAt(Long postedAt) The Unix timestamp representing when the tax liability is assumed or reduced.voidsetReference(String reference) A custom unique identifier, such as 'myOrder_123'.voidsetResponseGetter(StripeResponseGetter responseGetter) The tax type, such asvatorsales_tax.voidsetReversal(Transaction.Reversal reversal) Iftype=reversal, contains information about what was reversed.voidsetShipFromDetails(Transaction.ShipFromDetails shipFromDetails) The details of the ship from location, such as the address.voidsetShippingCost(Transaction.ShippingCost shippingCost) The shipping cost details for the transaction.voidsetTaxDate(Long taxDate) Timestamp of date at which the tax rules and rates in effect applies for the calculation.voidIfreversal, this transaction reverses an earlier transaction.Methods inherited from class com.stripe.net.ApiResourcecheckNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, setGlobalResponseGetter, urlEncode, urlEncodeIdMethods inherited from class com.stripe.model.StripeObjectdeserializeStripeObject, deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toStringMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.stripe.model.StripeActiveObjecttrySetResponseGetter
- 
Constructor Details- 
Transactionpublic Transaction()
 
- 
- 
Method Details- 
createFromCalculationCreates a Tax Transaction from a calculation, if that calculation hasn’t expired. Calculations expire after 90 days.- Throws:
- StripeException
 
- 
createFromCalculationpublic static Transaction createFromCalculation(Map<String, Object> params, RequestOptions options) throws StripeExceptionCreates a Tax Transaction from a calculation, if that calculation hasn’t expired. Calculations expire after 90 days.- Throws:
- StripeException
 
- 
createFromCalculationpublic static Transaction createFromCalculation(TransactionCreateFromCalculationParams params) throws StripeException Creates a Tax Transaction from a calculation, if that calculation hasn’t expired. Calculations expire after 90 days.- Throws:
- StripeException
 
- 
createFromCalculationpublic static Transaction createFromCalculation(TransactionCreateFromCalculationParams params, RequestOptions options) throws StripeException Creates a Tax Transaction from a calculation, if that calculation hasn’t expired. Calculations expire after 90 days.- Throws:
- StripeException
 
- 
createReversalPartially or fully reverses a previously createdTransaction.- Throws:
- StripeException
 
- 
createReversalpublic static Transaction createReversal(Map<String, Object> params, RequestOptions options) throws StripeExceptionPartially or fully reverses a previously createdTransaction.- Throws:
- StripeException
 
- 
createReversalpublic static Transaction createReversal(TransactionCreateReversalParams params) throws StripeException Partially or fully reverses a previously createdTransaction.- Throws:
- StripeException
 
- 
createReversalpublic static Transaction createReversal(TransactionCreateReversalParams params, RequestOptions options) throws StripeException Partially or fully reverses a previously createdTransaction.- Throws:
- StripeException
 
- 
listLineItemsRetrieves the line items of a committed standalone transaction as a collection.- Throws:
- StripeException
 
- 
listLineItemspublic TransactionLineItemCollection listLineItems(Map<String, Object> params) throws StripeExceptionRetrieves the line items of a committed standalone transaction as a collection.- Throws:
- StripeException
 
- 
listLineItemspublic TransactionLineItemCollection listLineItems(Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves the line items of a committed standalone transaction as a collection.- Throws:
- StripeException
 
- 
listLineItemspublic TransactionLineItemCollection listLineItems(TransactionListLineItemsParams params) throws StripeException Retrieves the line items of a committed standalone transaction as a collection.- Throws:
- StripeException
 
- 
listLineItemspublic TransactionLineItemCollection listLineItems(TransactionListLineItemsParams params, RequestOptions options) throws StripeException Retrieves the line items of a committed standalone transaction as a collection.- Throws:
- StripeException
 
- 
retrieveRetrieves a TaxTransactionobject.- Throws:
- StripeException
 
- 
retrievepublic static Transaction retrieve(String transaction, RequestOptions options) throws StripeException Retrieves a TaxTransactionobject.- Throws:
- StripeException
 
- 
retrievepublic static Transaction retrieve(String transaction, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves a TaxTransactionobject.- Throws:
- StripeException
 
- 
retrievepublic static Transaction retrieve(String transaction, TransactionRetrieveParams params, RequestOptions options) throws StripeException Retrieves a TaxTransactionobject.- Throws:
- StripeException
 
- 
setResponseGetterThe tax type, such asvatorsales_tax.One of amusement_tax,communications_tax,gst,hst,igst,jct,lease_tax,pst,qst,retail_delivery_fee,rst,sales_tax,service_tax, orvat.- Specified by:
- setResponseGetterin interface- StripeActiveObject
- Overrides:
- setResponseGetterin class- ApiResource
- Parameters:
- responseGetter- the- StripeResponseGetterinstance to use for making further requests.
 
- 
getCreatedTime at which the object was created. Measured in seconds since the Unix epoch.
- 
getCurrencyThree-letter ISO currency code, in lowercase. Must be a supported currency.
- 
getCustomerThe ID of an existing Customer used for the resource.
- 
getCustomerDetails
- 
getLineItemsThe tax collected or refunded, by line item.
- 
getLivemodeHas the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.
- 
getMetadataSet 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.
- 
getObjectString representing the object's type. Objects of the same type share the same value.Equal to tax.transaction.
- 
getPostedAtThe Unix timestamp representing when the tax liability is assumed or reduced.
- 
getReferenceA custom unique identifier, such as 'myOrder_123'.
- 
getReversalIftype=reversal, contains information about what was reversed.
- 
getShipFromDetailsThe details of the ship from location, such as the address.
- 
getShippingCostThe shipping cost details for the transaction.
- 
getTaxDateTimestamp of date at which the tax rules and rates in effect applies for the calculation.
- 
getTypeIfreversal, this transaction reverses an earlier transaction.One of reversal, ortransaction.
- 
setCreatedTime at which the object was created. Measured in seconds since the Unix epoch.
- 
setCurrencyThree-letter ISO currency code, in lowercase. Must be a supported currency.
- 
setCustomerThe ID of an existing Customer used for the resource.
- 
setCustomerDetails
- 
setIdUnique identifier for the transaction.
- 
setLineItemsThe tax collected or refunded, by line item.
- 
setLivemodeHas the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.
- 
setMetadataSet 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.
- 
setObjectString representing the object's type. Objects of the same type share the same value.Equal to tax.transaction.
- 
setPostedAtThe Unix timestamp representing when the tax liability is assumed or reduced.
- 
setReferenceA custom unique identifier, such as 'myOrder_123'.
- 
setReversalIftype=reversal, contains information about what was reversed.
- 
setShipFromDetailsThe details of the ship from location, such as the address.
- 
setShippingCostThe shipping cost details for the transaction.
- 
setTaxDateTimestamp of date at which the tax rules and rates in effect applies for the calculation.
- 
setTypeIfreversal, this transaction reverses an earlier transaction.One of reversal, ortransaction.
- 
equals
- 
canEqual
- 
hashCodepublic int hashCode()
- 
getIdUnique identifier for the transaction.
 
-