Changelog

GetAccounts

Provides information about all the sub-accounts that the user has in their bank account.

Parameters

Method does not receive any parameter.

Example

await connection.GetAccounts();

Response

Response Example


GetIdentity

Get the identity information that has been confirmed by the bank.

These are the identity details that you will get. Not all banks provide all this data. So we will provide as much of it as possible.

Parameters
Method does not receive any parameter.

Example

await connection.GetIdentity();

Response

Response Example


GetCards

A method for obtaining and displaying credit cards of the user

Parameters
Method does not receive any parameter.

Example

await connection.GetCards();

Response

Response Example


Account - GetTransactions

A method for obtaining and displaying transactions created from users bank accounts. The list will not be filtered. In other words, this will display all the transactions performed by the user from the specified account (not filtered by app).

Parameters

ParameterDescription
accountAccount from where the transaction was performed
fromDateStart date of transactions history range
toDateEnd date of transactions history range

Example

await connection?.GetTransactions(
  account,
  DateTime.Now.Subtract(TimeSpan.FromDays(60)),
  DateTime.Now.Subtract(TimeSpan.FromDays(2))
);

Response

Response Example


Card - GetTransactions

A method for obtaining and displaying transactions created from a card. The list will not be filtered. In other words, this will display all the transactions performed by the user from the specified account (not filtered by app).

Parameters

ParameterDescription
cardCredit card from where the transaction was performed
fromDateStart date of transactions history range
toDateEnd date of transactions history range

Example

await connection?.GetTransactions(
  card,
  DateTime.Now.Subtract(TimeSpan.FromDays(60)),
  DateTime.Now.Subtract(TimeSpan.FromDays(2))
);

Response

Response Example

📘

Note

Date range of the transactions that can be retrieved varies for each bank. The range supported by the users bank is shown in the response parameter transactionRange of Get Accounts Metadata endpoint. If the date range you provide is bigger than the transactionRange you'll get INVALID_DATE_RANGE error.

To make sure you always send a valid date range you should check the transactionsRange.
Example:

private async Task getTransactionsForNumberOfMonths(int numberOfMonths)
{
    int days = numberOfMonths * 30;
    var metadata = await _SelectedConnection?.GetAccountMetadata();
    var transactionRange = metadata.Data.TransactionRange;
    var unit = transactionRange.Unit;
    var value = transactionRange.Value;
    if (unit == null || value == null)
    {
        //Can't check transactions range..
    } else
    {
        var multiplier = 1;
        if(unit == DapiUnit.years)
        {
            multiplier = 365;
        } else if(unit == DapiUnit.months)
        {
            multiplier = 30;
        }
        else
        {
            multiplier = 1;
        }

        var transactionRangeValueInDays = value * multiplier;
        var date = new DateTime();
        if (transactionRangeValueInDays > days)
        {
            //numberOfMonths is within the transaction range
            date = DateTime.Now.Subtract(TimeSpan.FromDays(days));
        }
        else
        {
            //numberOfMonths is NOT within the transaction range, so we query only for the allowed range
            date = DateTime.Now.Subtract(TimeSpan.FromDays(transactionRangeValueInDays));
        }

        var transactions = await _SelectedConnection?.GetTransactions(_SelectedConnection.Accounts.First(), date, DateTime.Now);
    }
}