Quick start

From an empty project to the first check, nothing skipped: first allow your app on the server, then create an app on Android, iOS, Flutter or React Native — instructions for each platform are below on this page. At the end you have an app with one Start KYC button that runs a real check and shows its result.

Each platform in depth: Android, iOS, Flutter, React Native.

Step 0. What you need

WhatWhere from
The SDK packageRequest it through support. Below, <package> is the folder you unpacked it to
apiHost — the KYC API addressFrom NeuroVision, for the test and the production server
The scenario ID and its secret keyYour dashboard, the “KYC/AML” section
A phoneAndroid (arm64 or armeabi-v7a; an x86_64 emulator will not do) or an iPhone (the simulator has no camera)

Step 1. Allow your app on the server

The NeuroVision server lets in only the addresses (origins) on its list. A website comes with its domain; an app comes with its Application ID (Android) or Bundle Identifier (iOS).

For now an app's address is written with the https:// prefix: https:// + the app's id. Later apps will get a separate kind of entry; we will let you know.

1. Find your app's id:

PlatformWhere the id is
Android, Flutter (Android), React Native (Android)applicationId in app/build.gradle.kts or android/app/build.gradle
iOS, Flutter (iOS), React Native (iOS)Xcode → the app’s target → General → Bundle Identifier

2. Make the address: https:// + the id, exactly as written, with no trailing / and no spaces.

idAddress for the list
com.example.mykychttps://com.example.mykyc
com.example.my_kychttps://com.example.my_kyc

3. Add the address to the list of allowed origins in your dashboard: "Access" → "Allowed domains", where the website's domains are. You can do this yourself.

4. Every build is its own address. If a debug build has a suffix (applicationIdSuffix = ".debug" → com.example.mykyc.debug) or the iOS app has a different bundle id than the Android one, add each.

If the address is not on the list, the check stops at once with "Verification is not available on this domain. Please contact the site administrator." If you see it, come back to this step.

Step 2. Values for the first check

The first check needs two values:

ValueWhere from
schemaIdThe scenario ID from the “KYC/AML” section of your dashboard
clientKeyEncrypt any test value, for example test-1, with the scenario secret key — ready-made Node.js and Python code is on the Server integration page, section “Minting the client key”

For each next check take a new value — test-2, test-3 and so on: one clientKey is one session, and running again with it opens the previous one.

For the first check these values can go straight into the code. In a real app your server sends schemaId and the encrypted clientKey, and the scenario secret never enters the app.


Android (Kotlin)

You need a recent Android Studio and JDK 17.

A1. Create the project

  1. Android Studio → New Project → Empty Activity → Next.
  2. Name: MyKyc, Package name: com.example.mykyc, Language: Kotlin, Minimum SDK: API 26, Build configuration language: Kotlin DSL → Finish.

A2. Put the SDK next to the project

Copy the <package>/sdk/android/maven folder into the project's root as third_party/neurovision-maven:

MyKyc/
├── app/
├── third_party/
│   └── neurovision-maven/
│       └── ru/neurovision/kyc/kyc-sdk/0.6.2/…
└── settings.gradle.kts

A3. settings.gradle.kts — where the SDK comes from

Find the dependencyResolutionManagement block and add maven { … } first in repositories:

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        maven {
            url = uri(settingsDir.resolve("third_party/neurovision-maven"))
            content { includeGroup("ru.neurovision.kyc") }
        }
        google()
        mavenCentral()
    }
}

A4. app/build.gradle.kts — add the SDK

android {
    defaultConfig {
        applicationId = "com.example.mykyc"   // the id you allowed in step 1
        minSdk = 26
        // …
    }
}

dependencies {
    implementation("ru.neurovision.kyc:kyc-sdk:0.6.2")
    // … the rest Android Studio created
}

Press Sync Now. The SDK asks for the camera permission itself — add nothing to the manifest.

A5. MainActivity.kt — a button and the result

Replace the contents of app/src/main/java/com/example/mykyc/MainActivity.kt:

