Skip to main content

How to reconcil transactions in Beancount

If conversion scripts are used to translate bank statements into Beancount transactions, there will be two entries for one money transfers; one at the sending account and second at receiving account. Let’s discuss how to reconcil this.

In this post, we see a list of real-life transactions in beancount.

Observe that:

  • All of the positive currency amounts have a #debit tag.
  • All of the negative currency amounts have a #credit tag.
  • Above is still true for money transfers between bank accounts, wallet to bank account and vice versa.

This sign consistency seperates the Beancount transactions into a credit and debit buckets. These two buckets are also how transactions are naturally seperated on bank statements. If a conversion (bank statement to Beancount transaction) script is written for a bank account, all debits can be chosen to have positive signs and credits negative signs.

Now, for a money transfer between two banks, there will be two bean transactions, one at the sending bank account and another at receiving account. One of such is a duplicate. They were not shown in the mentioned post.

For example, the matching duplicate to the following:

2024-04-01 * "Self" "Make a deposit at ATM" #credit
  Assets:US:Wallet                            -15.00 USD


2024-04-01 * "Self" "ATM deposit" #debit
  Assets:US:Bank                               15.00 USD

For this:

2024-05-01 * "Self" "Make a withdrawal at ATM" #credit
  Assets:US:Bank                               -5.00 USD


2024-05-01 * "Self" "ATM withdrawal" #debit
  Assets:US:Wallet                              5.00 USD

Thus, we choose this convention: keep the transaction at sending account and comment the one at receiving account. Commenting, instead of deletion, leaves records for later.