About

This article explains how the app handles accounts which are connected to multiple interfaces. It's important in this case to not update the account twice in a row using multiple interfaces.

General implementation note

Both import and update flows contain two steps: 1 - downloading accounts and 2 - downloading balances&transactions for accounts. All the logic about capabilities is done after the first step, BUT before the second step. So, after the first step the app initializes/fixes capabilities of accounts. And then the second step is only applied to accounts which have DATA_DOWNLOAD capability connected to the currently used interface.

Import a bank connection

Nothing special: once an account is created, the app always adds a DATA_DOWNLOAD capability to the interface used for the import.

Update a bank connection

When the account is stored/updated in the database, the app checks for each account if it has any other interfaces. And then the logic depends on which interface is used for the update.

Update a bank connection using XS2A

The app adds a DATA_DOWNLOAD capability to all accounts taken from the XS2A interface. If any account has any other interface - the app delete DATA_DOWNLOAD for those interfaces. XS2A has the highest priority.

Update a bank connection using FINTS_SERVER

The app checks for every account taken from the interface if it has any other interface:

Update a bank connection using WEB_SCRAPER

The app checks for every account taken from the interface if it has any other interface:

Connect a new interface

Connect a new XS2A interface

The app downloads all accounts from XS2A interface and matches them to the existing ones. All downloaded accounts have DATA_DOWNLOAD capability. Also, the app checks if any of matched accounts (means there were already imported through another interface) have any other interface connected and removes DATA_DOWNLOAD capability from those interfaces.

Connect a new FINTS_SERVER interface

The app downloads all accounts from FINTS_SERVER interface and matches them to the existing ones. And then the app applies the following logic:

Connect a new WEB_SCRAPER interface

The app downloads all accounts from WEB_SCRAPER interface and matches them to the existing ones. And then the app applies the following logic: