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

# VAT

> How to set VAT rates for your shop, assign them to products and costs, calculate them by country, and handle exemptions.

In this chapter, you learn how to define the desired VAT rates for your shop and then use them.

> [!WARNING]
>
> Consult your tax advisor to clarify the regulations that apply to your shop and mail-order business. There are product-, country-, and revenue-dependent rules that may apply to your business.

The page is divided into four parts. First, the assignment of VAT, that is, defining the rates and mapping them to products and costs. Then VAT calculations with output, country dependency, and exemptions. Followed by two special functions. And finally the earlier integration, which is still supported, along with the migration path.

## Assigning VAT

### General VAT definition in the shop

As part of the One-Stop-Shop procedure, we offer you a global, delivery-country-dependent VAT rate file that you can use for your shops. This is used to calculate the VAT shown in gross shops depending on the selected delivery country. In net shops, it is the VAT added on top accordingly.

Alternatively, you can define the VAT rates per shop or subshop and delivery country yourself in your own file.

> [!NOTE]
>
> * In rare cases, there are products with different VAT classes in different countries. We are happy to support you with the individual handling of such cases.
> * Please check with your ERP provider whether this procedure is supported by it.

#### When to use the global file and when to use an individual one

As a rule, the global WEBSALE VAT rate file can only be used for shops and subshops that have the following setup:

| Index | VAT rate |
| - | - |
| 1 | Standard rate |
| 2 | Reduced rate |

Shops that have an additional tax rate can no longer use the global WEBSALE VAT rate file and require an individual VAT rate file. This is the case, for example, when the setup looks like this:

| Index | VAT rate |
| - | - |
| 1 | Standard rate |
| 2 | Reduced rate |
| 3 | Tax-exempt |

An individual VAT rate file is also required if the standard tax rates are used but numbered differently:

| Index | VAT rate |
| - | - |
| 5 | Standard rate |
| 6 | Reduced rate |

#### Using the global WEBSALE VAT rate file

WEBSALE provides a global VAT rate file for all EU countries. This file contains 4 tax rates per EU country:

* Standard tax rate for most goods and services, for example Germany with 19 percent
* Reduced tax rate for certain goods and services, for example Germany with 7 percent
* Strongly reduced tax rate
* Special tax rate

All WEBSALE shops access this file. Adjusting it for an individual shop or subshop is therefore not possible.

> [accordion] Global VAT rate file with all EU countries (as of 2024-01-01)
>
> ```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
> <AUT>
> 1=20
> 2=10
> 3=13
> 4=
> </AUT>
> <BEL>
> 1=21
> 2=6
> 3=13
> 4=
> </BEL>
> <BGR>
> 1=20
> 2=9
> 3=
> 4=
> </BGR>
> <CYP>
> 1=19
> 2=5
> 3=9
> 4=3
> </CYP>
> <CZE>
> 1=21
> 2=12
> 3=
> 4=
> </CZE>
> <DEU>
> 1=19
> 2=7
> 3=
> 4=
> </DEU>
> <DNK>
> 1=25
> 2=
> 3=
> 4=
> </DNK>
> <EST>
> 1=22
> 2=9
> 3=
> 4=
> </EST>
> <GRC>
> 1=24
> 2=6
> 3=13
> 4=
> </GRC>
> <ESP>
> 1=21
> 2=10
> 3=
> 4=4
> </ESP>
> <FIN>
> 1=24
> 2=10
> 3=14
> 4=
> </FIN>
> <FRA>
> 1=20
> 2=5.5
> 3=10
> 4=2.1
> </FRA>
> <HRV>
> 1=25
> 2=5
> 3=13
> 4=
> </HRV>
> <HUN>
> 1=27
> 2=5
> 3=18
> 4=
> </HUN>
> <IRL>
> 1=23
> 2=9
> 3=13.5
> 4=4.8
> </IRL>
> <ITA>
> 1=22
> 2=5
> 3=10
> 4=4
> </ITA>
> <LTU>
> 1=21
> 2=5
> 3=9
> 4=
> </LTU>
> <LUX>
> 1=17
> 2=8
> 3=
> 4=3
> </LUX>
> <LVA>
> 1=21
> 2=12
> 3=5
> 4=
> </LVA>
> <MLT>
> 1=18
> 2=5
> 3=7
> 4=
> </MLT>
> <NLD>
> 1=21
> 2=9
> 3=
> 4=
> </NLD>
> <POL>
> 1=23
> 2=5
> 3=8
> 4=
> </POL>
> <PRT>
> 1=23
> 2=6
> 3=13
> 4=
> </PRT>
> <ROM>
> 1=19
> 2=5
> 3=9
> 4=
> </ROM>
> <ROU>
> 1=19
> 2=5
> 3=9
> 4=
> </ROU>
> <SWE>
> 1=25
> 2=6
> 3=12
> 4=
> </SWE>
> <SVN>
> 1=22
> 2=9.5
> 3=
> 4=
> </SVN>
> <SVK>
> 1=20
> 2=10
> 3=
> 4=
> </SVK>
> ```

