Create Bank Connection

Create Bank Connection

Let's now create a connection object. A connection represents a user's connection to a bank. So if they authenticate and login, through Dapi, to 2 banks there will be 2 connections.
Since you don't know yet which bank the user will choose, you will just display the connect page. The user has to then pick the bank and enter their credentials.


Add listeners to handle a successful or a failed connection attempt.

Dapi.onConnectionSuccessful.listen((m) => print("CONNECTION_SUCCESSFUl"));

Dapi.onConnectionFailure.listen((m) => print("CONNECTION_FAILED"));

That's it. You can now try to run your app on the emulator and call the presentConnect function and see Dapi in action!

Create Sandbox User

You can create users for sandbox environment to test your integration with Dapi instead of connecting your real accounts

Navigate to Dashboard -> Apps -> Your App -> Sandbox -> Create a Sandbox User

Enter the following details and click Submit.

  • Sandbox Bank: select a bank from the dropdown list
  • Sandbox Username : username of your choice
  • Sandbox Password : password of your choice

In order to add accounts to a sandbox user, click the NEW button on the Accounts column and provide the following information:

  • Acount Name: user's account name (You can see it on the Account Information dialog when you click an account from the Sandbox Users table.)
  • Account Number: user's account number (You can see it on the Account Information dialog)
  • IBAN: user's IBAN (You can see it on the Account Information dialog)
  • Account Type: choose a value from the dropdown
  • Balance: set a starting balance for the account
  • Currency: choose the currency for the account from the dropdown

Get Cached Connections

When you authenticate and login through Dapi, a DapiConnection object is created and stored in the local cache containing information about your connection to the bank, so that you don't have to authenticate and login again every time you open the app.

Dapi.getConnections() returns the list of connections in cache.

await Dapi.getConnections()

Dismiss Connect

Closes the presented Connect UI


Method does not receive any parameter.




A method for obtaining bank account metadata


Method does not receive any parameter.


await connection.getAccountsMetadata();

Get Parameters

A method for obtaining the connection parameters


Method does not receive any parameter.


await connection.getParameters();


   "fullName":"Abu Dhabi Commercial Bank Sandbox",
   "name":"ADCB Sandbox",

Create Connection

Add a new connection based on connection parameters.


jsonConnectionParametersDapiConnection's parameters, can be obtained using connection.getParameters()


await DapiConnection.create(jsonConnectionParams);