Skip to main content
You can calculate tax using Avalara and add your own tax engines using either API Extensions or tax calculator capability. If a user needs a service other than Avalara then the following approaches help to integrate your own tax calculator.

Approach 1: Using estimateTaxes API Extension

This approach is used after creating a new API extension application. The following steps set a tax response using the estimateTaxes API Extension:
  1. Create a new API Extension Application. Refer to the API Extension document.
  2. Use the API Extension function.
  3. The Estimate Taxes (Before) file is shown in the following code block:
The sum of the item.itemTaxContexts elements must equal to orderTax in all the examples given below. This is a requirement for any tax integration in KCCP to be able to correctly calculate the prorated taxes when items are split across shipments.

Approach 2: Using Tax Calculator Capability

This approach helps you to add tax calculator capability through the Kibo commerce application. The following steps add a tax calculator capability:
  1. In Dev Center, navigate to Develop > Applications > Packages > Capabilities.
  2. Click Add Capability.
  3. Search for Tax Calculator in the Add Capability modal and click Ok.\ Add Capability modal with capabilities suggestions
  4. Enter the external URL that receives the tax request and responds with the tax response. It will post to the URL directly and does not add any path.
  5. Select the country you want to enable it for. Press the “Enabled” toggle to enable the calculator. It might take a minute to start working.\ Application page with Enable Application toggle button at right pane.

Rest API Responses

This is what your endpoint will receive:

Example: OrderTaxContext Response

This is what your endpoint should respond with:

Example: Application

This just sends back dummy data for the specific order above, but it does work.
And then in your terminal:
Use the URL that ngrok gives you as your application URL.