--- title: "Cordova plugin | Veriff.com" slug: "cordova-plugin" description: "Apache Cordova solution for hybrid mobile applications." updated: 2025-12-12T11:11:23Z published: 2025-12-12T11:11:23Z canonical: "devdocs.veriff.com/cordova-plugin" --- > ## Documentation Index > Fetch the complete documentation index at: https://devdocs.veriff.com/llms.txt > Use this file to discover all available pages before exploring further. # Cordova plugin ## Requirements and prerequisites ### Requirements Integration with Cordova plugin requires the project to target at least iOS version 13.0 and Android version 5.0 (API level 21) or higher. *→ See the* [*Backwards compatible changes*](/v1/docs/backwards-compatible-changes) *and ensure your systems are able to handle these* ### Prerequisites - You have an active account with Veriff (see the [Getting Started](/v1/docs/getting-started) section) - You have an integration with Veriff (see the [Getting Started](/v1/docs/getting-started) section) - You have set up webhook(s) to get replies from Veriff (see the [Webhooks](/v1/docs/webhooks-guide) section) --- ## Add the plugin to the project Add the Veriff Cordova plugin to your project: ```bash cordova plugin add @veriff/cordova-plugin-veriff ``` Adding this plugin will make the `window.cordova.plugins.Veriff` global object available once the `deviceready` event propagates. --- ## Add permissions ### Foreground service information declaration in Play Console The SDK declares and uses the `FOREGROUND_SERVICE_DATA_SYNC`. If you distribute your application on Google Play, then you must declare the foreground service information in Play Console (**Policy** > **App content** > **Foreground service Permissions**) . Read the instructions in the [Google Play](https://support.google.com/googleplay/android-developer/answer/13392821?hl=en#declare)[↗]. According to Google, you need to: 1. Provide a **description of the app functionality** that is using each foreground service type. 1. You may use the following description: “*The Veriff SDK uses the foreground service to upload end-user data to Veriff's servers for verification purposes.*” 2. **Describe the user impact** **if the task is deferred by the system** (does not start immediately), and/or the **task is interrupted by the system** (paused and/or restarted). 1. You may use the following description: “*If the task is deferred or interrupted by the system, the end-user verification will be delayed.*” 3. **Include a link to a video demonstrating each foreground service feature**. The video should demonstrate the steps the user needs to take in your app in order to trigger the feature. 1. Please record a video of your app's Veriff SDK integration and share it (via link, Youtube, etc.) 4. Choose your **specific use case for each foreground service type**. 1. Select use case: "*Network transfer: Upload or download / Other*" See also Veriff's note on [data collection purposes in your app](https://www.veriff.com/data-collection-purposes) [↗]. Note that all the info above is only for Google for review purposes, it is not accessible to the end-users. ### iOS specific configuration #### Usage descriptions Veriff requires camera, microphone, photo library and optionally NFC reader permissions for capturing photos, video and scanning passport during identification. Your application is responsible for describing the reason why camera, microphone, photo library and NFC reader are used. You need add the three descriptions listed below to `config.xml` of your application with the explanation of the usage: - `NSCameraUsageDescription` - `NSMicrophoneUsageDescription` - `NSPhotoLibraryUsageDescription` > [!CAUTION] > Not adding these permissions will cause the system to shut down the application when it requests the permissions. ```xml                    Access to camera is needed for user identification purposes                            Access to microphone is needed for video identification                            Access to photo library is needed uploading proof of address documents         ``` ### Enable NFC scanning The NFC scanning logic is provided as a separate framework. If this feature is enabled in your integration, you can add the framework by adding local `cordova-plugin-veriffnfc` plugin: ```bash cordova plugin add plugins/cordova-plugin-veriff/cordova-plugin-veriffnfc ``` #### NFC scanning permissions 1. Add `NFCReaderUsageDescription` description to `config.xml` . ```custom Access to NFC is needed for user identification purposes ``` 2. In the `Info.plist` file, define the list of application IDs or AIDs it can connect to (the AID is a way of uniquely identifying an application on a ISO 7816 tag, which is usually defined by a standard) ```custom A0000002471001 A0000002472001 00000000000000 ``` 3. Introduce a new entitlement for NFC scanning, a feature made available from iOS 13 onwards. Xcode automatically adds this entitlement when you activate the Near Field Communication Tag Reading feature in the target Signing & Capabilities. Following the activation of this feature, the *.entitlements file should include the TAG format. ```custom TAG ``` #### Set the iOS target in Xcode Make sure that the 'iOS Deployment Target' in Xcode (under Project > target > Info > Deployment Target) is set to iOS 13.0 or later. --- ## Start the verification flow The Veriff Plugin has a single function to start a verification attempt: `start(callback, sessionUrl, configuration)` - `callback` (*required) - a callback that will be invoked with the verification attempt result. The `callback` includes the result object which indicates the end-user flow completion status, and not the verification session decision. See [Verification session status](/v1/docs/cordova-plugin#verification-session-status) section below for info. - `sessionUrl` (*required) - `sessionUrl` can be received from your backend implementation. `sessionUrl` should be unique for each call. Check [POST /sessions](https://devdocs.veriff.com/apidocs/v1sessions) endpoint in the API documentation to learn how to generate one. - `configuration` (optional) - an object that allows the customization of the Veriff plugin, including your brand's colors, font and logo. See [Customization](/v1/docs/cordova-plugin#customize-the-sdk) section below for more info. The supported properties are: - - `branding` (optional) - customize various branding options - `locale` (optional) - override the user interface language (default: device language) - `customIntroScreen` (optional) - Veriff supports replacing introduction screen with a custom client developed introduction screen for eligible customers - `vendorData` (optional) - Veriff supports the option to override vendor data. --- ## Verification session status The `result` returned by `Veriff.start` will have a `status` field that is one of either `Veriff.STATUS_DONE`, `Veriff.STATUS_CANCELED` or `Veriff.STATUS_ERROR`. In case the status is `Veriff.STATUS_ERROR` there will be a error code (not human-readable) in the error field. > [!NOTE] > **This is not the verification session decision.** > > This indicates whether the end-user was able to complete all the steps in the verification flow or not. ```javascript window.cordova.plugins.Veriff.start(    function (result) {        console.log("Veriff SDK result: status: " + result.status + ", error: " + result.error);        switch (result.status) {            case STATUS_DONE:                // end-user submitted the images and completed the flow                // note that this does not mean a final decision yet                break;            case STATUS_CANCELED:                // end-user canceled the flow before completing                break;            case STATUS_ERROR:                // the flow could not be completed due to an error                console.log("Veriff verification failed with error=" + result.error);                switch (result.error) {                    case UNABLE_TO_ACCESS_CAMERA:                        // unable to access camera, likely due to no permission                        break;                    case UNABLE_TO_ACCESS_MICROPHONE:                        // unable to access camera, likely due to no permission                        break;                    case NETWORK_ERROR:                        break;                    case SESSION_ERROR:                        break;                    case UNKNOWN_ERROR:                        break;                    case UNSUPPORTED_SDK_VERSION:                        break;                }                break;        }    },    sessionUrl ); ``` --- ## Verification session decision Veriff returns info about the verification session decision, extracted data, registries checks etc via **webhooks**. You need to set up webhooks and tie them to your system. → *See Webhooks Guide > [Set up webhooks](https://veriff-dev-documentation.document360.io/docs/webhooks-guide#set-up-webhooks) sub-section for detailed overview of the setup process* --- ## Customize the SDK > [!NOTE] > SDK customization is optional It is possible to customize the look and feel to match your branding elements (including colors and fonts), add custom intro screen, and set the language settings for the SDK. ### Match the brand Veriff Cordova plugin allows the customization of your brand's colors, font and logo in the SDK flow. Note: all custom values for branding are optional. If a value is not provided for them, the default Veriff color and logo will be used. **Pass the optional parameters** when launching Veriff: ```javascript window.cordova.plugins.Veriff.start(    function (result) {        console.log("Veriff SDK result: status: " + result.status + ", error: " + result.error);    },    sessionUrl,    {        branding: {            logo: 'parrot',            background: '#ff00ff',            onBackground: '#ffffff',            onBackgroundSecondary: '#ff00ff',            onBackgroundTertiary: '#000000',            primary: '#333333',            onPrimary: '#444444',            secondary: '#333333',            onSecondary: '#444444',            outline: '#444444',            cameraOverlay: '#59496a',            onCameraOverlay: '#e27e23',            error: '#333333',            success: '#444444',            buttonRadius: 28,            iOSFont: {                regular: 'Font-Regular',                medium: 'Font-Medium',                bold: 'Font-Bold',            },            androidFont: {                regular: 'font_regular.ttf',                medium: 'font-medium.ttf',                bold: 'font_bold.ttf',            }        }    }, ); ``` For logo, the image assets need to be added into: - `Xcode` assets in the iOS project, and - `drawable folders` in the Android project In the example above you would need to add an image asset named 'parrot' into Xcode assets and 'parrot.png' to Android drawable folder`android/src/main/res`. *→ See the [Visual SDK customization guides](https://devdocs.veriff.com/docs/sdk-guide#visual-sdk-customization-guides) article for design examples* ### Intro screen In some cases, it is possible to replace the Veriff’s generic introduction screen with a custom intro screen. > [!NOTE] > Check with your **Solutions Engineer** to confirm if this feature can be enabled for your integration If it is possible, the following will happen: - You agree your own introduction screen visuals and copy with our Solutions Engineer and get relevant legal documents signed in case they are needed - After that Veriff will enable custom introduction screen from backend for your integrations - After you have implemented your own introduction screen you can change the configuration option specified below ```javascript var result = await VeriffSdk.launchVeriff({    sessionUrl: SESSION_URL,    locale: 'et',    customIntroScreen: true  }); ``` > [!CAUTION] > Adding the configuration alone in your app is not enough to enable the custom intro screen. Make sure to contact your solutions engineer so they can enable the feature for your integration. ### User interface language settings Veriff Cordova plugin allows setting the language of the SDK. In order to use this language, pass the `locale` as in example below. ```javascript window.cordova.plugins.Veriff.start(    function (result) {        console.log("Veriff SDK result: status: " + result.status + ", error: " + result.error);    },    sessionUrl,    {        locale: 'et'    } ); ``` *→ See* [*Supported languages in SDKs*](/v1/docs/sdk-guide#supported-languages) *article for more info* --- ## Changelog | Date | Description | | --- | --- | | Dec 12, 2025 | Duplicate word removed | | Jul 8, 2025 | Min iOS target version changed from 11.0 to 13.0 Added [Enable NFC scanning](/v1/docs/cordova-plugin#enable-nfc-scanning) section | | Mar 12, 2025 | Documentation published | ## Related - [Create verification session](/how-to-generate-sessions-manually.md) - [Intro to the API](/quick-guide-of-idv-using-the-api.md) - [Webhooks Guide](/webhooks-guide.md) - [iOS SDK guide](/ios-sdk-guide.md) - [Android SDK guide](/android-sdk-guide.md) - [Backwards compatible changes](/backwards-compatible-changes.md)