> [!WARNING]
>
> You can use the global VAT rate file without restrictions.
>
> If you use a VAT index for which no value has been specified, the highest VAT rate for the respective country is automatically used.

**Step 1: Activation.** No activation by WEBSALE is required.

**Step 2: Extending the shop configuration.** In the `VAT` section of your shop configuration `shop.config`, add the following parameters to use the VAT rate file provided by WEBSALE. In `VATRateDefinition-ByDelivCountry-StandardISO`, enter the ISO code of the desired country whose VAT rate is to be applied by default if the buyer has not yet selected another delivery country.

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<VAT>
...
   VATRateDefinition-Mode                       = ByDelivCountry-Managed
   VATRateDefinition-ByDelivCountry-StandardISO = DEU
...
</VAT>
```

**Step 3: Extending templates (optional).** To check the configuration, you can insert the following tags on any templates. In general test mode, they display the default configured country for VAT calculation as well as the currently used country.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
...
{ST-TestMode}

{WS-VATRateDefinitionISO-Standard}
   Standard ISO code: ~WS-VATRateDefinitionISO-Standard~
{/WS-VATRateDefinitionISO-Standard}

{WS-VATRateDefinitionISO-Used}
   Currently used ISO code: ~WS-VATRateDefinitionISO-Used~
{/WS-VATRateDefinitionISO-Used}

{/ST-TestMode}
...
```

Reference: Section VAT

Reference: WS-VATRateDefinitionISO-Standard

Reference: WS-VATRateDefinitionISO-Used&#x20;

> [!NOTE]
>
> If VAT rates change in the countries of the EU, they are adjusted accordingly by WEBSALE.

Once you have completed all steps, the function is fully integrated.

#### Using an individual VAT rate file

Alternatively, you can define the VAT rates yourself with your own file.

**Step 1: Activation.** No activation by WEBSALE is required.

**Step 2: Create an individual VAT rate file.** If you want to use your own VAT rate file, you must create a new config file in the online service area, within the Configuration service, under the global configurations.

In this file, you need one section per delivery country with the three-letter ISO country code. Enter the indexes for the different VAT rates of the countries, up to a maximum of 15 per country, and assign the desired VAT rates without a percent sign. Decimal places must be separated from the integer part by a period, that is 19 for 19 percent VAT and 7.7 for 7.7 percent VAT.

Note the following required structure of the file and its sections:

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<AUT>
1=20
2=10
3=13
4=
</AUT>

<FRA>
1=20
2=5.5
3=10
4=2.1
</FRA>
...
```

A complete template with all EU countries can be found above in [Using the global WEBSALE VAT rate file](#using-the-global-websale-vat-rate-file).

> [!NOTE]
>
> Please note that VAT rates can change. Current tax rates can be found in the overview of VAT rates in EU countries.&#x20;

**Step 3: Extending the shop configuration.** In the `VAT` section, add the `VATRateDefinition-Mode` parameter with the value `ByDelivCountry-Individual`, and enter the file name assigned in the online service area in the `VATRateDefinition-ByDelivCountry-DefinitionFile` parameter. In `VATRateDefinition-ByDelivCountry-StandardISO`, enter the ISO code of the desired country whose VAT rate is to be applied by default if the buyer has not yet selected another delivery country.

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<VAT>
...
   VATRateDefinition-Mode                          = ByDelivCountry-Individual
   VATRateDefinition-ByDelivCountry-DefinitionFile = vatrates.config
   VATRateDefinition-ByDelivCountry-StandardISO    = DEU
...
</VAT>
```

