Introducing VIDA Identity Stack: All of VIDA, in one place 🎉
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Integration Steps

Import VIDA VidaShield

The first step is to import the VidaShield class into your Application, Activity or Fragment. This class serves as the entry point for all operations — initialization, starting and submitting the data for verification, and releasing resources.

import id.vida.vidashield.VidaShield

Initialize Fraud Shield SDK

In order to use the fraud shield SDK it is necessary to initialize the SDK with mandatory and optional parameters such as clientTransactionID, userHashId, Flow type etc.

Option
Type
Description

clientTransactionID

String

Mandatory : This is client’s transactionID for the specific flow, this will also used by customer to fetch the fraud details from backend

userId

String

Mandatory: UserID or hash of the UserID.

Purpose:

  • Identity Persistence: Maintains a consistent identifier for the user across different devices and app lifecycles (e.g., recognizing a user after an uninstall and reinstall).

  • Device Monitoring: Enables the system to track how many unique users authenticate on a single physical device, ensuring compliance with established security or operational rules.

Flow

String

Optional: This is the flow type where SDK is used for example : login, profile page, transaction page etc.

apiKey

String

Mandatory: This is provided by VIDA

licenseKey

String

Mandatory: This is provided by VIDA

clientId

String

Mandatory: This is provided by VIDA

Initialize SDK
private fun initializeSDK(customerTransactionID: String) {
val vidaShieldConfig = VidaShieldConfig(
    apiKey = KeyConstant.API_KEY,
    licenseKey = KeyConstant.LICENSE_KEY,  
    clientId = KeyConstant.CLIENT_ID, 
    clientTransactionId = customerTransactionID,
    userHashId = UserIDManager.getUUID(applicationContext),
    flow = getString(R.string.login)
        )
        try {
            if (!VidaShield.shared.isInitialized()) {
                VidaShield.shared.initialize(applicationContext, vidaShieldConfig)
            }
        } catch (exception: VIDAException) {
            // VIDA SDK Exception with proper error codes
        }
    }

//Note: If isInitialized() returns true, it indicates that the //SDK is already initialized. If the application needs to //reinitialize the SDK due to a configuration update, use the //updateConfiguration() API. To force a fresh initialization, //call release() first and then initialize the SDK again.

isSDKInitialized() method

This method checks whether the SDK has been initialized and returns the status as a boolean (true or false)

Call SubmitData API

submitData() is an asynchronous SDK method that initiates the submission of collected data to the VIDA server for analysis. Customers can then call VIDA’s backend API to retrieve transaction details using the clientTransactionID.

The Application (or calling component) must implement VidaShieldResult. The SDK invokes the onResult() callback once processing is complete.

onResult(response: VidaShieldResponse)

Called by the SDK after data submission. VidaShieldResponse contains:

  • status → indicates success or failure

  • successDetails → additional data or error information returned by the SDK

  • errorDetails → error information like error code and error message. Application should log this information.

updateConfiguration API

updateConfiguration() is an asynchronous SDK API that allows applications to update configuration parameters after SDK initialization.

This API is useful when certain values—such as flow type, transactionId, or other runtime parameters—are not available during initial SDK setup and need to be updated later in the user journey.

The application must implement VidaShieldConfigResult. The SDK returns the result via the onResult() callback.

Release Resources

Releasing resources after completing a functionality is essential. It ensures that all threads and temporary memory allocations used by the SDK are properly cleaned up. Calling release() after a session completes helps free SDK-related objects from memory.

Last updated