> ## 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 rates in the basket

> The BASKET-VATRates tags: output the rate, the tax amount, and the associated net and gross values for each tax rate in the basket.

If a basket contains products with different tax rates, a single VAT amount is not enough. The invoice must show, for each rate, which portion of the amount it applies to. The tags with the prefix `BASKET-VATRates-` provide exactly this breakdown.

All tags are permitted in all templates. Except for `BASKET-VATRates-Data`, they belong in the loop `{@BASKET-VATRates-Data}`, because they always describe a specific tax rate.

Guide: VAT · Reference: Basket totals

## The tax breakdown in the template

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

   <table>
      <tr>
         <th>Satz</th>
         <th>Netto</th>
         <th>Mehrwertsteuer</th>
         <th>Brutto</th>
      </tr>

      {@BASKET-VATRates-Data}
         <tr>
            <td>~BASKET-VATRates-Rate~ %</td>
            <td>~BASKET-VATRates-TotalNet~ ~WS-CurrencySymbol~</td>
            <td>~BASKET-VATRates-VAT~ ~WS-CurrencySymbol~</td>
            <td>~BASKET-VATRates-TotalGross~ ~WS-CurrencySymbol~</td>
         </tr>
      {/@BASKET-VATRates-Data}
   </table>

{/BASKET-VATRates-Data}
```

> [!NOTE]
>
> The loop only runs over the tax rates that actually occur in the basket. A shop with three configured rates and a basket in which only the reduced rate occurs returns exactly one iteration.

## Goods value or order value

For each tax rate there are two reference values, and the choice between them determines whether shipping and payment costs are included.

| Basis | Tags | Contains |
| - | - | - |
| Goods value | `BASKET-VATRates-SubTotal`, `-SubTotalNet`, `-SubTotalGross` | only the products |
| Order value | `BASKET-VATRates-Total`, `-TotalNet`, `-TotalGross` | additionally shipping, payment, and other costs |

> [!WARNING]
>
> For the tax breakdown on an invoice, the order value is generally what is meant, because VAT is also charged on shipping costs. The goods value is the right figure if you only want to break down the products.

> [!NOTE]
>
> `BASKET-VATRates-VAT` exists only once, not separately for goods and order. It returns the tax amount of the respective rate.

## The tags

| Tag | Single tag | Range tag | Negative range tag | Loop tag |
| - | - | - | - | - |
| `BASKET-VATRates-Data` | yes | yes | yes | yes |
| `BASKET-VATRates-Rate` | yes | yes | yes | – |
| `BASKET-VATRates-VAT` | yes | yes | yes | – |
| `BASKET-VATRates-SubTotal` | yes | yes | yes | – |
| `BASKET-VATRates-SubTotalNet` | yes | yes | yes | – |
| `BASKET-VATRates-SubTotalGross` | yes | yes | yes | – |
| `BASKET-VATRates-Total` | yes | yes | yes | – |
| `BASKET-VATRates-TotalNet` | yes | yes | yes | – |
| `BASKET-VATRates-TotalGross` | yes | yes | yes | – |
| `BASKET-VATRates-TechnicalSubTotal()` | yes | yes | yes | – |
| `BASKET-VATRates-TechnicalTotal()` | yes | yes | yes | – |
| `BASKET-VATRates-TechnicalVAT()` | yes | yes | yes | – |

### BASKET-VATRates-Data

As a single tag, the number of tax rates used in the basket; as a range tag, the bracket around the breakdown; as a loop, one iteration per tax rate.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{BASKET-VATRates-Data}
   Im Warenkorb kommen ~BASKET-VATRates-Data~ Steuersätze vor.
   {@BASKET-VATRates-Data}
      <!-- Angaben zum einzelnen Steuersatz -->
   {/@BASKET-VATRates-Data}
{/BASKET-VATRates-Data}
```

