Open BankingB2B SuiteERP Integration
GuidesAPI ReferenceChangelog
Menu

Categories

Open BankingB2B SuiteERP Integration

  • GENERAL INFORMATION

    • Documentation guide
    • SingleView Open Banking
    • KSAOB standards
    • Security best practices
  • GETTING STARTED

    • Integration guide
    • Developer console
    • Establish secure connection
    • Generate access token
    • Make test raw data API call
    • Make test data use case API call
  • CONSENT MANAGEMENT

    • Overview
    • Create a consent
    • Retrieve consent details
    • Revoke a consent
  • Raw Data APIs

    • Introduction
    • View accounts
    • View balance
    • View transactions
    • Identify account holders (Parties)
    • Review direct debits
    • Review scheduled payments
    • Review standing orders
  • DATA USE CASE APIS

  • Plug-and-Play Integrations

    • Payly
  • RESOURCES

    • Errors & codes
    • Collections
    • API version management
    • Bank connectivity
  • API Archives


Android

Connect your Android app with SingleView SDK

Connect your Android app with SingleView SDK with the following steps:

  • Add the SingleviewSDK.arr file into the project’s libs directory
  • Add the below line in your build.gradle (App Level) inside dependencies scope implementation(files("libs/SingleViewSDK.aar"))
  • Enable viewbinding by adding the code below to your build.gradle (App Level)
Enable viewbinding
android { 
.. 
buildFeatures { 
viewBinding = true 
} 
}

Usage with View Controllers

Initialize

Connect

.connect()

Ensure proper setup of the SingleView SDK and make it ready to handle your requests, call SingleViewSDK.connect(context:Context, clientID:String, clientCode: String, version: String, merchantID: String?, language: SingleViewSDK.Companion.Language, customization: SingleViewSDK.Companion.Customization, callback: (result: Any) -> Unit) in onCreate() or before making any calls to the SDK. This will initialize the SDK with the necessary parameters, making it ready to function as expected within your app.

Begin by invoking the .connect() method of SingleViewSDK in the ViewDidLoad. To do this, you must pass the following parameters:

  • clientID
  • clientCode
  • version
  • merchantID
  • language
  • customization

It is mandatory to provide Merchant ID to access all the methods available within SingleView SDK. As for the language parameter, you can choose between English and Arabic using the SingleViewSDK.Companion.Language. Enum.

class Activity : AppCompatActivity() {
  private var context: Context = Activity.this
  private var clientID: String = "Your-Client-Id"
  private var clientCode: String = "Your-Client-Code"
  private var merchantID: String = "Your-Merchant-ID"
  private var version: String = "Version" 
  private var customization: String = SingleViewSDK.Companion.SVSDK.Customization
  override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity)
    //        Initializing SingleView SDK 
    SingleViewSDK.connect(
      context,
      clientID,
      clientCode,
      version,
      merchantID,
      true,
      SingleViewSDK.Companion.Language.ENGLISH,
      customization
    ) { result ->
      println("$response")
    }
  }
Note

Make sure to replace the above with the actual values or variables needed for the setup.

Set Callback

.setCallback()

Call SingleViewSDK.setCallback(callback:SingleViewSDKCallback) before using any of the SDK usecase services and implementing SingleViewSDKCallback Listener. This is a mandatory step that helps in generating a response in consent creation.

class Activity : AppCompatActivity() , SingleViewSDKCallback {
  private var context: Context = Activity.this
  override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity)
    SingleViewSDK.setCallback(this)
  }
  override fun onConsentCreation(response: Any) {
    println("$response")
  }
  override fun onSDKError(error: Any) {
    println("$error")
  }
}

Setup Merchant ID

.setupMerchantID()

⚙️Merchant ID can be set up during the initial setup or through the .setupMerchantID method.

SingleViewSDK.setupMerchantID(context:Context, merchantID: String) is used to ensure that the merchantID is set correctly and is ready to be used throughout your interactions with the SingleView SDK services.

Here's how you can initiate the method to .setupMerchantID:

class Activity : AppCompatActivity() {
  private var context: Context = Activity.this
  private var merchantID: String = "Your-Merchant-ID"
  override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity)
    SingleViewSDK.setMerchantId(context,merchantID){ result ->
      println("$response")
    }
  }

