mschindler83/fints-hbci-php

Transaction id

henobi opened this issue · 3 comments

Thank you for this awesome library!

I was wondering if there is a unique key or something to identify a transaction?

Background: I would like to write all transactions of a bank account into a mysql database and I want to check, if a transaction already exists in the database. The best solution would be, if each transaction has something like an ID so I could check if this ID already exists in my database.

Thank's in advance.

Unfortunately, as far as I know, there's not. I've been missing this for years in HBCI/FinTS and other banking APIs, as well. You can hash the contents (possibly json_encode before).

If the bank returns transactions before they're actually booked (I'm not sure if fints-hbci-php even allows fetching those?), minor details like capitalization or spacing might still change when it's eventually booked, so one version disappears and a slightly different one appears at the same time, but the hash would have changed. As far as I can tell, fints-hbci-php only returns the stable, booked transactions, though.

All right. So then I will implement a transaction-hash. Thank you for your explanations!

I had the same question, and i couldn't find any transactionId, which to me is quite incomprehensible. So I came to the same conclusion to create a transaction-hash. Yet this solution has its flaws. It will produce identical hashes for identical transactions, that (just theoretically might occur), since the time stamp of the bookedValue is not precise but a certain hour of the day, disregarding at what time of the day it was sent. So: it will be a solution provided there will never be 2 identical transactions on the very same day. I find this quite concerning given we live in 2018 and technology, softwares and requirements have advanced much.