Setting up GnuCash with Deutsche Bank Germany
I’ve been recently trying to get my personal finances under control, and part of that was introducing GnuCash to my workflow. GnuCash itself might we worth a separate blog post, but here I’m only documenting how to connect GnuCash with Deutsche Bank in order to automatically import transactions.
GnuCash 4.13 or newer. Might work with other versions but I have not tried.
You need to have a bank account at Deutsche Bank Germany. I do not know how much of this applied to Deutsche Bank in other countries.
I think you need to have “HCBI Plus” activated. Log in to online banking and then go to Online SelfServices, Sonstiges, then “TelefonBanking PIN bestellen und HBCI+ Freischaltung” and then make sure “HBCI Plus Status” is activated (“Die HBCI Plus-Nutzung ist aktuell aktiviert.”). If not, you might need to activate it. (For me it was already activated and I can’t recall activating it myself, therefore that might be the default.)
- Open GnuCash
- Open Tools / Online Banking Setup
- Click Next, Start AqBanking Setup, click Create User
- Select “HCBI backend using AqHBCI”
- In the next step, select “Setup a PIN/TAN account” an click Run
- In the “Please select the bank” step, enter the following:
- Bank Code: your “Bankleitzahl”, e.g. 10070000
- Bank Name: Deutsche Bank
- Server URL: https://fints.deutsche-bank.de/
- You can also auto-fill the last two using the Select button next to Bank Code.
- In the next step, enter your user details:
- User name: this can be whatever you want, for example the account holder’s full name
- User Id and Customer Id: this is your branch number (Filiale, 3 digits) plus your account number (Konto, 7 digits) plus your sub-account number (Unterkonto, 2 digits).
- On the certificate Received screen, accept the certificate if you get “The certificate is valid” near the bottom.
- When prompted to select a TAN method, select “901 - Mobile-TAN (Version 6)”
- When prompted for a PIN, use the 5 digit code you use for signing in to online banking.
- At some point you will also be propmted for a TAN which you will receive via SMS text message.
- Once finished, close the setup wizard, and on the “Match Online accounts with GnuCash accounts” screen, select which GnuCash account he Deutsche Bank transactions should be synchronized to. If you don’t have one yet, create something like “Assets/Current Assets/Deutsche Bank”.
Testing and using
Once the setup is done, let’s see if it actually works.
- Open the GnuCash account for Deutsche Bank.
- Go to Actions / Online Actions / Get Balance.
- It should show the balance and ask if you want to reconcile.
- Then go to Actions / Online Actions / Get Transactions.
- Enter some time frame that’s less than the last 90 days.
- If you get an error, saying “Error on executing job. Status: rejected (5).”, you need an additional step below.
- As the next step, you should see the “Generic import transaction matcher” window, where you will see the to-be-imported transactions and can decide what to do with them.
Fixing ‘Error on executing job’
These instructions are specific to macOS but should mostly be valid with appropriate changes on Linux and Windows:
- Open the Terminal app
/Applications/Gnucash.app/Contents/MacOS/aqhbci-tool4 listaccounts -v, which should print out something like this (find the right line matching the Deutsche Bank account in question):
Account 0: Bank: 10070000 Account Number: xxxxxxxxx SubAccountId: EUR Account Type: bank LocalUniqueId: 5
Note the number after LocalUniqueId.
/Applications/Gnucash.app/Contents/MacOS/aqhbci-tool4 getaccsepa -a LocalUniqueIdbut substitute LocalUniqueId with your actual id number.
- When prompted (“Input:”), enter your online bank PIN.
- Try Actions / Online Actions / Get Transactions again, as described above.
- I found the fix to the transaction job in this AqBanking bug report.
- Very little documentation is available for HBCI by Deutsche Bank.
- GnuCash does not support photoTAN but the bug report has a workaround which I have not tried yet.
- I have not yet figured out how to synchronize Deutsche Bank credit card transactions.