Skip to content

fix: remove stripping of swiss vat endings in e-invoice#236

Closed
HenningWendtland wants to merge 2 commits intoalyf-de:developfrom
HenningWendtland:swiss-vat-ids-2
Closed

fix: remove stripping of swiss vat endings in e-invoice#236
HenningWendtland wants to merge 2 commits intoalyf-de:developfrom
HenningWendtland:swiss-vat-ids-2

Conversation

@HenningWendtland
Copy link
Copy Markdown
Member

@HenningWendtland HenningWendtland commented Feb 20, 2026

Business Background:

In Switzerland, the rule for the ending is simple but strict. Whether the ending is "missing" or "present" depends entirely on the tax status of the company.

  1. When the ending MUST be present
  • If the Swiss company is VAT-registered (meaning they have a turnover >100,000 CHF or have registered voluntarily), the ending (MWST/TVA/IVA) is legally mandatory on all invoices.
    Format: CHE-116.281.710 MWST
    Legal Reason: Under Art. 26 of the Swiss VAT Act, a "valid tax voucher" for input tax deduction must show the UID including the VAT suffix. If a German company invoices a Swiss company and omits the suffix, the Swiss company might technically be denied the right to "claim back" the VAT (if any was charged) or may face issues during a tax audit.
  1. When the ending is allowed (and expected) to be missing
    There are three specific cases where you will see the number without any ending:
  • Small Businesses: Companies with a worldwide turnover of less than 100,000 CHF are not liable for VAT. They have a UID (the CHE- number) for administrative identification, but they cannot add the suffix because they aren't in the VAT register.
  • Administrative Use Only: If the number is used purely for identification (e.g., in a contract, a shipping manifest, or a simple address block) and not for tax-relevant billing, the suffix is often omitted.
  • Public Entities/Non-Profits: Certain government bodies or charities may have a UID but are exempt from VAT duties.
  1. Special Case: Liechtenstein
    If you are invoicing a company in Liechtenstein, they also use the CHE prefix (due to a treaty with Switzerland). However, Liechtenstein companies do not use the suffixes MWST/TVA/IVA. They simply use the number CHE-123.456.789.

Meaning for the Code:

  • We need to keep the allowed endings MWST/TVA/IVA if present
  • We cannot enforce them, since there are valid exceptions
  • Other endings should fail the validation process

@HenningWendtland HenningWendtland changed the title fix: remove stripping of endings in e-invoice fix: remove stripping of swiss vat endings in e-invoice Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant