Sovos Docs

Tax calculation endpoints

About

The tax calculation endpoints are used to calculate sales and use tax for each line item on a document based on product characteristics, shipping addresses, and applicable exemptions. The number of line items determines your billing, as each line item generates one tax calculation.

Tax Determination supports three calculation modes:

Quote (Default)
Calculates tax without saving to the Sovos database. Use for estimates during checkout or quote generation.
Commit
Calculates tax and saves the transaction to the Sovos database for tax reporting and analytics.
Pending
Calculates tax and temporarily holds the transaction for future processing. Pending transactions must be committed or deleted later. Rarely used.

A document may receive multiple tax calculations throughout its life cycle. For example, calculate taxes in quote mode to display estimated amounts in a shopping cart, then calculate again in commit mode at checkout to record the final transaction.

Primary endpoints:

/calcTax/doc
Calculates tax for each line item on an invoice, bill, or purchase order
/calcTax/line
Calculates tax for a specific line item within a document
/calcTax/force
Saves a document with predefined tax amounts

Example use case

To calculate and display the estimated taxes for a transaction before a sales order is finalized, send a POST.../calcTax/doc request with the isAudit flag set to false. This will calculate the applicable tax obligations without permanently recording the transaction for reporting, filing, or remittance purposes.

When a sales order is finalized and payment for an invoice is settled, send a POST.../calcTax/doc request with the isAudit flag set to true to report the actual tax collected and permanently record the transaction to Tax Determination.