**Step 4: Extending templates (optional).** Use the same control tags as with the global file, see Step 3 in the previous section.

Reference: Section VAT

Once you have completed all steps, the function is fully integrated.

### Controlling VAT rate changes automatically

If you use the global WEBSALE VAT rate file, changes to the VAT rates in the EU countries are adjusted directly and automatically by WEBSALE.

If you use an individual VAT rate file, we recommend using the CampaignControl. With CampaignControl, you can plan and execute time-controlled changes to your shop configuration `shop.config`.

Pointer: CampaignControl&#x20;

### VAT for products

As described under General VAT definition in the shop, each product is assigned a VAT index. For each index, the VAT rate stored in the global or individual VAT file applies. Technically, the VAT index is entered in the product data field `VATIndex` or transferred to the shop system from the ERP in this field.

Example: Under General VAT definition in the shop, we assigned a VAT rate of 19 percent to index 1 and a VAT rate of 7 percent to index 2.

If a VAT rate of 19 percent is to be applied to a product in the shop, the value 1 must be entered in the product data field `VATIndex` in the ERP. For products for which the VAT rate of 7 percent is to apply, the value 2 must be entered in the product data field `VATIndex`.

### VAT for shipping costs

For calculating VAT on shipping costs, WEBSALE V8s supports two options, dynamic and static calculation. Which calculation method is to be applied in the shop must be defined by the mail-order business. The prerequisite is the definition of VAT rates.

#### Dynamic calculation (default)

By default, VAT on shipping costs is calculated dynamically. The tax rate applied to the shipping costs is thus determined by the products in the cart. If only products with the same tax rate are in the cart, their tax rate is also applied to the shipping costs. If products with different VAT rates are in the cart, a subtotal is formed for all products with the same VAT rate. The tax rate of the highest subtotal then determines the VAT rate for the shipping costs.

You set the calculation method in the shop configuration `shop.config` in the `<VAT>` section:

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<VAT>
   ...
   DeliveryVATType = dynamic
   ...
</VAT>
```

#### Static calculation

Alternatively, a static calculation of VAT on shipping costs is also possible. In this case, the same VAT rate is always used.

To do this, in the shop configuration `shop.config` in the `<VAT>` section, the value `static` must be specified in the `DeliveryVATType` parameter and a VAT index must be specified in the `DeliveryVATRate` parameter. As with products, no VAT rate is assigned to this parameter, but one of the VAT indexes.

Example: For shipping costs, the VAT rate of 19 percent stored under index 1 should always apply.

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<VAT>
   ...
   DeliveryVATType = static
   DeliveryVATRate = 1
   ...
</VAT>
```

Reference: Section VAT

### VAT for further costs

For calculating VAT on all other costs, for example payment costs, WEBSALE V8s also supports the two options like for shipping costs, dynamic and static calculation. Which calculation method is to be applied in the shop must be defined by the mail-order business. The prerequisite is the definition of VAT rates.

#### Static calculation (default)

By default, VAT on additional costs is calculated statically. This means that the same VAT rate is always used. You set the calculation method in the shop configuration `shop.config` in the `<VAT>` section:

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<VAT>
   ...
   DefaultVATRate   = 1
   ...
</VAT>
```

In the separate sections for the additional costs, the parameter `VATType` must then have the value `static`. Some additional costs also have their own parameter `VATRate-Value` in their section. If this is the case, the desired VAT index must be entered here. If entered there, the general value of the `DefaultVATRate` parameter in the `<VAT>` section does not apply to these costs.

Example: A static VAT calculation is to be applied to gift wrapping. The gift wrapping section has its own parameter for assigning the VAT index.

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<GiftPackage>
   ...
   VATRate-Value   = 1
   VATType         = static
   ...
</GiftPackage>
```

#### Dynamic calculation

The calculation of VAT on additional costs can also be dynamic. The tax rate to be calculated for the additional costs is then determined by the products in the cart. If only products with the same tax rate are in the cart, their tax rate is also applied to the additional costs. If products with different VAT rates are in the cart, a subtotal is formed for all products with the same VAT rate. The tax rate of the highest subtotal then determines the VAT rate for the additional costs.

In the separate sections for the additional costs, the parameter `VATType` must then have the value `dynamic`.

Example: A dynamic VAT calculation is to be applied to gift wrapping.

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<GiftPackage>
   ...
   VATType         = dynamic
   ...
