EPC QR Codes

European Payments Council Quick Response Code (EPC QR Codes) are used to initiate SEPA credit transfers. They encode all necessary data (IBAN, amount, recipient) and may be placed on invoices to eliminate the error-prone typing of payment Information.

See the EPC guidelines (PDF document) for more information.

The function segno.helpers.make_epc_qr() is used to create a EPC QR Code. It is not possible to modify the error correction level or to change the version of the QR Code. The EPC guidelines specify that the error correction level is fixed to “M” and the QR Code version must not be higher than 13.

>>> from segno import helpers
>>> qr = helpers.make_epc_qr(name='Wikimedia Foerdergesellschaft', iban='DE33100205000001194700', amount=20, text='Spende fuer Wikipedia')
>>> qr.save('spende-wikipedia.png', scale=3)
EPC QR Code

The QR Code shown above encodes the following information:

BCD
002
2
SCT

Wikimedia Foerdergesellschaft
DE33100205000001194700
EUR20

By default, the function uses the minimal possible encoding to encode the provided data. If another encoding, i.e. UTF-8, is required, the user may specify the encoding with an integer referring to one of the supported encodings (1: UTF-8, 2: ISO 8859-1, 3: ISO 8859-2, 4: ISO 8859-4, 5: ISO 8859-5, 6: ISO 8859-7, 7: ISO 8859-10, 8: ISO 8859-15)

>>> from segno import helpers
>>> qr = helpers.make_epc_qr(name='Wikimedia Foerdergesellschaft', iban='DE33100205000001194700', amount=13.05, text='Spende fuer Wikipedia', encoding=1)
>>> qr.save('spende-wikipedia2.png', scale=3)
EPC QR Code

Decoded infomation:

BCD
002
1
SCT

Wikimedia Foerdergesellschaft
DE33100205000001194700
EUR13.05


Spende fuer Wikipedia