Manage Merchant

Create New Merchant

.createNewMerchant()

.createNewMerchant() is a method to create a new merchant in the SingleView SDK that requires the name, email and mobile parameter.

/c

SingleViewSDK.createNewMerchant(
context: Context,
name: String,
email: String,
mobile: String)
{ result ->
println("$response")
}

View Merchants

.getAllMerchants()

The .getAllMerchants() method serves the purpose of retrieving the list of all the Merchants' information that are mapped with a particular clientID and clientCode.

SingleViewSDK.getAllMerchants(
  context: Context, pageNo: String, pageCount: String){ result ->
  println("$response")
}

Consent Management

Create Consent

.createConsent()

The .createConsent() method facilitates the addition or creation of a consent for a bank account, allowing the retrieval of balance and transaction information. For the use case parameter, you can select one of the use cases available in our SDK's Usecases Enum.

SingleViewSDK.createConsent(context: Context, type: UseCase)

On successful creation, user will receive the positive & negative responses in the following respectively:

override fun onConsentCreation(response: Any) {
  println("$response")
}
override fun onSDKError(error: Any) {
  println("$error")
}

Revoke Consent

.revokeConsent()

The revokeConsent() method is designed to invalidate a consent that has been previously created and is active. To execute this method, you are required to provide the bank object with bankCode and ConsentID as parameters. The bank object is of type SVRequestBank, which contains the code for which the Consent ID is mapped to. Consent ID represents the unique identifier that was authorized by the Bank for specific account(s).

SingleViewSDK.revokeConsent(context: Context, 
                            bank: MutableList<SVRequestBank>)
{result ->        println("$response") }

Use Case Methods

Accounts

.allAccountsCheck()

The .allAccountsCheck() method is used to retrieve a list of accounts that are linked with a specific consent. To use this method, you must provide the bank object with bankCode and ConsentID as parameters. The bank object is of type SVRequestBank, which contains the code to which the consent ID is mapped.

Consent ID represents the unique identifier that is authorized by the Bank for the specific account(s). Using this information, the method will return a list of connected accounts associated with the provided consent.

SingleViewSDK.allAccountsCheck(
  context: Context, bank: MutableList<SVRequestBank>)
{result ->        println("$response") }

Balance

.getAllAccountsBalance()

The .getAllAccountsBalance() method is used to obtain a list of balances for accounts associated with a specific consent. To use this method, you must provide the bank object with bankCode and ConsentID as parameters. The bank object is of type SVRequestBank, which contains the code to which the consent ID is mapped.

Consent ID represents the unique identifier that was authorized by the Bank for the specific consent. By using this information, the method will return a list of balances for all accounts linked to the provided consent.

SingleViewSDK.getAllAccountsBalance(
  context: Context, bank: MutableList<SVRequestBank>)
{result ->        println("$response") }

.getAccountsBalanceByAccount()

The getAccountsBalanceByAccount() method is designed to provide the balance of a specific account. To use this method, you need to provide the bank object with bankCode, ConsentID, and also AccountID as parameters.

The bank object is of type SVRequestBank, which contains the code to which the consent ID is mapped. Consent ID represents the unique identifier that was authorized by the Bank for the specific consent. Account ID is the identification of the account for which the balance is required.

By using this information, the method will fetch and return the balance for the specified account associated with the given consent and bank.

SingleViewSDK.getAccountsBalanceByAccount(
  context: Context, bank: MutableList<SVRequestBank>)
{result ->        println("$response") }

Transactions

.getAllAccountsTransactions()

The getAllAccountsTransactions() method is designed to provide a list of transactions for all accounts associated with a specific consent. To use this method, you must provide the bank object with bankCode and ConsentID as parameters.

The bank object is of type SVRequestBank, which contains the code to which the consent ID is mapped. Consent ID represents the unique identifier that was authorized by the Bank for the specific consent. By providing this information, the method will retrieve and return a list of transactions for all accounts linked to the provided consent and bank. These transactions will include details such as transaction amount, date, description, and other relevant information related to each transaction for all the connected accounts.

SingleViewSDK.getAllAccountsTransactions(
  context: Context, fromDate: String, toDate: String,
  bank: MutableList<SVRequestBank>)
{result ->        println("$response") }

.getTransactionsByAccount()

