Skip to main content

Delivery Swiss Tax

Applies Swiss VAT rates to delivery fees. Only activates for orders with delivery addresses in Switzerland (CH) or Liechtenstein (LI).

Included in All Preset

Registered automatically by registerAllPlugins() (via registerSwissTaxPlugins() from @unchainedshop/plugins/presets/countries/ch).

Registration​

import { pluginRegistry } from '@unchainedshop/core';
import { DeliverySwissTaxPlugin } from '@unchainedshop/plugins/pricing/delivery-swiss-tax';

pluginRegistry.register(DeliverySwissTaxPlugin);

How It Works​

  1. Checks if the order has a delivery and address in CH/LI
  2. Resolves the tax category from delivery provider configuration
  3. Falls back to DEFAULT rate (8.1%) if not specified
  4. Calculates and adds tax to the delivery fee

Tax Categories​

Category2024+2018–20232011–20172001–2010
DEFAULT8.1%7.7%8.0%7.6%
REDUCED2.6%2.5%2.5%2.4%
SPECIAL3.8%3.7%3.8%3.6%

Rate data is shared with the Product Swiss Tax adapter (bundled ch-tax-rates.json, era-based, ESTV-verified; the rate follows the order date).

Configuration​

Set the tax category on the delivery provider:

mutation CreateDeliveryProvider {
createDeliveryProvider(
deliveryProvider: {
type: SHIPPING
adapterKey: "shop.unchained.post"
}
) {
_id
}
}

mutation ConfigureDeliveryProvider {
updateDeliveryProvider(
deliveryProviderId: "provider-id"
deliveryProvider: {
configuration: [
{ key: "swiss-tax-category", value: "default" }
]
}
) {
_id
}
}

Activation Conditions​

The adapter only activates when:

  • The order exists
  • Order delivery is set
  • Delivery address is in Switzerland or Liechtenstein

Adapter Details​

PropertyValue
Keyshop.unchained.pricing.delivery-swiss-tax
Version1.0.0
Order Index80
Sourcepricing/delivery-swiss-tax/adapter.ts