Home
03 Jun 2020

Automatically adding SEPA Credit Transfer QR codes to GnuCash/LaTeX invoices

[ #technology  #bookkeeping  #latex  #gnucash  #invoice  #opensource  #linux  #qrcodes  ]
GnuCash_LaTeX_Factuur
Invoice with automatically added SEPA Credit Transfer QR code.

While working on my previous post on making prettier invoices for your GnuCash invoices, a student asked me if he could also pay using a Tikkie. This is a Dutch service that lets you send quick payment requests links through whatever messenger app you prefer, quickly allowing recipients to pay with their bank’s mobile app.

I looked into this a bit, and it turns out using Tikkie for a business of my size costs € 0,25 per transaction. Not too much in the grand scheme of things, but I’d really like to avoid as many overhead costs as possible for my small business.

SEPA Credit Transfer QR codes

I came across a blog post discussing different ways of generating a SEPA Credit Transfer QR code, which can be used in a number of European countries for fast payment (Austria, Belgium, Finland, Germany and The Netherlands).

Many Dutch banks support scanning such QR codes with their banking apps on smartphones, making this an interesting alternative for small business owners not wanting to pay Tikkie per transaction.

✔? ING
Bunq
SNS bank
x Rabobank
x ABN Amro
ASN Bank
✔? Knab
Dutch banks supporting SEPA Credit Transfer QR codes.

The website https://epc-qr.eu/ offers a generator for these QR codes, tracker and cookie free, and even offers an API to use in scripts. As I was working on my template anyway, I decided to write a small script to automatically add a QR code to some of my invoices. I wanted it to be an option whether to add a QR code or not, as many of my professional customers probably don’t use a banking app for payment.

Bash script

download_SEPA_credit_transfer_QR_Code.sh uses gcinvoice to get the invoice number and the customer name from your GnuCash database. Since I used gcinvoice in my previous post as well and since I was already familiar with its syntax, this seemed the easiest option.

Find these scripts on my Github repository.

download_SEPA_credit_transfer_QR_Code.sh can be used separately as well. This may come in handy if you want to add a SCT QR code from your GnuCash invoice to anything else. See download_SEPA_credit_transfer_QR_Code.sh -h for usage instructions.

I added a prompt to Gnucash_make_invoice to ask if the user wants to add a QR code to his invoice. If yes, it runs download_SEPA_credit_transfer_QR_Code.sh.

I added an if/else-statement to the LaTeX template to check if a QR code is present for the invoice number used, which then adds it to the invoice. You’ll need to edit the directory it looks in at the bottom of the .tex file.

Some constants in Gnucash_make_invoice to fill in have also been added, check its comments for instructions.

Keep in mind I am very much an amateur programmer, so bugs may be present in all these scripts. Let me know in the comments below if you find any. Also please let me know if you have more details about bank apps supporting this!

Until next time,
Sebastiaan Ammerlaan

Comments