Generate EPC QR codes
In the past weeks I recognized that I got more invoices with a EPC QR code to automatically fill out the fields for a wire transfer. The system is very convenient and feels better than typing everything. Obviously you still have to look if the inserted values are correct.
The EPC (European Payments Council) QR code is only a specified string with a few newlines. And of course there is a Python package (python-qrcode) that has everything needed.
The example from the EPC QR code Wikipedia page using Python and writing a png version of the qr code:
import qrcode text = """BCD 001 1 SCT BPOTBEB1 Red Cross of Belgium BE72000000001616 EUR1 CHAR Urgency fund Sample EPC QR code""" img = qrcode.make(text) img.save("qrcode-redcross.png")
Save the code into run.py
and run with uv: uvx --with "qrcode[pil]" run.py
.
I tested the resulting QR Code and it worked as expected with the Android app from my bank.
There are multiple pages with more detailed specs linked in the Wikipedia article. From the ones I looked at this Austian one (there is a German and an English version) seems complete enough to understand the possible values for each line.
Generating EPC QR codes feels solved. So why are there (European) invoices without such a QR code?