The getTransactionsByAccount() method is intended to provide specific account transactions for a given account. To utilize this method, you need to provide the bank object with bankCode, ConsentID, and also Account ID as parameters.

SingleViewSDK.getTransactionsByAccount(
  context: Context, bank: MutableList<SVRequestBank>)
{result ->        println("$response") }

Direct Debits

.getAllAccountsDirectDebits()

The getAllAccountsDirectDebits() method is used to retrieve a list of direct debits for all accounts associated with a specific consent. To use this method, you must provide the bank object with bankCode and ConsentID as parameters.

The bank object is of type SVRequestBank, which contains the code to which the consent ID is mapped. Consent ID represents the unique identifier that was authorized by the Bank for the specific consent. By providing this information, the method will fetch and return a list of direct debits for all accounts linked to the provided consent and bank.

SingleViewSDK.getAllAccountsDirectDebits(
  context: Context, bank: MutableList<SVRequestBank>)
{result ->        println("$response") }

.getDirectDebitsByAccount()

The getDirectDebitsByAccount() function allows you to retrieve the Direct Debits associated with a particular account. To use this method, you must provide the bank object with the bankCode, ConsentID, and the Account ID as parameters.

SingleViewSDK.getDirectDebitsByAccount(
  context: Context, bank: MutableList<SVRequestBank>)
{result ->        println("$response") }

Standing Orders

.getAllAccountsStandingOrders()

The getAllAccountsStandingOrders() method is designed to provide a list of standing orders for all accounts associated with a specific consent. To utilize this method, you must provide the bank object with bankCode and ConsentID as parameters.

By providing this information, the method will retrieve and return a list of standing orders for all accounts linked to the provided consent and bank.

SingleViewSDK.getAllAccountsStandingOrders(
  context: Context, bank: MutableList<SVRequestBank>)
{result ->        println("$response") }

.getStandingOrdersByAccount()

The getTransactionsByAccount() function is designed to retrieve the Standing Orders associated with a particular account. To use of this method, you must provide the bank object with the bankCode, ConsentID, and the Account ID as parameters.

SingleViewSDK.getStandingOrdersByAccount(
  context: Context, bank: MutableList<SVRequestBank>)
{result ->        println("$response") }

Scheduled Payments

.getAllAccountsSchedulePayments()

The getAllAccountsSchedulePayments() method is used to retrieve a list of scheduled payments for all accounts associated with a specific consent. To use this method, you must provide the bank object with bankCode and ConsentID as parameters.

By providing this information, the method will fetch and return a list of scheduled payments for all accounts linked to the provided consent and bank.

SingleViewSDK.getAllAccountsSchedulePayments(
  context: Context, bank: MutableList<SVRequestBank>)
{result ->        println("$response") }

.getSchedulePaymentsByAccount()

The getSchedulePaymentsByAccount() method is designed to retrieve specific account schedule payments. It requires the bank object containing bankCode and ConsentID and the AccountID to fetch the schedule payments for the specified account.

SingleViewSDK.getSchedulePaymentsByAccount(
  context: Context, bank: MutableList<SVRequestBank>)
{result ->        println("$response") }

Use cases

Account Aggregation

.getAccountAggregationData()

The getAccountAggregationData() method will fetch the account data like balance and transactions. For this method you need to provide the bank object with bankCode and ConsentID and also formDate and toDate as a param. Here the bank is the SVRequestBank object which contains for which the Consent ID is mapped to, and ConsentID is the identification that is authorised by the Bank. And formDate param is used to get the statement from, toDate to get the statement to, and Date should be in ISO format Ex: 2022-07-12T11:11:29.245Z.

SingleViewSDK.getAccountAggregationData(
  context: Context,
  fromDate: String,
  toDate: String,
  bank: MutableList<SVRequestBank>)
{result ->        println("$response") }

E-Statement

.getEStatementData()

The getEStatementData() method will fetch account transactions for the specified date range. For this method you need to provide the bank object with bankCode and ConsentID and also formDate and toDate as a param. Here the bank is the SVRequestBank object which contains for which the Consent ID is mapped to, and ConsentID is the identification that is authorised by the Bank. And formDate param is used to get the statement from, toDate to get the statement to, and Date should be in ISO format Ex: 2022-07-12T11:11:29.245Z.