package com.example.mykyc

import ru.neurovision.kyc.NeuroVisionKyc
import ru.neurovision.kyc.KycRequest
import ru.neurovision.kyc.KycResult
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Button
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp

// Values from step 2. In a real app your server sends schemaId and the encrypted clientKey.
private const val API_HOST = "PASTE_API_HOST"   // the address NeuroVision sent you
private const val SCHEMA_ID = "PASTE_SCHEMA_ID"
private const val CLIENT_KEY = "PASTE_CLIENT_KEY"

class MainActivity : ComponentActivity() {
    private var status by mutableStateOf("Press the button")

    private val kyc = registerForActivityResult(NeuroVisionKyc.contract()) { result ->
        status = when (result) {
            is KycResult.Completed -> "Completed: ${result.verdict}"   // Success | Failed | Suspicious | Expired | Unknown
            KycResult.Cancelled -> "Cancelled"                         // the user left before the end
            is KycResult.Failed -> "Failed: ${result.reason} ${result.message.orEmpty()}"
        }
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
            MaterialTheme {
                Surface(Modifier.fillMaxSize()) {
                    Column(
                        Modifier.padding(24.dp),
                        verticalArrangement = Arrangement.spacedBy(16.dp),
                        horizontalAlignment = Alignment.CenterHorizontally,
                    ) {
                        Button(onClick = { kyc.launch(KycRequest(API_HOST, SCHEMA_ID, CLIENT_KEY)) }) {
                            Text("Start KYC")
                        }
                        Text(status)
                    }
                }
            }
        }
    }
}

A check by task (taskId)? Then instead of KycRequest(API_HOST, SCHEMA_ID, CLIENT_KEY) use KycRequest(API_HOST, KycIdentity.Task("PASTE_TASK_ID")) and import ru.neurovision.kyc.KycIdentity.

A6. Run it

Connect the phone over USB with "USB debugging" on, pick it at the top of Android Studio and press Run ▶. Press Start KYC, go through the check, and the result appears below, for example Completed: Success.


iOS (SwiftUI)

You need Xcode 26+ and an iPhone with iOS 15 or newer.

I1. Create the project

  1. Xcode → File → New → Project… → iOS → App → Next.
  2. Product Name: MyKyc, Organization Identifier: com.example, Interface: SwiftUI, Language: Swift → Next.
  3. Target MyKyc → General → Minimum Deployments: iOS 15.0. The Bundle Identifier (com.example.MyKyc) is the id to allow in step 1: https://com.example.MyKyc.
  4. Signing & Capabilities: pick your Team.

I2. Add the SDK

  1. Copy <package>/sdk/ios/NeuroVisionKyc (the folder with Package.swift and Frameworks/) into the project's folder as third_party/NeuroVisionKyc.
  2. File → Add Package Dependencies… → Add Local…, pick third_party/NeuroVisionKyc, and add the NeuroVisionKyc library to the MyKyc target.

I3. The camera text

Target MyKyc → Info → add the key Privacy – Camera Usage Description (NSCameraUsageDescription) with a text such as The camera photographs your document and films the liveness check. Without it iOS ends the app the moment the camera opens.

I4. ContentView.swift — a button and the result

Replace the whole file:

import NeuroVisionKyc
import SwiftUI

// Values from step 2. In a real app your server sends schemaId and the encrypted clientKey.
private let apiHost = URL(string: "PASTE_API_HOST")!   // the address NeuroVision sent you
private let schemaId = "PASTE_SCHEMA_ID"
private let clientKey = "PASTE_CLIENT_KEY"

struct ContentView: View {
    @State private var running = false
    @State private var status = "Press the button"

    var body: some View {
        VStack(spacing: 16) {
            Button("Start KYC") { running = true }
                .buttonStyle(.borderedProminent)
            Text(status)
        }
        .fullScreenCover(isPresented: $running) {
            NeuroVisionKycView(request: KycRequest(apiHost: apiHost, schemaId: schemaId, clientKey: clientKey)) { result in
                running = false
                switch result {
                case .completed(let verdict): status = "Completed: (verdict.rawValue)"
                case .cancelled: status = "Cancelled"
                case .failed(let reason, let message): status = "Failed: (reason.rawValue) (message ?? "")"
                @unknown default: status = "Unknown result"
                }
            }
        }
    }
}

A check by task (taskId)? Then use KycRequest(apiHost: apiHost, identity: .task(taskId: "PASTE_TASK_ID")).

I5. Run it

Connect the iPhone, pick it at the top of Xcode and press Run ▶. Press Start KYC, go through the check, and the result appears under the button.


Flutter

You need Flutter 3.47+, Android Studio (the Android SDK), and Xcode 26+ for iOS.

F1. Create the project

flutter create --org com.example --platforms android,ios my_kyc
cd my_kyc

The ids come out like this — allow them in step 1:

idAddress for the list
Androidcom.example.my_kyc
iOScom.example.myKyc

F2. Put the SDK into the project

Copy from the SDK package:

FromTo
<package>/sdk/flutter/neurovision_kycmy_kyc/third_party/neurovision_kyc
<package>/sdk/android/mavenmy_kyc/third_party/neurovision-maven

F3. pubspec.yaml — add the plugin

dependencies:
  flutter:
    sdk: flutter
  neurovision_kyc:
    path: third_party/neurovision_kyc

Then run flutter pub get.

F4. Android: the SDK's repository and minSdk

android/build.gradle.kts — in allprojects { repositories { … } } add maven { … } first:

allprojects {
    repositories {
        maven {
            url = uri(rootProject.projectDir.resolve("../third_party/neurovision-maven"))
            content { includeGroup("ru.neurovision.kyc") }
        }
        google()
        mavenCentral()
    }
}

android/app/build.gradle.kts — replace minSdk = flutter.minSdkVersion with:

        minSdk = 26

F5. iOS: the iOS version and the camera text

1. open ios/Runner.xcworkspace → target Runner → General → Minimum Deployments: 15.0. If the project has ios/Podfile, uncomment its platform line and make it platform :ios, '15.0'.

2. ios/Runner/Info.plist — inside <dict>:

<key>NSCameraUsageDescription</key>
<string>The camera photographs your document and films the liveness check.</string>

3. In the same place, Signing & Capabilities: pick your Team.

F6. lib/main.dart — a button and the result

Replace the whole file:

import 'package:neurovision_kyc/neurovision_kyc.dart';
import 'package:flutter/material.dart';

// Values from step 2. In a real app your server sends schemaId and the encrypted clientKey.
const apiHost = 'PASTE_API_HOST'; // the address NeuroVision sent you
const schemaId = 'PASTE_SCHEMA_ID';
const clientKey = 'PASTE_CLIENT_KEY';

void main() => runApp(const MaterialApp(home: KycPage()));

class KycPage extends StatefulWidget {
  const KycPage({super.key});

  @override
  State<KycPage> createState() => _KycPageState();
}

class _KycPageState extends State<KycPage> {
  String _status = 'Press the button';

  Future<void> _start() async {
    final result = await NeuroVisionKyc.start(
      const KycRequest(apiHost: apiHost, schemaId: schemaId, clientKey: clientKey),
    );
    // or: KycRequest.task(apiHost: apiHost, taskId: 'PASTE_TASK_ID')
    setState(() {
      _status = switch (result) {
        KycCompleted(:final verdict) => 'Completed: $verdict',
        KycCancelled() => 'Cancelled',
        KycFailed(:final reason, :final message) => 'Failed: $reason ${message ?? ''}',
      };
    });
  }

  @override
  Widget build(BuildContext context) => Scaffold(
        body: Center(
          child: Column(mainAxisSize: MainAxisSize.min, children: [
            FilledButton(onPressed: _start, child: const Text('Start KYC')),
            const SizedBox(height: 16),
            Text(_status),
          ]),
        ),
      );
}

