Calculates tax for the provided line items.
Wix calls this method whenever tax needs to be recalculated on a site, for example when a site visitor views their cart, begins checkout, or changes cart contents. Wix groups the line items by the tax calculator bound to each item's tax region and calls the corresponding provider.
Wix uses the returned tax breakdown to display tax on the cart and checkout pages and to calculate the order total.
Calculate tax for each line item based on the tax region in lineItems.taxRegionId and the tax group in lineItems.taxGroupId. The response currency must match the request currency, otherwise the response is invalid. Return:
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.Error handling:* If your implementation returns an error or times out, Wix falls back to the Wix manual tax calculator. If that also fails, the order proceeds with zero tax and a calculation error. A resolved buyer exemption bypasses third-party providers and forces the Wix manual calculator.