SingleViewSDK.Companion.getEStatementData(
  context: Context,
  fromDate: String,
  toDate: String,
  bank: MutableList<SVRequestBank>)
{result ->        println("$response") }

Income Check

.getIncomeCheckData()

The getIncomeCheckData() method will give you the Income check data of the account(s) for a specific date range. For this method you need to provide the bank object with bankCode and ConsentID and also formDate and toDate as parameters.

SingleViewSDK.getIncomeCheckData(
  context: Context,
  fromDate: String,
  toDate: String,
  timeline: String,
  bank: MutableList<SVRequestBank>)
{result ->        println("$response") }

Expense Check

.getExpenseCheckData()

The getExpenseCheckData() method gives you the expenses data for a specific date range. For this method you need to provide the bank object with bankCode and ConsentID and also formDate and toDate as parameter.

SingleViewSDK.getExpenseCheckData(
  context: Context,
  fromDate: String,
  toDate: String,
  timeline: String,
  bank: MutableList<SVRequestBank>)
{result ->        println("$response") }

KYC Info

.getKYCInfoData()

The getKYCInfoData() method fetches the KYC info data from the bank for the specified bank account for a specific date range. For this method you need to provide the bank object with bankCode and ConsentID and also formDate and toDate as parameters.

SingleViewSDK.getKYCInfoData(
  context: Context,
  fromDate: String,
  toDate: String,
  bank: MutableList<SVRequestBank>)
{result ->        println("$response") }

Credit Check

.getCreditCheckData()

The getCreditCheckData() method fetches the account info and data needed to perform credit check from the bank for the specified bank account and date range. For this method you need to provide the bank object with bankCode and ConsentID and also formDate and toDate as parameters.

SingleViewSDK.getCreditCheckData(
  context: Context,
  fromDate: String,
  toDate: String,
  bank: MutableList<SVRequestBank>)
{result ->        println("$response") }

IBAN Verification

.getIBANVerificationForAllAccountsResponse()

The .getIBANVerificationForAllAccountsResponse() method fetches validates the given IBANs. For this method you need to provide the bank object with bankCode and ConsentID and also formDate and toDate as parameters.

Here the bank is the SVRequestBank object which contains code for which the consentid is mapped to, and ConsentID is the ID which is authorised from the Bank. And iban number which needs to be validated.

SingleViewSDK.getIBANVerificationForAllAccountsResponse(
  context: Context, bank: MutableList<SVRequestBank>)
{result ->        println("$response") }

.getIBANVerificationByAccountResponse()

The .getIBANVerificationByAccountResponse() method fetches validates the given IBAN for an account. This method requires you need to provide the bank object with bankCode and ConsentID and also formDate and toDate as parameters.

Here the bank is the SVRequestBank object which contains code for which the consentid is mapped to, and ConsentID is the ID which is authorised from the Bank. And iban number which needs to be validated.

SingleViewSDK.getIBANVerificationByAccountResponse(
  context: Context, bank: MutableList<SVRequestBank>)
{result ->        println("$response") }

Customer Verification

.getCustomerVerificationResponse()

The getCustomerVerificationResponse() method will give you the customer verification response. For this method you need to provide the bank object with bankCode as a parameter. Here the bank is the SVRequestBank object which contains code for which the consentid is mapped and authorized by the Bank.

SingleViewSDK.getCustomerVerificationResponse(
  context: Context, bank: MutableList<SVRequestBank>)
{result ->        println("$response") }

Tax Filing

.getTaxFilingData()

The getTaxFilingData() method will give you the Tax filing report data for a specific date range and mentioned Consent ID. For this method you need to provide the bank object with bankCode and ConsentID and also formDate and toDate as a parameters. Here the bank is the SVRequestBank object which contains code for which the consentid mapped to an account authorized by the Bank. formDate parameter is used to get the Tax filing report from till the toDate mentioned in the ISO format Ex: 2022-07-12T11:11:29.245Z.

SingleViewSDK.getTaxFilingData(
  context: Context,
  fromDate: String,
  toDate: String,
  timeline: String,
  bank: MutableList<SVRequestBank>)
{result ->        println("$response") }

Customization

Language

 

 

ar

Arabic

en

English

Updated June 22, 2026

PreviousConnect SDKNextiOS
Was this helpful?