Product Swiss Tax
Applies Swiss VAT rates to product prices. Only activates for deliveries to Switzerland (CH) or Liechtenstein (LI).
Installation
import '@unchainedshop/plugins/pricing/product-swiss-tax';
How It Works
- Checks if the delivery address is in Switzerland or Liechtenstein
- Determines the tax category from:
- Product tags (e.g.,
swiss-tax-category:reduced) - Delivery provider configuration
- Falls back to DEFAULT (8.1%)
- Product tags (e.g.,
- Calculates and adds tax amounts to the pricing sheet
Tax Categories
| Category | Rate (2024+) | Rate (pre-2024) | Use Case |
|---|---|---|---|
| DEFAULT | 8.1% | 7.7% | Standard goods and services |
| REDUCED | 2.6% | 2.5% | Food, books, newspapers, medicines |
| SPECIAL | 3.8% | 3.7% | Accommodation services |
Configuration
Via Product Tags
Add a tag to the product:
swiss-tax-category:reduced
swiss-tax-category:special
Via Delivery Provider
Configure the delivery provider:
mutation CreateDeliveryProvider {
createDeliveryProvider(
deliveryProvider: {
type: SHIPPING
adapterKey: "shop.unchained.post"
configuration: [
{ key: "swiss-tax-category", value: "reduced" }
]
}
) {
_id
}
}
Net vs Gross Prices
The adapter handles both net and gross prices:
- Net prices: Tax is added on top (
amount * taxRate) - Gross prices: Tax is extracted from the total (
amount - amount / (1 + taxRate))
Adapter Details
| Property | Value |
|---|---|
| Key | shop.unchained.pricing.product-swiss-tax |
| Version | 1.0.0 |
| Order Index | 80 |
| Source | pricing/product-swiss-tax.ts |
Related
- Delivery Swiss Tax - Swiss VAT for delivery fees
- Product Pricing - Custom product pricing