Calculates tax for the provided line items.
Tax is calculated for each line item based on the tax region
in lineItems.taxRegionId
and the tax group in lineItems.taxGroupId
.
The breakdown of calculated tax returned, includes:
taxSummary
: The overall total tax calculated.lineItemTaxDetails.taxBreakdown
: The tax calculated for each line item in each jurisdiction.lineItemTaxDetails.taxSummary
: The total tax calculated for each line item.calculateTax()
When you add the Tax Calculation service plugin,
a folder is automatically added to your site. Use the .js
file in the folder to write the code to determine how to calculate tax for an order.
Order information to calculate tax for.
Metadata about the request.