Changing exchange rate before payment is finalized: What is the best practice to handle it?
What is the best practice to handle changing exchange rate for purchases in foreign currency? I end up getting duplicated transaction with almost the same amount that I have to clean up by hand.
Here is sequence of events that leads to transaction being duplicated:
- User has bank account in NOK that is bound to the card. There is corresponding YNAB budget account.
- User buys something with the card in EUR / USD / any other currency (let's say it was worth 10 EUR).
- Transaction is visible in account statement as reservation in bank with exchange rate number 1 (let's say exchange rate is 9,62 NOK / 1 EUR and purchase sum is 96,2 NOK).
- Automated script transfers transaction to YNAB (this one in this case: https://github.com/stenjo/SbankenToYNAB )
- YNAB get info on transaction with amount 96,2 NOK
- Bank finalizes transaction, it is not a reservation anymore. When transaction is finalized exchange rate had changed (let's say it's 9,64 NOK / 1 EUR now). Now we can't see earlier transaction with amount 96,2 NOK, but we can see a new transaction with amount 96,4 NOK in the account statement in the bank.
- Transaction with amount 96,4 NOK is being picked up by the script and transferred to YNAB
- Import ID of YNAB transaction doesn't matches (amounts are different), therefore YNAB doesn't merges transactions with amount 96,2 and 96,4 NOK. We have a duplicate that has to be fixed by hand.
What is the best way to handle it?
- Do not transfer reservations at all? But than we'd get delay in transferring the data to YNAB.
- There is unique transaction ID provided by bank sometimes, maybe we can store it in memo field and match when payment is finalized?
Have you encountered anything similar? How did you solved it?