A session ends in exactly one result. Every outcome — a verdict, a cancel, a refused camera, no network — is a result, not an exception. The Flutter and React Native plugins throw an exception only on misuse: a second start while a session runs, or an empty request.
| Result | Android | iOS | Flutter | React Native |
|---|---|---|---|---|
| The server judged the session | KycResult.Completed(verdict) | .completed(verdict) | KycCompleted(verdict) | { kind: 'completed', verdict } |
| The user left before the end of the session | KycResult.Cancelled | .cancelled | KycCancelled() | { kind: 'cancelled' } |
| The session could not go on | KycResult.Failed(reason, message) | .failed(reason, message:) | KycFailed(reason, message) | { kind: 'failed', reason, message } |
A session the server has already judged ends as completed with that verdict, whatever screen the user closes it on.
Verdicts
| Verdict | Meaning |
|---|---|
success | The verification passed |
failed | The verification did not pass |
suspicious | The server suspects fraud; the SDK shows it to the user as a verification that did not pass |
expired | The session’s time ran out |
unknown | A verdict this SDK version does not know |
The verdict in the app is for the next screen. A decision that matters (opening an account, a payment limit) should rest on the session result your server gets from NeuroVision through a webhook or a session status request, not on what the app reports.
Failures
| Reason | When | What to show the user |
|---|---|---|
cameraDenied | The user did not allow access to the camera | That the camera is needed, and a way to the app’s settings |
network | No connection, or it dropped and retries ran out | Check the connection and try again |
server | The server answered with an error | Try again later |
camera | The camera could not be opened, or it stopped delivering frames (another app took it) | Close other apps that use the camera and try again |
config | The request was refused: a wrong apiHost, a scenario id or client key the server did not accept, or another session already running (the message says which) | A generic error; log the message — it is an integration problem, not the user’s |
unsupportedDevice | Android: the app runs as x86_64 (an x86_64 device or emulator); iOS never reports it | That this device is not supported |
internal | An unexpected failure in the SDK | A generic error; send the message and the time to support |
message is a short technical text for your logs, in English. Do not show it to the user as is.
Forward compatibility
A newer SDK may add a verdict or a failure reason:
- Flutter and React Native read an unknown verdict as
unknownand an unknown failure reason asinternal. - In Swift, a
switchover the SDK's enums needs@unknown default.