F7. Run it

flutter devices          # the phone must be listed
flutter run              # an iPhone: flutter run -d <iPhone id>

Press Start KYC, go through the check, and the result appears under the button.


React Native

You need Node 22.11+, JDK 17, Android Studio (Android SDK platform 36+), and Xcode 26+ with CocoaPods for iOS. Expo will not do: this needs bare React Native.

R1. Create the project

npx @react-native-community/cli@latest init MyKyc --version 0.87.1
cd MyKyc

The ids come out like this — allow them in step 1 (the iOS id can be changed in Xcode → General → Bundle Identifier):

idAddress for the list
Androidcom.mykyc
iOSorg.reactjs.native.example.MyKyc

R2. Put the SDK into the project and install the package

Copy from the SDK package:

FromTo
<package>/sdk/react-native/neurovision-react-native-kyc-0.6.2.tgzMyKyc/third_party/neurovision-react-native-kyc-0.6.2.tgz
<package>/sdk/android/mavenMyKyc/third_party/neurovision-maven
npm install ./third_party/neurovision-react-native-kyc-0.6.2.tgz

R3. Android: the SDK's repository, minSdk, launchMode

android/build.gradle:

1. In buildscript { ext { … } } set minSdkVersion = 26.

2. At the end of the file add:

allprojects {
    repositories {
        maven {
            url = new File(rootProject.projectDir, "../third_party/neurovision-maven").toURI()
            content { includeGroup("ru.neurovision.kyc") }
        }
    }
}

android/app/src/main/AndroidManifest.xml — on <activity android:name=".MainActivity" …> replace android:launchMode="singleTask" with android:launchMode="singleTop". With singleTask the check is lost if the user minimizes the app and comes back to it through its icon.

R4. iOS: the camera text, pods

1. ios/MyKyc/Info.plist — inside <dict>:

<key>NSCameraUsageDescription</key>
<string>The camera photographs your document and films the liveness check.</string>

2. cd ios && pod install && cd ..

3. open ios/MyKyc.xcworkspace → target MyKyc → Signing & Capabilities → your Team.

R5. App.tsx — a button and the result

Replace the whole file:

import { useState } from 'react';
import { Button, StyleSheet, Text, View } from 'react-native';
import { NeuroVisionKyc, KycError } from '@neurovision/react-native-kyc';

// Values from step 2. In a real app your server sends schemaId and the encrypted clientKey.
const apiHost = 'PASTE_API_HOST'; // the address NeuroVision sent you
const schemaId = 'PASTE_SCHEMA_ID';
const clientKey = 'PASTE_CLIENT_KEY';

export default function App() {
  const [status, setStatus] = useState('Press the button');

  async function start() {
    try {
      const result = await NeuroVisionKyc.start({ apiHost, schemaId, clientKey });
      // or: NeuroVisionKyc.start({ apiHost, taskId: 'PASTE_TASK_ID' })
      switch (result.kind) {
        case 'completed':
          setStatus(`Completed: ${result.verdict}`);
          break;
        case 'cancelled':
          setStatus('Cancelled');
          break;
        case 'failed':
          setStatus(`Failed: ${result.reason} ${result.message ?? ''}`);
          break;
      }
    } catch (e) {
      setStatus(e instanceof KycError ? `Misuse: ${e.code}` : String(e));
    }
  }

  return (
    <View style={styles.screen}>
      <Button title="Start KYC" onPress={start} />
      <Text style={styles.status}>{status}</Text>
    </View>
  );
}

const styles = StyleSheet.create({
  screen: { flex: 1, alignItems: 'center', justifyContent: 'center' },
  status: { marginTop: 16 },
});

R6. Run it

npm start                          # Metro — keep this terminal open
npx react-native run-android       # in a second terminal; or: npx react-native run-ios --device

Press Start KYC, go through the check, and the result appears under the button.


Something went wrong?

See Troubleshooting. What each result means and what to show the user — Results.