> [!NOTE]
>
> The count is useful for a case distinction in the template: with exactly one tax rate, a single line in the invoice footer is often enough; the table only becomes worthwhile from two rates onward.

### BASKET-VATRates-Rate

Outputs the tax rate as a percentage.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{@BASKET-VATRates-Data}
   {BASKET-VATRates-Rate}~BASKET-VATRates-Rate~ %{/BASKET-VATRates-Rate}
{/@BASKET-VATRates-Data}
```

### BASKET-VATRates-VAT

Outputs the VAT amount attributable to this tax rate.

### BASKET-VATRates-SubTotal, -SubTotalNet, and -SubTotalGross

Output the goods value attributable to this tax rate: according to the shop setting, explicitly net, or explicitly gross.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{@BASKET-VATRates-Data}
   Warenwert netto:  ~BASKET-VATRates-SubTotalNet~ ~WS-CurrencySymbol~
   Warenwert brutto: ~BASKET-VATRates-SubTotalGross~ ~WS-CurrencySymbol~
{/@BASKET-VATRates-Data}
```

### BASKET-VATRates-Total, -TotalNet, and -TotalGross

Output the same for the order value, that is, including shipping and payment costs.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{@BASKET-VATRates-Data}
   Bestellwert netto:  ~BASKET-VATRates-TotalNet~ ~WS-CurrencySymbol~
   Bestellwert brutto: ~BASKET-VATRates-TotalGross~ ~WS-CurrencySymbol~
{/@BASKET-VATRates-Data}
```

> [!NOTE]
>
> `SubTotal` and `Total` without a suffix follow the shop setting. In a gross shop, they return the same value as the Gross variant; in a net shop, the same as the Net variant.

## Amounts for further processing

Three technical variants output the values unformatted and in a freely selectable notation, intended for interfaces and tracking.

| Tag | Corresponds to |
| - | - |
| `BASKET-VATRates-TechnicalSubTotal()` | `BASKET-VATRates-SubTotal` |
| `BASKET-VATRates-TechnicalTotal()` | `BASKET-VATRates-Total` |
| `BASKET-VATRates-TechnicalVAT()` | `BASKET-VATRates-VAT` |

| Parameter | Meaning |
| - | - |
| 1 | Decimal separator. A comma is written as `\,` |
| 2 | Number of decimal places |

Without parameters, two decimal places are output with a period as the separator.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{@BASKET-VATRates-Data}
   <span data-vatrate="~BASKET-VATRates-Rate~"
         data-vat="~BASKET-VATRates-TechnicalVAT(.,2)~"></span>
{/@BASKET-VATRates-Data}
```

> [!NOTE]
>
> The technical variants for the entire basket have a third parameter as a multiplier. The tags on this page do not support it.

## Alternative currency

For each of these values there is also a variant in an alternative currency, from `BASKET-VATRates-AltCurrencySubTotal` to `BASKET-VATRates-AltCurrencyVAT`. They are described together with the other tags for the alternative currency.

Reference: AltCurrency- (Alternative currency)

## Related topics

* Guide: VAT
* Reference: Basket totals
* Reference: AltCurrency- (Alternative currency)


## Related topics

- [Basket totals](https://dokumentation.websale.de/en/v8s/referenz/tags/basket/warenkorbsummen.md)
- [VAT](https://dokumentation.websale.de/en/v8s/preise/mehrwertsteuer.md)
- [Climate-neutral production in the basket](https://dokumentation.websale.de/en/v8s/referenz/tags/basket/klimaneutrale-produktion-im-warenkorb.md)
- [Shopping basket and order process](https://dokumentation.websale.de/en/v8s/referenz/konfigurationen/shopkonfiguration-shop-config/warenkorb-und-bestellprozess.md)
- [Prices, taxes, and currency](https://dokumentation.websale.de/en/v8s/referenz/konfigurationen/shopkonfiguration-shop-config/preise-steuern-und-waehrung.md)


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