calculateTax( )


Important: This is a handler function. Implement it only as part of the service plugin.


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.
Method Declaration
Copy
Method Parameters
payloadCalculateTaxEnvelope
Returns
Return Type:CalculateTaxResponse | Promise<CalculateTaxResponse>
Did this help?