# Set up taxes: custom taxes and external integrations

Source: https://dev.arcxp.com/subscriptions/sales/configure/set-up-taxes-custom-taxes-and-external-integrations/

Arc XP Subscriptions offers a versatile range of tax calculators to meet various needs:

`Zero Tax`: Designed for scenarios where no tax is applicable, this option streamlines the process for businesses or transactions operating under such conditions. This is the default setting for the tax.

`Custom Tax`: Provides the flexibility to accommodate diverse tax regulations and requirements, ensuring compliance across multiple jurisdictions.

`Taxamo Integration`: Enables seamless integration with [Taxamo](https://integrate.taxamo.com/) to automate tax compliance for digital sales.

`Stripe Tax`: Enables seamless integration with [Stripe Tax](https://docs.stripe.com/tax) for streamlined tax compliance.

Taxamo and Stripe Tax are services that automate tax compliance for digital sales. These integrations simplify the management of tax obligations, helping businesses efficiently handle cross-border transactions.

Together, these tools ensure that businesses can accurately calculate taxes according to their specific circumstances, enhancing efficiency and compliance.

## Tax Admin Guide

The Tax setup is available in the Settings tab under the Sales section. From there you can select `Custom`, `Taxamo`, `Stripe` as your tax provider.

![set-up-taxes](https://dev.arcxp.com/images/subscriptions/sales/configure/set-up-taxes-custom-taxes-and-external-integrations/set-up-taxes.png)

Once you have set up any of these tax providers, you cannot change the selected tax provider.

### Custom Tax Admin Guide

Custom taxes are limited to 5 countries and 20 custom tax rules. For example, you could have 5 countries each with 4 rules, a single country with 20 rules, or any combination in between.

![set-up-taxes-custom-taxes-and-external-integrations-1](https://dev.arcxp.com/images/subscriptions/sales/configure/set-up-taxes-custom-taxes-and-external-integrations/set-up-taxes-custom-taxes-and-external-integrations-1.png)

> **Note:**
> 
> Once you begin adding custom tax rates you cannot switch to another tax calculation method without help from Arc services.

![set-up-taxes-custom-taxes-and-external-integrations-2](https://dev.arcxp.com/images/subscriptions/sales/configure/set-up-taxes-custom-taxes-and-external-integrations/set-up-taxes-custom-taxes-and-external-integrations-2.png)

You must first add a Country tax rate that will become the default rate for cases where specific regions have not been set up.

![set-up-taxes-custom-taxes-and-external-integrations-3](https://dev.arcxp.com/images/subscriptions/sales/configure/set-up-taxes-custom-taxes-and-external-integrations/set-up-taxes-custom-taxes-and-external-integrations-3.png)

Then regional rates can be added for that Country.

![set-up-taxes-custom-taxes-and-external-integrations-4](https://dev.arcxp.com/images/subscriptions/sales/configure/set-up-taxes-custom-taxes-and-external-integrations/set-up-taxes-custom-taxes-and-external-integrations-4.png)

The custom tax rates overview screen has options for editing or deleting the regional rates. The country rate can only be deleted after all the regions have been removed.

![set-up-taxes-custom-taxes-and-external-integrations-5](https://dev.arcxp.com/images/subscriptions/sales/configure/set-up-taxes-custom-taxes-and-external-integrations/set-up-taxes-custom-taxes-and-external-integrations-5.png)

### Taxamo

To use Taxamo for your tax calculations, you need to establish a relationship with Taxamo to obtain your unique token identification information. This information will be required when contacting Taxamo for tax calculations. Once you have your Taxamo credentials (i.e., `Public Token` and `Private Token`), include them in the Settings section of the Admin panel to enable this option.

After adding Taxamo to your account, the tax calculations and amounts will automatically be included during checkout.

![set-up-taxes](https://dev.arcxp.com/images/subscriptions/sales/configure/set-up-taxes-custom-taxes-and-external-integrations/set-up-taxes-taxamo.png)

### Stripe Tax

To use Stripe Tax for your tax calculations, you need to establish a relationship with Stripe. In the [Stripe Tax developer console](#stripe-tax-developer-console) section, you will find additional details about the required configurations in the Stripe Developer Console, including instructions on how to retrieve the `Secret key` and `product code` needed to configure our settings and start collecting payments.

![set-up-taxes](https://dev.arcxp.com/images/subscriptions/sales/configure/set-up-taxes-custom-taxes-and-external-integrations/set-up-taxes-stripe-tax.png)

> **Tip:**
> 
> You can switch to Stripe Tax as your tax provider at any time, and Arc XP Subscriptions will handle the transition for your organization. However, please note that tax calculations for renewals will rely on the billing addresses already collected. If a billing address is invalid or missing, Stripe will not calculate taxes, and Arc XP will default the tax amount to zero rather than causing the renewal to fail. 

### Tax exempt customers

Tax exempt status can be added to a customers account through their subscription billing address when using Taxamo.

## Tax Inclusive & Exclusive of Price

By default prices are **exclusive** of tax, during checkout any taxes that are being charged will be in addition to the price. You do have the ability to make prices inclusive of the tax. This is available through a checkbox in the Tax Format section of each Price. See [Set up products and prices](https://dev.arcxp.com/subscriptions/sales/configure/set-up-products-and-prices/#create-price) for details.

Once a price has been published the tax format selection cannot be changed.

## Sales tax calculation during checkout

Tax is automatically calculated and added to an order during checkout when using the APIs or SDK. The amount of tax that is added to the order is based on the tax calculator that has been selected in the Settings admin, if no selection has been made then zero tax will be applied.

Tax inclusive or exclusive will also automatically be applied to the order or each price.

## Stripe Tax developer console

There are certain settings in the **Stripe Tax developer console** that need to be completed before you can start collecting taxes using Stripe Tax.

The basic settings required in the Stripe Tax Developer Console are described below:

- Set up the address where your bussiness is located and register the locations:

Once on the [dashboard](https://dashboard.stripe.com/test/dashboard) on the left side, under the `products` section, select `Tax`. There, under the `Overview` tab you will need to register the address where your bussines is located.

![Bussiness location](https://dev.arcxp.com/images/subscriptions/sales/configure/set-up-taxes-custom-taxes-and-external-integrations/stripe-tax-address-bussiness.png)

Additionally, you will need to identify each country, state, and/or province where you have tax obligations and register with the local tax authority to collect taxes for each obligation. To register a country, state, and/or province, navigate to the Registrations tab. By clicking on Add Registration, you can select the region, country, state, and/or province and customize several settings based on the tax regulations for the selected location.

We strongly recommend reviewing the [Set up Stripe Tax](https://docs.stripe.com/tax/set-up) documentation for additional details.

![Locations to apply taxes](https://dev.arcxp.com/images/subscriptions/sales/configure/set-up-taxes-custom-taxes-and-external-integrations/stripe-tax-locations.png)

- Set the product tax codes to determine the tax rate for individual products:

A juridiction can charge one tax rate for products in the **Digital Magazines/Periodicals - subscription tangible and digital** category and a different tax rate for products in the **Digital Newspapers - viewable only - subscription - with conditional rights** category. Please visit [Product tax codes](https://docs.stripe.com/tax/tax-codes) guide and select the appropiate TAX CODE based on your bussiness. The tax code (e.g., `txcd_xxxxxxxx`) is te one you will need to enter on the Arc XP Admin tool when setting up the Stripe tax integration.

Once you know the `TAX CODE` and its corresponding `CATEGORY NAME`, go to the [dashboard](https://dashboard.stripe.com/test/dashboard). On the upper-right side, click on the `Settings` icon, select the `Settings` option, and then, click on `Tax`.

![Locations to apply taxes](https://dev.arcxp.com/images/subscriptions/sales/configure/set-up-taxes-custom-taxes-and-external-integrations/stripe-tax-settings.png)

![Locations to apply taxes](https://dev.arcxp.com/images/subscriptions/sales/configure/set-up-taxes-custom-taxes-and-external-integrations/stripe-tax-settings-tax.png)

In the Tax section, you can select the `CATEGORY NAME` from the dropdown menu for the `Preset Product Tax Code`, based on the choice you made earlier.

![Locations to apply taxes](https://dev.arcxp.com/images/subscriptions/sales/configure/set-up-taxes-custom-taxes-and-external-integrations/stripe-tax-product-tax-code.png)

Now that you have completed the basic configuration on the Stripe developer console and obtained the `product code` required to enable the Stripe tax integration on Arc XP Subscriptions, you may also need to retrieve the `Secret key` from Stripe.

To find the `Secret key`, navigate to the left-hand menu click on `Developers`, and then go to `API Keys`. The `Secret key` will be listed there.

![Locations to apply taxes](https://dev.arcxp.com/images/subscriptions/sales/configure/set-up-taxes-custom-taxes-and-external-integrations/stripe-tax-secret-key.png)

> **Note:**
> 
> Every time a purchase is made using one of the locations registered as part of the billing address, you will see a transaction in your Stripe Tax Developer Console under the `Transactions` tab.
> 
> ![Locations to apply taxes](https://dev.arcxp.com/images/subscriptions/sales/configure/set-up-taxes-custom-taxes-and-external-integrations/stripe-tax-transactions.png)
> 
> Please note that the transaction may take up to 10 minutes to appear. This delay occurs due to the process involved: when items are added to the cart, Stripe calculates the taxes and informs us how much to charge. However, at that stage, we don’t know if the purchase will be completed successfully. As a result, our system initially creates a temporary tax calculation, which switches to a final tax calculation once the payment is successfully completed (persisting the tax calculation).
> 
> When adding items to the cart (POST /sales/public/v1/cart/item), you may encounter errors from the BE indicating an issue with the billing address. Some of these error codes and messages are provided directly by Stripe Tax and point to problems with the billing address.
> 
> ```json
> {
>  "httpStatus": 400,
>  "code": 300520,
>  "message": "For address with country:US, you must provide postal_code"
> }
> ```
