Tax Calculation Input
Input representation of the details of the request to calculate tax.
This example shows a tax request for a specified invoice as the reference entity.
This example shows a tax request for a specified credit memo as the reference entity.
| Name | Type | Description | Required or Optional | Available Version |
|---|---|---|---|---|
addresses | Addresses | Address details for tax calculation. | Optional | 62.0 |
currencyIsoCode | String | Currency ISO code that’s used for tax calculation. | Optional | 62.0 |
customerDetails | Customer Details | Customer details for determining the applicable tax. | Optional | 62.0 |
description | String | Description of the tax transaction. | Optional | 62.0 |
documentCode | String | Unique identifier for the tax document. If the documentCode property isn’t specified, the tax engine auto-generates it. | Optional | 62.0 |
effectiveDate | String | Date when the tax rules are applied. If a tax rate changes on a specific date, the effectiveDate property ensures the correct rate is applied based on the transaction’s timing. For credit-based tax callouts, specify the original invoice date. | Optional | 62.0 |
isCommit | Boolean | Indicates whether to submit the transaction to the tax engine for reporting ( true ) or not ( false ). This property value is true for invoices and credit memos with the Posted status. | Optional | 62.0 |
lineItems | Line Item Input [] | Details of the line items for calculating the applicable tax. | Required | 62.0 |
referenceDocumentCode | String | Reference document code. For subsequent transactions such as a credit tax, this property value specifies the original document code. For credit-based tax callouts, specify the original invoice ID. | Optional | 62.0 |
referenceEntityId | String | ID of the related quote, invoice, and other transaction documents. | Optional | 62.0 |
sellerDetails | Seller Details Input | Seller details for tax calculation. | Optional | 62.0 |
shouldVoidTax | Boolean | Indicates whether to void the tax transaction associated with a document that’s mentioned as the referenceDocumentCode property value with taxType property value as Actual and isCommit property value set to true. Keep these considerations in mind when you use this property. | Optional | 65.0 |
taxEngineId | String | ID of the tax engine that’s used to calculate tax. | Required | 62.0 |
taxTransactionType | String | Type of the tax transaction. Valid values are Debit—Increases tax liability for the seller, requiring the seller to pay tax on the transaction, Credit—Decreases tax liability for the seller, resulting in a tax refund for the seller, or Void—Reserved for internal use. The default value is Debit. | Optional | 62.0 |
taxType | String | Type of the tax. Valid values are Actual—Exact tax amount that’s calculated based on actual sales or Estimated— Estimated tax amount, which is adjusted later to match actual tax calculations. For draft invoices and quote records, the tax type is marked as Estimated. After draft invoices are posted and the status changes to Posted, the tax type is updated to Actual. Similarly, when a quote record is finalized and converted into an actual order, the tax type is also updated to Actual. | Required | 62.0 |
transactionDate | String | Date of the transaction that appears on the invoice, order, and other transaction documents. | Required | 62.0 |
Supported values:
- If the
shouldVoidTaxproperty value is set totrue, then the operation returns a response withdocumentCodeproperty value updated toreferenceDocumentCodeproperty value that was originally sent in the request payload. The response also includes thetaxTransactionTypeproperty value asVoid. This indicates that the document specified in thereferenceDocumentCodeproperty value is voided. - If document is locked or you can’t void the tax transaction for any reason, then you can use the Tax Calculation request to perform another transaction such as a Credit Tax request. In this scenario, the response includes the
documentCodeproperty value that was sent in the request payload. - If the document that’s mentioned in the
referenceDocumentCodeproperty value isn’t available in the tax engine, then an error response occurs with ResultCode value asReferenceDocumentCodeMissing.