> ## Documentation Index
> Fetch the complete documentation index at: https://spidocs.chargebee.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

# Tax SPI Integration

Chargebee simplifies tax management during checkout sessions and invoice generation throughout the subscription lifecycle by performing the following operations:

### 1. Validating Customer Shipping Address

Validates shipping addresses to ensure accurate tax calculation and product delivery.

### 2. Tax Estimation

Calculates applicable taxes for invoices and their line items.

### 3. Tax Reconciliation

Submits invoice and credit note data to external systems for tax reconciliation.

Chargebee leverages external tax services to execute these operations effectively. These services can be categorized as:

* **Third-Party Tax Service Providers:**\
  APIs provided by third-party tax service vendors for tax calculation and reconciliation.

* **Merchant's In-House Tax Software:**\
  Custom-built tax management solutions used internally by merchants.

## The Role of the Tax Service Adapter App

To connect with external tax services, Chargebee requires a tax service adapter—a bridge facilitating seamless communication between Chargebee and the tax service. This connection is established using the **Tax Service Provider Interface (SPI)**.

## Building a Tax Service Adapter App

To integrate a tax service with Chargebee, you must implement the Tax SPI (you can refer the spec file for this spi [here](https://github.com/chargebee/cb-partner-spi/blob/main/spec/spi/openapi_tax.yml)) by developing a tax service adapter app. This is essential for one of the following scenarios:

* **As a Tax Service Provider:**\
  Connect your tax service with Chargebee to provide seamless tax calculation capabilities to merchants.

* **As a Merchant:**\
  Connect your in-house tax software to Chargebee for tailored tax management.

* **As a System Integrator:**\
  Develop a connector to bridge a tax service provider and Chargebee, enabling integration for merchants.

By implementing the Tax SPI, you enable Chargebee to perform tax-related operations efficiently, ensuring accurate compliance and streamlined workflows.

<img src="https://mintcdn.com/cb/5NA3_g6K23tnaaEn/api-reference/tax-spi/docs/images/tax_spi_workflow.png?fit=max&auto=format&n=5NA3_g6K23tnaaEn&q=85&s=f07cd1bf2b66a869ff1043c5886111cd" alt="How Chargebee interacts with the tax service via the adapter" width="1180" height="620" data-path="api-reference/tax-spi/docs/images/tax_spi_workflow.png" />

## Integrate your Tax Service Adapter App

To integrate your Tax Service Adapter App you can follow the App Onboarding process from [here](../../../app-onboarding/guide).
