Own list for bank selection
Kontomatik offers a solution where you can create your own frontend for the list of banks instead of users selecting a bank in our SignIn Flow. To implement this, you simply need to pass the selected bank identifier to the SignIn Flow parameters.
However, please note that this solution has some limitations. You will not have control over the subsequent verification steps, as they must remain unchanged for security and compliance reasons.
Obtaining a list of enabled banks
To obtain a list of enabled banks and their identifiers to be passed to the SignIn Flow, we provide the AIS Catalog command.
The response returned by the /catalog.xml
command will contain all currently available targets, along with information about the currently used interface type, a list of available commands, and other relevant information. In our case, we are particularly interested in the name
and institution
attributes, which are necessary to identify the bank and check the currently used interface. This information is essential for passing the appropriate values to the SignIn Flow.
Identifying the target and institution
Using the institution
attribute, you can identify the bank that your customer will be using. For example, the value could be “KontoBank”. Then, you need to check the value available in the name
attribute, which indicates the currently used interface. In this case, it could be the value “KontoBankApi”. This value should be passed as the target
in the SignIn Flow parameters.
The next time you run this command, the institution
will be still showing “KontoBank”, but it might happen that the target got switched to another type, for example, the fallback interface, and this time the attribute name
has a value of “KontoBank”. In this situation, the value passed as the target
SignIn Flow parameter will change to “KontoBank”.
You can use the institution
information to map the bank logo and bank name. The institution
name won’t change when we switch targets within. You can also implement a verification mechanism to alert you if a new institution
appears in the Catalog response or if there’s a missing one.
Example
As an example, let’s say that you’ve made a command catalog request and received a response that contains the following snippet:
<target country="pl" name="MBankApi" institution="MBank" officialName="mBank" officialUrl="https://www.mbank.pl" psd2="true">
In this case, you should identify the bank using the institution field, which is “MBank”. And then, you should pass the name
value, which in this case is “MBankApi”, to the SignIn Flow in order to proceed with verification.
For the SignIn Widget, the code should look like this:
embedKontomatik({
client: 'YOUR_CLIENT_ID'
divId: 'kontomatik',
target: 'MBankApi',
...
});
Handling the Multiple Access service
Multiple Access only
Since all bank connections provided by Kontomatik support the single access mode, using the list from the AIS Catalog is sufficient to authorize your user for a one-time import.
However, in case you want to refresh the data with the Multiple Access service, you need to handle the custom bank list a little differently.
For each target the AIS Catalog also returns a list of enabled commands, e.g.:
<target country="pl" name="KontoBankApi" institution="KontoBank" officialName="KontoBank" officialUrl="https://bank.kontomatik.com" beta="true" psd2="true">
<supportedAccountTypes>
<supportedAccountType name="Individual"/>
</supportedAccountTypes>
<commands>
<command name="ImportCreditCardsCommand"/>
<command name="ReuseMultipleAccessCommand"/>
<command name="ImportAccountsCommand"/>
<command name="ImportOwnersDetailsCommand"/>
<command name="ImportAccountTransactionsCommand"/>
<command name="ImportCreditCardTransactionsCommand"/>
<command name="DefaultImportCommand"/>
<command name="EnterCredentialCommand"/>
</commands>
...
To extract targets supporting Multiple Access, for each of them you need to check the commands list for a ReuseMultipleAccessCommand
command. If the target only supports Single Access, this command will be missing.
Then, once you extracted such targets, and considered the institution attribute as per the previous sections, you can display the list to the user and, after they click their bank, you can use the target
parameter in the Widget with the MULTIPLE
access mode.
Mixed access mode
If you want to be able to refresh user data, but it’s not obligatory, you may use the MIXED
value for the accessMode
parameter in the Widget. When you do, the Widget will automatically redirect the user to the Multiple Access service authorization if the target supports it. If the bank doesn’t support it, the user will go through Single Access.
This will also be true if you use the target
parameter. In such case you don’t have to actually look for the ReuseMultipleAccessCommand
command in the AIS Catalog. Simply extract the list of all banks, present it to the user and then provide the target
and accessMode: MIXED
in the Widget.