</GiftPackage>
```

The sections with their own VAT parameters are:

Reference: Section BonusPoints

Reference: Section ClimateNeutral

Reference: Section CustomerSubvention

Reference: Section GiftPackage

Reference: Section OrderOptions1…5

Reference: Section TrustedShopsAdvList

Reference: Section Voucher-Txt&#x20;

## VAT calculations

For a correct VAT calculation, you must have defined and assigned the corresponding VAT indexes for products and costs, as well as the associated VAT rates in the shop configuration `shop.config`.

### Displaying tax amounts

#### Display with gross or net price

Usually, in B2C shops, that is shops selling to end customers, gross prices must be shown. In shops for corporate customers (B2B), it is more common to show net prices. As a basic setting for a correct VAT calculation in your shop, you must therefore define whether your prices and costs are stored including VAT or excluding VAT, and are to be displayed and shown accordingly in the shop.

**Step 1: Defining prices and costs as gross or net values.** In the `<VAT>` section of your shop configuration `shop.config`, you define whether the prices and costs in your shop are gross or net values.

Example: Your shop should be a gross shop, that is, your prices and costs are inclusive of VAT.

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<VAT>
   ...
   ProductPrices = gross
   ...
</VAT>
```

Reference: Section VAT

**Step 2: Placing texts on the templates.** We recommend placing the notice "including VAT" or "plus VAT" near your prices and costs.

Example: The notice "including VAT" should be displayed next to the product price.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
~PR-Price~ ~WS-CurrencySymbol~ *

* All prices and costs include VAT
```

Reference: PR-Price

Reference: WS-CurrencySymbol&#x20;

#### Displaying amounts in the cart (optional)

Using the BASKET-VATRates tags, all possible values and amounts can be output for each VAT rate involved in the cart: VAT rate and amount, goods value and order value both gross and net. Display in an alternative currency is also possible.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{BASKET-VATRates-Data}
   Number of different tax rates: ~BASKET-VATRates-Data~<br>
   {@BASKET-VATRates-Data}
      Tax rate: ~BASKET-VATRates-Rate~ %<br>
      Goods value: ~BASKET-VATRates-SubTotal~ ~WS-CurrencySymbol~<br>
      Goods value net: ~BASKET-VATRates-SubTotalNet~ ~WS-CurrencySymbol~<br>
      Goods value gross: ~BASKET-VATRates-SubTotalGross~ ~WS-CurrencySymbol~<br>
      Order value: ~BASKET-VATRates-Total~ ~WS-CurrencySymbol~<br>
      Order value net: ~BASKET-VATRates-TotalNet~ ~WS-CurrencySymbol~<br>
      Order value gross: ~BASKET-VATRates-TotalGross~ ~WS-CurrencySymbol~<br>
      VAT amount: ~BASKET-VATRates-VAT~ ~WS-CurrencySymbol~<br>
   {/@BASKET-VATRates-Data}
{/BASKET-VATRates-Data}
```

### Country-dependent VAT calculation

According to tax legislation, in most countries outside the EU community area, the third countries, an exemption from VAT obligation applies to companies and private individuals.

Upon request, WEBSALE V8s supports the TaxJar service for determining taxes incurred in the USA. Your WEBSALE contact will be happy to provide more information.

Since the number of countries for which a tax exemption applies is very large, WEBSALE V8s only requires the much smaller list of countries for which the tax obligation applies to be stored, to simplify the work. You store this list in your shop configuration `shop.config`.

**Step 1: Defining the basis for determination.** You must first define whether the billing and delivery country or only the delivery country should be used to determine the VAT calculation or exemption.

> [!WARNING]
>
> The usual setting is that only the delivery country is considered in order to deduct German VAT. However, as a mail-order business, you must always review and specify this setting.

In the `<VAT>` section of your shop configuration `shop.config`, you use the `TaxFreeIgnoreBillAddr` parameter to define whether the billing country is disregarded, that is, only the delivery country is considered.

Example: For determining a possible VAT exemption, the billing country should be ignored and only the delivery country should be considered.

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<VAT>
   ...
   TaxFreeIgnoreBillAddr   = yes
   ...
</VAT>
```

If the billing country is also to be considered, the value `no` must be entered.

**Step 2: Entering the countries in the shop configuration.** In the `TaxCountries` parameter in the `<VAT>` section of your shop configuration `shop.config`, store a comma-separated list of all countries for which VAT is to be calculated. As a rule, these are all countries belonging to the EU community area.

Example: VAT should be calculated for all countries of the EU community area.

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<VAT>
   ...
   TaxCountries = BEL,BGR,DNK,DEU,EST,FIN,FRA,GRC,IRL,ITA,HRV,LVA,LTU,LUX,MLI,NLD,AUT,POL,PRT,ROU,SWE,SVK,SVN,ESP,CZE,HUN,GBR,CYP
   ...
</VAT>
```

> [!WARNING]
>
> If you do not store a list, the shop calculates VAT for all countries.
>
> Which countries you store for a shop must be specified by you as the mail-order business in consultation with the tax advisor.

Reference: Section VAT

**Step 3: Wrapping texts on templates.** Usually, you point out the VAT calculation to the buyer in the shop, for example in the cart, with the texts "Includes German VAT" or "Plus German VAT". To display the texts correctly depending on whether the VAT calculation is performed or not, you should wrap them on the corresponding templates as follows:

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{ST-TaxFree}
   Area that is displayed when no VAT calculation is performed, for example third countries.
{/ST-TaxFree}
{!ST-TaxFree}
   Area that is displayed when a VAT calculation is performed.
{/!ST-TaxFree}
```

Reference: ST-TaxFree&#x20;

### Possible VAT exemption for delivery to the EU community area

Under certain circumstances, for example based on annual revenue, VAT can also be waived for deliveries to corporate customers in EU countries. The underlying tax regulation, in simplified form, looks as follows:

![Mwstgrafik](https://mintcdn.com/websaleag-44ee7ea6/skgEiyBpkjLxNR4u/images/mwstgrafik.png?fit=max\&auto=format\&n=skgEiyBpkjLxNR4u\&q=85\&s=94a1440e099ca56ae82fdc8c2c3b1ece)

Or, expressed in words:

* All deliveries to private customers within the EU community area are taxable.
* All deliveries to corporate customers within the rest of the EU community area, that is EU except domestic, are tax-free. This is referred to as intra-community trade.
* Deliveries to corporate and private customers in most countries outside the EU community area, that is third countries, are usually tax-free. This is referred to as tax-free export delivery.

The delivery country can be considered as the exemption condition. Alternatively, both the billing and delivery country can be considered, see Country-dependent VAT calculation.

In your shop configuration `shop.config`, you can store a list of the EU countries in which corporate customers should be exempt from VAT. In principle, this list must never contain your own country, because domestic tax obligation applies.

**Prerequisite.** A country-dependent VAT exemption for corporate customers is only possible if the buyer has entered a syntactically correct VAT identification number in their address data in the shop. Therefore, please provide this field when requesting the delivery address data and, if applicable, the billing address data.

Reference: Requesting a VAT identification number (VAT ID)&#x20;

**Step 1: Defining the basis for determination.** You must define whether the billing and delivery country or only the delivery country should be used to determine the VAT calculation or exemption, see Country-dependent VAT calculation.

Example: Only the delivery country should be considered for the determination.

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<VAT>
   ...
   TaxFreeIgnoreBillAddr   = yes
   ...
</VAT>
```

**Step 2: Entering the countries in the shop configuration.** Make sure that the `TaxCountries` parameter in the `<VAT>` section of your shop configuration `shop.config` contains a comma-separated list of all countries for which VAT is to be calculated in general. Then store the specific countries for corporate customers in which no VAT is to be calculated in the `TaxIDCountries` parameter.

Example: No VAT should be calculated for all countries of the rest of the EU community area. Third countries do not need to be listed, as they are already excluded by the country list in the `TaxCountries` parameter.

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<VAT>
   ...
   TaxCountries    = BEL,BGR,DNK,DEU,EST,FIN,FRA,GRC,IRL,ITA,HRV,LVA,LTU,LUX,MLI,NLD,AUT,POL,PRT,ROU,SWE,SVK,SVN,ESP,CZE,HUN,GBR,CYP
   TaxIDCountries  = BEL,BGR,DNK,EST,FIN,FRA,GRC,IRL,ITA,HRV,LVA,LTU,LUX,MLI,NLD,AUT,POL,PRT,ROU,SWE,SVK,SVN,ESP,CZE,HUN,GBR,CYP
   ...
