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 activates when the delivery location is in Switzerland or Liechtenstein. The location is the delivery address, else the billing address, else the country of the order or request, so simulated delivery prices (DeliveryProvider.simulatedPrice) are taxed too, with or without a cart; a price simulated for an order uses the delivery address of the order.

Adapter Details​

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