plaid2text icon indicating copy to clipboard operation
plaid2text copied to clipboard

Handling pending transactions

Open csku opened this issue 3 years ago • 0 comments

Thank you for this fantastic tool! This is going to make beancount actually work for my personal finances.

Here's an issue I experienced:

Downloading and pulling a transaction while it is still pending results in duplication of amounts because that same amount will be downloaded and pulled as a different, non-pending (posted?) transaction in the future.

I can think of two solutions:

  1. Only download/save transactions that are not pending. I've added a line of code to do that in a fork. I haven't created a PR since it won't work for people who want their database to track their account near-instantaneously - transactions can remain pending for several days. For me, however, I don't care if transactions don't make it into my beancount file for a few weeks.

  2. This solution doesn't have the time involved with the previous one, but it creates other problems. While pulling from the database, check every transaction's pending_transaction_id field against other transactions in the database. If that transaction has been downloaded but not pulled, then pull the posted transaction and not the pending one (since it will be most accurate). However, if it has already been pulled, do not pull the posted transaction.

However, two kinds of issues will arise: first, when the amount is different (for example, tips at a restaurant); second, when there is a pending transaction that disappears and there is no corresponding posted transaction (for example, a hold that is removed). There are no neat solutions to this, particularly the second type of issue.

While there seems to be no ideal solution, I'm flagging this because the issue of duplicated amounts with pending transactions definitely caused me some frustration.

csku avatar Feb 11 '22 01:02 csku