</VAT>
```

> [!WARNING]
>
> If you do not store a list in `TaxCountries`, the shop calculates VAT for all countries.
>
> Which countries you store for a shop must be specified by you as the mail-order business in consultation with the tax advisor.

**Step 3: Setting VAT exemption for all costs in the shop.** If a corporate customer's delivery is tax-exempt based on the selected country, it must be defined in the general order conditions that this tax exemption applies to all costs incurred, for example shipping costs and payment costs. Set the `TaxFreeForAll-Allow` parameter in the `OrderConditions` section of your shop configuration `shop.config` to `yes` for this purpose.

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<OrderConditions>
   ...
   TaxFreeForAll-Allow   = yes
   ...
</OrderConditions>
```

Reference: Section OrderConditions&#x20;

**Step 4: Wrapping texts on templates.** Usually, you point out the VAT calculation to your customers in the shop with the texts "including VAT" or "plus VAT". To display the texts correctly depending on whether the VAT calculation is performed or not, wrap them on the corresponding templates as shown in Step 3 of the country-dependent VAT calculation.

### VAT calculation for digital goods

Since the introduction of the One-Stop-Shop procedure, no adjustment is required for the sale of digital goods. By using the global VAT rate file, the delivery-country-specific tax rate is always used per delivery country.

The only exception would be if a special tax index is transferred for digital goods via the ERP. In that case, an individual VAT rate file must be created that is extended by the entries for the special tax index, for example tax index 10 for digital goods.

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<AUT>
1=20
2=10
10 = 20 #VAT index specifically for digital products
</AUT>

<BEL>
1=21
2=6
10 = 21 #VAT index specifically for digital products
</BEL>

<BGR>
1=20
2=9
10 = 20 #VAT index specifically for digital products
</BGR>
```

## Special functions

### Exempting buyers from VAT

In the customer data, buyers can be flagged as "internal settlement", for example for settlement between customers or companies within a corporate group. If this flag is set in the customer data, VAT is always deducted in full.

This flag can only be set in the online service area with additional authentication and password entry. You can obtain further information from your WEBSALE contact.

Reference: A-InterCompanyCustomer&#x20;

### VAT exemption with a differing delivery address containing a VAT ID

You can define whether the determination of the VAT exemption should depend on the VAT ID of the delivery address. You make this setting in the `<VAT>` section of the shop configuration `shop.config` with the following parameters:

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<VAT>
   ...
   TaxFree4TaxID-DeliveryDependent   = yes
   TaxFree4TaxID-DelivAddrTaxIDField = #technical field name of the D-suffix field in which the VAT ID is requested
   ...
</VAT>
```

Reference: Section VAT

Pointer: Requesting a VAT ID&#x20;

## Earlier integration and migration

Here you find the earlier integration of the general VAT definition in the shop. It is still supported, but is no longer recommended. In addition, we provide information here on how to switch to the current VAT definition.

### General VAT definition in the shop (earlier integration)

For a correct calculation of the VAT or sales tax amount for an order in the shop, it must be ensured that each product is assigned the VAT rate currently applicable to the product, for example 19 percent.

Since VAT rates are repeatedly subject to changes, WEBSALE V8s does not assign the VAT rate directly to products in order to reduce the effort involved in changes, but only a VAT index. In the shop configuration `shop.config` of the associated shop or subshop, a specific VAT rate is then assigned to each VAT index used. Up to 10 indexes can be defined. In the case of a statutory change to a tax rate, only the new tax rate needs to be changed for the respective VAT index. All products in the shop with this VAT index are thus immediately assigned the correct new VAT rate.

You assign the desired VAT rates to the VAT indexes in the shop configuration `shop.config` in the `<VATRates>` section.

Example: Two tax rates are to be stored for your online shop. Products with VAT index 1 should be at 19 percent and products with VAT index 2 should be at 7 percent. Then the definition looks like this:

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<VATRates>
   1   = 19
   2   = 7
