Programmatic Tax Return

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.