It is only possible to import a bank connection. There are no services for importing or updating individual accounts. Accounts relate to bank connections, and whenever you import or update a bank connection, all accounts associated with this bank connection are imported/updated.
Prerequisites
Step 1 - Initiate a bank connection import
To initiate a bank connection import, please use Import a new bank connection endpoint:
POST /bankConnections/import
The payload and the flow varies based on the SCA approach offered by the bank (in the API: properties of the bank interface - bank.interface.properties).
Some banks have implemented the Embedded SCA approach, where the user credentials and the second factor can be submitted to the bank via the TPP.
Some banks will require a redirect to the bank server to complete the authentication and second-factor verification. This is the so-called Redirect SCA.
Some banks allow authorization through the Decoupled SCA approach, where users could authenticate and authorize a transaction via the mobile app or an authorization device.
The combination of different SCA approaches is also possible. For example Embedded + Decoupled: a user will provide the login credentials to a TPP and then a push notification will be sent to the mobile application.
Please make sure your application can dynamically handle all variations.
Please refer to the API specification for more details.
It is mandatory to indicate the interface that should be used for the import.
If you are not familiar with the interfaces which are supported by finAPI, please check Interfaces .
Please see below the examples of the flows for each SCA approach: Redirect, Embedded, and Decoupled.
Embedded approach
When applicable?
If a bank interface has neither DECOUPLED_APPROACH nor REDIRECT_APPROACH properties.
|
Step |
Request/response example |
|---|---|
|
Step #1
Mandatory request fields
Explanation The client application loads a bank chosen by the end-user. Then the application asks the end-user for credentials if they are required by the bank interface. Also, the application checks whether the chosen bank interface has |
JSON
|
|
Step #2
How to recognize the step Field Mandatory response fields of
Explanation If the bank decides, it responds with a list of available two-step procedures (aka SCA methods - Strong Customer Authentication methods). And, then the client application should ask the end-user to choose one of the offered two-step procedures. |
JSON
|
|
Step #3
Mandatory request fields
Explanation The client application asks the end-user to choose a two-step procedure and then submit the value to the API. Value of |
JSON
|
|
Step #4
How to recognize the step Field Mandatory response fields of
*Note: feel free to use the flicker code template prepared by finAPI: Flicker Code Template Explanation When the two-step procedure is chosen (either by the bank or by the end-user), the API responds to the end user with details for the end-user. The client application should send users info to the end-user and ask for an answer.
|
JSON
|
|
Step #5
Mandatory request fields
Explanation The client application asks for the challenge reponds and submits it back to the API. Value of |
JSON
|
|
Step #6
The API completes the import process and returns a bank connection resource. |
JSON
|
Redirect approach
When applicable?
If a bank interface has REDIRECT_APPROACH property.
|
Step |
Request/response example |
|---|---|
|
Step #1
Mandatory request fields
Explanation The client application loads a bank, chosen by the end-user. Then the application asks the end-user for credentials if they are required by the bank interface. Also, the application checks whether the chosen bank&interface has |
JSON
|
|
Step #2
How to recognize the step Field Mandatory response fields of
Explanation The API builds a redirect URL that will route the end-user to a page on the bank side, where the user can complete the authentication process. In this step, the client’s application should store values from |
|
|
Step #3
The client application should redirect the end-user to the given redirectUrl. Example
|
|
|
Step #4
When the end-user successfully completes the authentication process on the bank’s side, he is redirected to the URL given in step #1. Additionally, the bank adds some more data to the URL (as query parameters). But the most important part for the client application is this Example
|
|
|
Step #5
Mandatory request fields
Explanation The client application submits a query string as a value of
|
|
|
Step #6
The API completes the import process and returns a bank connection resource. |
|
Decoupled approach
When applicable?
If a bank interface has DECOUPLED_APPROACH property.
|
Step |
Request/response example |
|---|---|
|
Step #1
Mandatory request fields
Explanation The client application loads a bank, chosen by the end-user. Then the application asks the end-user for credentials if they are required by the bank interface. Also, the application checks whether the chosen bank interface has |
|
|
Step #2
How to recognize the step Field Mandatory response fields of
Explanation If the bank decides, it responds with a list of available two-step procedures (aka SCA methods - Strong Customer Authentication methods). And, then the client application should ask the end-user to choose one of the offered two-step procedures. |
|
|
Step #3
Mandatory request fields
Explanation The client application asks the end-user to choose a two-step procedure and then submits it to the API. Value of |
|
|
Step #4
How to recognize the step Field Mandatory response fields of
Explanation If the chosen two-step procedure was of a decoupled type, the API responds with this error. The client application should notify the end-user that the bank will send a notification. |
|
|
Step #5
Mandatory request fields
Explanation The client application asks the API to check the status of the authentication process. Value of |
|
|
Step #6
How to recognize the step Field Mandatory response fields of
Explanation The API returns this error if the authentication is still not completed on the bank side. The client application should continue repeating step #5 while the API returns this error.
|
JSON
|
|
Step #7
Mandatory request fields
Explanation The client application asks the API to continue the authentication process and check the authentication status on the bank side. |
|
|
Step #8
The API completes the import process and returns a bank connection resource. |
JSON
|
Step 2 - Check the status of the bank connection
To retrieve the status of the bank connection, get the bankConnectionId from the previous step and execute Get a bank connection:
GET /bankConnections/{id}
Please beware that it takes some time to download the accounts and transactions from the bank. For more details, please check Post Processing of Bank Account Import/Update.
Step 3 - Get Accounts and Transactions
To query the account data for the imported bank connection, please use the Get and search all accounts endpoint. There are many filtering options available such as by accountTypes, id, and more. Please refer to the API documentation for all available filters.
GET /accounts
You can query transactions for one of the imported account/bank or all imported accounts/banks.
Please use the Get and search all transactions endpoint.
GET /transactions