</VATRates>
```

Optionally, it is also possible to store different tax rates for the VAT indexes depending on the delivery country.

Reference: Section VATRates

Reference: Section VATRates-Countrycode&#x20;

### Controlling VAT rate changes automatically (earlier integration)

For legally triggered changes to the VAT rate in a country, the shop software can adjust the VAT rate for the respective subshop automatically. The change required for this is controlled by a new section in the shop configuration `shop.config`.

To have the VAT rate automatically adjusted on a specific effective date, add a new, time-controlled `<VATRates>` section in the shop configuration `shop.config` after the regular `<VATRates>` section that contains the date up to which the previous VAT rate applies.

Example: For Switzerland, the VAT rate changes from 8 to 7.7 percent on 2018-01-01. The change should apply automatically from 2018-01-01, 00:00. Insert the following date-controlled section into the shop configuration `shop.config` of the subshop, specifically after the regular `<VATRates>` section without date control:

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<VATRates>
   1   = 7.7
   2   =
...
</VATRates>
<VATRates20171231>
   1   = 8
   2   =
...
</VATRates20171231>
```

> [!WARNING]
>
> Pay attention to the correct order of the sections. The `<VATRates>` section without time control precedes the `<VATRates>` section with time control.
>
> A date such as 2017-12-31 is specified in the format `20171231`.
>
> If the VAT rate has decimal places, as in the example 7.7 percent, use a period instead of a comma to separate them from the integer part, that is `7.7`.
>
> A combination of date and country code, such as `<VATRate-CHE20171231>`, is not permitted.

Reference: Section VATRates

### Migration to the global or individual VAT rate file

As part of the One-Stop-Shop procedure, we offer you a global, delivery-country-dependent VAT rate file that you can use for your shops. This is used to calculate the VAT shown in gross shops depending on the selected delivery country. In net shops, it is the VAT added on top accordingly.

Alternatively, you can define the VAT rates per shop or subshop and delivery country yourself in your own file.

If you have country-specific shops in use that only allow deliveries to that country, no changes are required.

> [!NOTE]
>
> * In rare cases, there are products with different VAT classes in different countries. We are happy to support you with the individual handling of such cases.
> * Please check with your ERP provider whether the new procedure is supported by it.

#### When to use which procedure

Whether the global WEBSALE VAT rate file can be used or not must always be decided individually per shop or subshop.

As a rule, the global WEBSALE VAT rate file can only be used for shops and subshops that have the following setup:

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<VATRates>
1 = Standard rate
2 = reduced rate
</VATRates>
```

Shops that have an additional tax rate require an individual VAT rate file. This is the case, for example, when the configuration looks like this:

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<VATRates>
1 = # Standard rate
2 = # reduced rate
3 = # tax-exempt
</VATRates>
```

or also like this:

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<VATRates>
1 = # Standard rate
2 = # reduced rate
7 = # tax-exempt
</VATRates>
```

An individual VAT rate file is also required if the standard tax rates are used but numbered differently:

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<VATRates>
5 = # Standard rate
6 = # reduced rate
</VATRates>
```

Reference: Section VATRates

#### Migration to the global WEBSALE VAT rate file

WEBSALE provides a global VAT rate file for all EU countries, with four tax rates per EU country. All WEBSALE shops access this file, so adjustment for an individual shop or subshop is not possible. You can find the complete content above in [Using the global WEBSALE VAT rate file](#using-the-global-websale-vat-rate-file).

> [!WARNING]
>
> You can use the global VAT rate file without restrictions.
>
> If you use a VAT index for which no value has been specified, the highest VAT rate for the respective country is automatically used.

**Step 1: Activation.** No activation by WEBSALE is required.

**Step 2: Extending the shop configuration.** In the `VAT` section of your shop configuration `shop.config`, add the following parameters. In `VATRateDefinition-ByDelivCountry-StandardISO`, enter the ISO code of the desired country whose VAT rate is to be applied by default if the buyer has not yet selected another delivery country.

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<VAT>
...
   VATRateDefinition-TestMode                   = ByDelivCountry-Managed
   VATRateDefinition-ByDelivCountry-StandardISO = DEU
...
</VAT>
```

**Step 3: Extending templates (optional).** Use the control tags as described above.

**Step 4: Testing the function.** Now test the function by activating the shop's general test mode. To do so, append the parameter `?test=on` to any shop call.

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.xyz.de/?test=on
```

Check that the VAT calculation is performed correctly. After successfully completing the test, append the parameter `?test=off` to any shop call to deactivate the test mode.

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
https://www.xyz.de/?test=off
```

How the test mode works is described in the guide [Switching the shop's test modes on and off](https://dokumentation.websale.de/en/testmodi-des-shops-ein-ausschalten.md).

**Step 5: Activating the function for live operation.** In the `VAT` section of your shop configuration `shop.config`, remove the `VATRateDefinition-TestMode` parameter and add the `VATRateDefinition-Mode` parameter.

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<VAT>
...
   VATRateDefinition-Mode                         = ByDelivCountry-Managed   # add
   # VATRateDefinition-TestMode                   = ByDelivCountry-Managed   # comment out or remove
   VATRateDefinition-ByDelivCountry-StandardISO   = DEU
...
</VAT>
```

Reference: Section VAT

> [!NOTE]
>
> If VAT rates change in the countries of the EU, they are adjusted accordingly by WEBSALE.

Once you have completed all steps, the function is fully integrated.

#### Migration to an individual VAT rate file

Alternatively, you can define the VAT rates yourself with your own file.

**Step 1: Activation.** No activation by WEBSALE is required.

**Step 2: Create an individual VAT rate file.** If you want to use your own VAT rate file, you must create a new config file in the online service area, within the Configuration service, under the global configurations.

In this file, you need one section per delivery country with the three-letter ISO country code. Enter the indexes for the different VAT rates of the countries, up to a maximum of 15 per country, and assign the desired VAT rates without a percent sign. Decimal places must be separated from the integer part by a period, that is 19 for 19 percent VAT and 7.7 for 7.7 percent VAT.

A complete template for the file `vatrates.config` with all EU countries can be found above in [Using the global WEBSALE VAT rate file](#using-the-global-websale-vat-rate-file).

> [!NOTE]
>
> Please note that VAT rates can change. Current tax rates can be found in the overview of VAT rates in EU countries.

**Step 3: Extending the shop configuration.** In the `VAT` section, add the `VATRateDefinition-TestMode` parameter with the value `ByDelivCountry-Individual`, and enter the file name assigned in the online service area in the `VATRateDefinition-ByDelivCountry-TestDefinitionFile` parameter. In `VATRateDefinition-ByDelivCountry-StandardISO`, enter the ISO code of the desired country whose VAT rate is to be applied by default if the buyer has not yet selected another delivery country.

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<VAT>
...
   VATRateDefinition-TestMode                          = ByDelivCountry-Individual
   VATRateDefinition-ByDelivCountry-TestDefinitionFile = vatrates.config
   VATRateDefinition-ByDelivCountry-StandardISO        = DEU
...
</VAT>
```

**Step 4: Extending templates (optional).** Use the control tags as described above.

**Step 5: Testing the function.** Test the function in the general test mode as described in the migration to the global file.

**Step 6: Activating the function for live operation.** In the `VAT` section, remove the `VATRateDefinition-TestMode` and `VATRateDefinition-ByDelivCountry-TestDefinitionFile` parameters. Add the `VATRateDefinition-Mode` and `VATRateDefinition-ByDelivCountry-DefinitionFile` parameters.

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<VAT>
...
   VATRateDefinition-Mode                                = ByDelivCountry-Individual      # add
   # VATRateDefinition-TestMode                          = ByDelivCountry-Individual      # comment out or remove
   VATRateDefinition-ByDelivCountry-DefinitionFile       = vatrates.config                # add
   # VATRateDefinition-ByDelivCountry-TestDefinitionFile = vatrates.config                # comment out or remove
   VATRateDefinition-ByDelivCountry-StandardISO          = DEU
...
</VAT>
```

Reference: Section VAT

Once you have completed all steps, the function is fully integrated.


## Related topics

- [VAT rates in the basket](https://dokumentation.websale.de/en/v8s/referenz/tags/basket/mehrwertsteuersaetze.md)
- [Prices, taxes, and currency](https://dokumentation.websale.de/en/v8s/referenz/konfigurationen/shopkonfiguration-shop-config/preise-steuern-und-waehrung.md)
- [Prices and costs](https://dokumentation.websale.de/en/v8s/preise/preise-und-kosten.md)
- [DC- (counters and calculations)](https://dokumentation.websale.de/en/v8s/referenz/tags/dc/rechnen.md)
- [Addresses and input checks](https://dokumentation.websale.de/en/v8s/referenz/konfigurationen/shopkonfiguration-shop-config/adressen-und-eingabepruefung.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.