Programmatic Tax Return

To me it would be surprising if you’re considered self-employed without being required to contribute to pillar 1. A few sources that point to self-employment and/or AHV contributions:

Kreisschreiben Nr. 36:

Dieses Kreisschreiben dient als Hilfsmittel zur Abgrenzung einer selbständigen Erwerbs-
tätigkeit (Quasi-Wertschriftenhandel) von der privaten Vermögensverwaltung.

Gemäss DBG Art. 16 Abs. 3 und StG § 23 Buchstabe b sind Kapitalgewinne auf Privatvermögen steuerfrei. Steuerbar werden die Kapitalgewinne aber, wenn sie im Rahmen einer selbständigen Erwerbstätigkeit erzielt werden. Dabei spielt es keine Rolle, ob die Tätigkeit im Haupt- oder Nebenberuf, regelmässig, wiederkehrend oder nur einmal ausgeübt wurde. Kapitalgewinne unterliegen dann der direkten Bundessteuer, den kantonalen Steuern und auch der AHV-Beitragspflicht.

Die Kapitalgewinne sind beim Bund, Kanton sowie bei der AHV steuer- und abgabepflichtig.

I stumbled on this thread since I wanted to develop a tool to create such barcodes. The effort to program this is probably quite high, but if other people could profit, that would be nice.

I never had to upload any broker statements (even for withholding taxes) - this might depend on the canton though. The use of a custom would probably not be a problem since the person filling out the form is still fully responsible. And a signature doesn’t seem to be required by the standard, so this shouldn’t be required either.

The specifications on how to create the barcode is here: https://www.ech.ch/sites/default/files/dosvers/beilagen/BEIL2_d_DEF_2022-06-07_eCH-0196_V2.0.0_Barcode%20Generierung%20-%20Technische%20Wegleitung.pdf

They recommend the use of a Java library, and also provide more precise information on how to use said library.
Easiest would probably be to create a tool for XML → eCH-0196 PDF to allow some flexibility in the input.

If someone would be up to create such a tool, let me know

1 Like

I’m pretty sure the problem is that even if you produce correct reports, you will not be able to get an approved key to sign the tax statement and therefore the reports will not be accepted/imported into the tax statements.

I know about it. The problem is that you don’t know what you have to put into the XML and how it’s split up and signing and whatever. Maybe I’m wrong, but that’s what I remember.

Signing the XML contained in the barcodes does not seem to be required, this is only the case for an attached XML (see specification).

The high complexity lies in the barcode creation, not in the XML-creation. This is why the simplest solution for personal projects would be the use of Selenium for example (as mentioned above). But this would only work per-canton and not for all cantons as a barcode would / should.