SDK reference, React Native SDK

Results

Every module in an onboarding flow reports its outcome through the SDK's listeners or the value returned by the start call. Most modules deliver a dedicated result object through a step completion event; a few signal completion with only a status field. This page describes promise results, listener payloads, and common error codes.

For the full field list of any result type, see the Modules reference and the API Reference.

How results and errors are delivered

  • Per-step results arrive through step completion events. Register a listener for a specific module with IncodeSdk.onStepCompleted({ module, listener }), and the listener receives a result object when that module finishes.
  • In-progress updates arrive through IncodeSdk.onStepUpdated({ module, listener }) for the modules that emit them (currently Conference, IdScanFront, IdScanBack, and SelfieScan).
  • Session-level outcomes arrive as the resolved value of the start call. startOnboarding(), startFlow(), and startWorkflow() resolve with { status: 'success' } on completion. startOnboardingSection() resolves with a similar object that also includes sectionTag. A cancelled flow rejects with code: 'userCancelled'.
  • Errors surface as rejected promises. The start methods reject with IncodeSdkFlowError; IncodeSdk.initialize() rejects with IncodeSdkInitError.
  • Cleanup: call IncodeSdk.deleteLocalUserData() once you are done with a session to remove locally stored onboarding data (Android only - see Delete Local Session Data).

API results

Error enums

IncodeSdk.initialize() can reject with IncodeSdkInitError.

type IncodeSdkInitErrorCode =
  | 'simulatorDetected'
  | 'testModeEnabled'
  | 'invalidInitParams'
  | 'configError'
  | 'unknown';
Code When it fires
simulatorDetected Running on a simulator without testMode: true.
testModeEnabled Running on a physical device with testMode: true; test mode is only for simulators/emulators.
invalidInitParams The native project isn't configured correctly (for example, a missing or malformed Incode-Info.plist on iOS).
configError apiConfig is missing or incomplete.
unknown An unrecognized initialization failure.

Flow APIs can reject with IncodeSdkFlowError.

type IncodeSdkFlowErrorCode =
  | 'permissionsDenied'
  | 'videoSelfieNotCompleted'
  | 'integrityCompromised'
  | 'faceAuthenticationFailed'
  | 'sslPinningFailed'
  | 'locationUnavailable'
  | 'storageUnavailable'
  | 'combinedConsentsNotReceived'
  | 'userCancelled'
  | 'interrupted'
  | 'sessionCreationFailed'
  | 'captchaNotVerified'
  | 'biometricConsentNotGiven'
  | 'biometricConsentNotReceived'
  | 'sectionAlreadyRunning'
  | 'noActiveSession'
  | 'insufficientDiskSpace'
  | 'onDeviceProcessingNotCompatible'
  | 'configError'
  | 'activityNotPresent'
  | 'unknown';
Code When it fires
permissionsDenied The user denied a permission required by the flow (typically camera or microphone, also during Video Selfie).
videoSelfieNotCompleted The Video Selfie step could not be completed for a reason other than a denied permission.
integrityCompromised The SDK detected a compromised device environment. Replaces jailbreakDetected as of 9.15.0.
faceAuthenticationFailed A face authentication step failed.
sslPinningFailed SSL pinning validation failed.
locationUnavailable Required location data could not be obtained.
storageUnavailable The device could not provide a writable images directory when the flow started. Android only.
combinedConsentsNotReceived A mandatory Combined Consent could not be shown because it has no readable text or no checkbox id, so the flow stopped. iOS only.
userCancelled The user dismissed the flow or section.
interrupted The system ended the flow, for example by destroying the SDK screen while the app was in the background.
sessionCreationFailed The onboarding session could not be created. iOS only.
captchaNotVerified The CAPTCHA could not be verified, so the flow ended. iOS only. On Android, a failed CAPTCHA rejects with unknown.
biometricConsentNotGiven The user did not give consent to store biometric data.
biometricConsentNotReceived The biometric consent did not reach Incode.
sectionAlreadyRunning startOnboardingSection was called while another section was running.
noActiveSession The flow needs an onboarding session and there is none. On Android, only startOnboardingSection reports it.
insufficientDiskSpace The device does not have enough free space for the SDK's ML models. error.message shows the space available and required. Android only.
onDeviceProcessingNotCompatible On-device processing is enabled together with a setting it does not support: for example, no end-to-end encryption, frame streaming, or screen recording. error.message shows the reason. Android only.
configError startFlow or startWorkflow was called with neither a non-empty sessionConfig.configurationId nor a non-empty sessionConfig.token. Rejected before the flow starts, so no network request is made.
activityNotPresent startFlow or startWorkflow was called without a host Activity (Android) or view controller (iOS). Rejected before the flow starts.
unknown Catch-all for unrecognized flow failure.

startOnboarding, startFlow, and startWorkflow

Successful completion resolves with:

{ "status": "success" }

User cancellation rejects the promise with code: 'userCancelled'.

setupOnboardingSession

{
  interviewId: string;
  token: string;
}

startOnboardingSection

{
  status: 'success';
  sectionTag: string;
}

startFaceLogin

{
  faceMatched: boolean;
  spoofAttempt: boolean;
  image?: { pngBase64?: string; encryptedBase64?: string };
  customerUUID?: string;
  interviewId?: string;
  interviewToken?: string;
  token?: string;
  transactionId?: string;
  hasFaceMask?: boolean;
}

Example Face Login response:

{
  "faceMatched": true,
  "spoofAttempt": false,
  "image": {
    "pngBase64": "...PNG Base 64 encoded",
    "encryptedBase64": "...PNG Encrypted Base 64 encoded"
  },
  "customerUUID": "exampleCustomerUUID",
  "interviewId": "exampleInterviewID",
  "interviewToken": "exampleInterviewToken",
  "token": "exampleToken",
  "transactionId": "Unique Authentication attempt ID",
  "hasFaceMask": false
}

For 1:1 Face Login, faceMatched can be false when faces do not match or when the user with the supplied customer token and customerUUID is not found. For 1:N Face Login, faceMatched can be false when the captured face is not associated with an approved user in the database.

hasFaceMask is available on iOS only; Android forces the user to remove the mask before login is performed.

getUserScore

Returns a UserScoreResult — the full score surface:

{
  /** The raw score response as a JSON string. Parse it; do not compare it across platforms. */
  extendedUserScoreJsonData: string;
  overall: { value: string | null; status: UserScoreStatus | null };
  idValidation?: {
    overall: { value: string | null; status: UserScoreStatus | null };
    photoSecurityAndQuality: UserScoreCheck[];
    idSpecific: UserScoreCheck[];
  };
  liveness?: {
    overall: { value: string | null; status: UserScoreStatus | null };
    livenessScore: { value: string | null; status: UserScoreStatus | null };
    photoQuality: string | null;
  };
  faceRecognition?: {
    overall: { value: string | null; status: UserScoreStatus | null };
    existingUser: boolean;
  };
  governmentValidation?: {
    overall: { value: string | null; status: UserScoreStatus | null };
    recognitionConfidence: { value: string | null; status: UserScoreStatus | null };
    validationStatus: UserScoreCheck;
    ocrValidation: UserScoreCheck[];
  };
}

// UserScoreStatus = 'ok' | 'warn' | 'unknown' | 'fail' | 'manual'
// UserScoreCheck  = { key: string | null; value: string | null; status: UserScoreStatus | null }

A section key is present only when the server returned that section. value is the raw server string ('80.5'). photoSecurityAndQuality and ocrValidation never contain unknown entries; idSpecific may.

await IncodeSdk.getUserScore({ fetchMode: 'accurate' });

Compact form: {fetchMode: 'accurate'}.

The UserScore module step-complete event delivers this same shape.

approve

{
  success: boolean;
  uuid: string | null;
  customerToken: string | null;
  error: string | null;
}
  • success: Whether the user was approved. A false value is a normal, expected outcome, not an error.
  • uuid: The customer UUID.
  • customerToken: The customer's session token.
  • error: An approval error reported by the SDK. iOS only - always null on Android.

uuid, customerToken, and error are null when the SDK has no value for them.

Use the optional forceApproval argument when calling approve(); it defaults to false. Some older text called this forceApprove.

Failures reject the promise with an error code and message. The codes are userCancelled when the user dismisses the section, approvalError (Android only) when the approval flow could not be configured, and any IncodeSdkFlowErrorCode value such as sslPinningFailed or unknown.

faceMatch

Returns a FaceMatch completion event payload.

Methods without a meaningful payload

finishOnboardingFlow, deleteLocalUserData, showCloseButton, setTheme, setUXConfig, setString, setQuantityStrings, setLocalizationLanguage, setFaceAuthenticationHint, and setSdkMode are primarily command-style methods.

checkOnDemandResourcesDownloaded, downloadOnDemandResources, and removeOnDemandResources do return a meaningful payload on Android - a { status: string } object ("true"/"false" for the check, "success" for download/remove; see IncodeSdkModule.kt). See Dynamic Delivery Usage Guide for usage.

Listener results

The SDK offers several types of listeners:

  • user cancellation
  • tracking events
  • step completion, for each module individually
  • step error, for each module individually
  • step update, for each module individually

User cancellation

If the user cancels onboarding, startOnboarding, startOnboardingSection, startFlow, startWorkflow, and startFlowFromDeepLink reject with code: 'userCancelled'. On both platforms, the user can cancel by pressing the close button that can be enabled using IncodeSdk.showCloseButton(true). On Android, the user can also cancel by pressing the back key.

Session created

When an onboarding session gets created, the information about the session can be obtained via IncodeSdk.onSessionCreated.

IncodeSdk.onSessionCreated((session) => {
  console.log('Onboarding session created, interviewId: ' + session.interviewId);
});

The session event includes:

  • interviewId: string. Unique identifier of the onboarding session.
  • token: string. Token created for this onboarding session.

Tracking events

When onboarding has started, tracking events can be obtained using onEvents.

IncodeSdk.onEvents((eventBatch) => {
  for (const event of eventBatch.events) {
    console.log(event.event, event.data);
  }
});

The listener receives:

  • events: EventDetails[]. Array of emitted events.
  • event: string. Unique identifier of the event.
  • data: string. JSON string with additional event details.

As of React Native SDK 9.17.0, all Android event names use the SDK's camelCase value form (for example, userCanceled, moduleOpened), matching iOS, instead of the SDK enum constant name (for example, USER_CANCELLED, MODULE_OPENED) used before that version. Update any comparison, Dashboard query, saved report, or server-side rule that matches an old constant-name string. The status value returned by the flow promises is unchanged and stays userCancelled.

Step completion

When a step in the configured onboarding flow is completed, register a listener via IncodeSdk.onStepCompleted. The listener config takes the module name and callback.

const unsubscribe = IncodeSdk.onStepCompleted({
  module: 'SelfieScan',
  listener: (event) => {
    console.log(event.result);
  },
});

Step completion events are delivered through onStepCompleted(). In-progress events are delivered through onStepUpdated().

Step error

When a module in the flow emits an error, register a listener via IncodeSdk.onStepError. The listener config takes the module name and callback.

const unsubscribe = IncodeSdk.onStepError({
  module: 'FaceMatch',
  listener: (event) => {
    console.log('FaceMatch error', event);
  },
});

onStepError currently fires for Phone, DocumentScan, Signature, VideoSelfie, IdScan, Conference, SelfieScan, FaceMatch, QrScan, and UserScore.

The event shape isn't fully consistent across modules: most report a flat status value, QrScan and Conference nest it inside a result object, and IdScan nests separate front/back status values.

Step update

When a step in the configured flow is updated, register a listener via IncodeSdk.onStepUpdated. The listener config takes the module name and callback.

IncodeSdk.onStepUpdated({
  module: 'IdScanFront',
  listener: (event) => {
    console.log('ID Scan Front Attempt: ', event.result);
    console.log('ID Scan Front Attempt allAttemptsExhausted:', event.result.allAttemptsExhausted);
  },
});

onStepUpdated currently emits updates for Conference, IdScanFront, IdScanBack, and SelfieScan.

Module callback payloads

Aes

This module enables an advanced electronic signature to ensure legally binding and compliant document signing with enhanced security and authentication measures.

Example success response:

{
  "status": "success",
  "step": "Aes"
}

The field status can have one of the following values: success or fail.

Example failure response:

{
  "status": "fail",
  "error": "noDocuments",
  "step": "Aes"
}

Antifraud

This module gives the ability to compare the current interview with existing interviews and customers to detect anomalies that could be signs of fraud.

Example success response:

{
  "status": "success",
  "step": "Antifraud"
}

The field status can have one of the following values: success or fail.

Approve

Adding this module to the flow instructs the Incode server to perform the approval of the user.

Example response:

{
  "result": { "success": true, "uuid": "customerUUID", "customerToken": "customerToken", "error": null },
  "module": "Approve"
}

The result object is the same payload the approve method resolves. A success of false is a normal, expected outcome, not an error.

Captcha

This module asks the user to enter a one-time password (OTP) generated for the current session. If the user enters an incorrect OTP too many times, the flow is terminated.

Example success response:

{
  "result": {
    "status": "success",
    "response": "ABCDEF"
  }
}

The step completed event fires only when the CAPTCHA is verified. If it cannot be verified, the SDK ends the flow and the flow method rejects with captchaNotVerified on iOS and with unknown on Android. The Android SDK reports a generic error.

CombinedConsent

This module asks the user for data sharing consent.

Example success response:

{
  "status": "success",
  "step": "CombinedConsent"
}

The status field can be success or fail.

If the user declines to give data sharing consent, the onboarding flow rejects with code: 'userCancelled'.

Conference

This module starts a video conference call.

Example success response:

{
  "step": "Conference",
  "result": {
    "status": "success"
  }
}

Example failure response:

{
  "step": "Conference",
  "result": {
    "status": "error"
  }
}

The result.status field can be success, userCancelled, invalidSession, or error.

CurpValidation

This module asks the user to input their CURP information for validation with the RENAPO service. CURP is a personal identifier used in Mexico.

Example success response:

{
  "result": {
    "curp": "123456789101112134",
    "valid": true,
    "data": { "success": true, "curp": "123456789101112134" },
    "status": "success",
    "resultCode": "success"
  },
  "module": "CurpValidation"
}
  • curp: The validated, generated, or entered CURP. Omitted when the SDK has none.
  • valid: Whether RENAPO accepted the CURP. Omitted when validationEnabled is false, because no server check ran.
  • data: The server response for the CURP check, as an object. Its keys are server-defined. Omitted when there is no server response, meaning validation is disabled, or, on Android, the final request failed.
  • status: success only when RENAPO accepted the CURP (valid: true). Otherwise fail, with resultCode: "error". With validationEnabled: false, a captured CURP is success.
  • resultCode: The finer outcome, populated on both platforms: success or error. A cancellation ends the flow through the start method's error, not through this event.

The module emits one event, on both platforms, when the user finishes the step. Workflows always validate the CURP, whatever the module configuration.

Example failure response (RENAPO rejected the CURP):

{
  "result": {
    "curp": "123456789101112134",
    "valid": false,
    "data": { "success": false, "curp": "123456789101112134" },
    "status": "fail",
    "resultCode": "error"
  },
  "module": "CurpValidation"
}

Example response with validationEnabled: false:

{
  "result": { "curp": "123456789101112134", "status": "success", "resultCode": "success" },
  "module": "CurpValidation"
}

CustomWatchlist

This module checks whether the user appears on a custom watchlist configured in the Incode Dashboard.

Example success response:

{
  "status": "success",
  "step": "CustomWatchlist"
}

The status field can be success or fail. success means a match was found on the watchlist, which typically warrants further review. fail means no match was found.

DocumentScan

This module captures a document and attempts to read the address from it.

If the user skips this step, the response contains blank values rather than nil or an error.

Example success response:

{
  "result": {
    "address": { // parsed OCR data
      "city": "Springfield",
      "colony": "Springfield",
      "postalCode": "555555",
      "state": "Serbia",
      "street": "Evergreen terrace"
    },
    "data": {"raw JSON OCR data"},
    "type": "addressStatement",
    "image": {"pngBase64": "/9j/4AAQSkZJRgABAQAAAQABAAD/4..."}
  },
  "step": "DocumentScan"
}

The result object includes:

  • address: parsed OCR data from the document.
  • data: iOS only. A JSON string containing document-specific data, when available. This field is currently untyped in the SDK. On Android, there is no top-level data field; medical-document data is nested under insuranceCard instead.
  • type: the document type captured.
  • image: the captured document image as a base64-encoded PNG.

Example failure response:

{
  "status": "permissionsDenied",
  "step": "DocumentScan"
}

The status field can be permissionsDenied, simulatorDetected, or unknown.

eKYB

This module validates a business identity using business information. Sources can include business name, addresses, city, state, postal code, and bank account number.

Example success response:

{
  "status": "success",
  "step": "eKYB"
}

The status field can be success or fail.

eKYC

This module validates a user identity using the user's information. Sources can include data obtained from an ID, proof of address, or manual capture.

Example success response:

{
  "status": "success",
  "step": "eKYC"
}

The status field can be success or fail.

Email

This module asks the user to enter their email address.

Example success response:

{
  "result": { "email": "email@example.com", "status": "success", "resultCode": "success" },
  "step": "Email"
}

status is success or fail on both platforms. resultCode carries the finer outcome and is populated on both platforms too: both report success and error, and Android additionally reports userCancelled and emulatorDetected, since on iOS a cancellation is reported at the session level rather than through a module callback. The captured value is omitted when the SDK has none — check for the key rather than comparing to an empty string.

Example failure response:

{
  "result": { "status": "fail", "resultCode": "error" },
  "step": "Email"
}

The captured value is absent. The status field can be success or fail.

FaceAuthentication

This module identifies a previously registered user using face recognition. It can be used to grant access to parts of your application or authorize high-value operations with low friction.

Example success response:

{
  "result": {
    "status": "success",
    "customerUUID": "1234567890",
    "selfieBase64": "abcdefg",
    "selfieEncryptedBase64": "abcdefg",
    "error": null
  },
  "step": "FaceAuthentication"
}

The result.status field can be success or fail. result.error can be one of 21 values: inactiveSession, nonexistentCustomer, lensesDetected, faceMaskDetected, headCoverDetected, closedEyesDetected, faceTooDark, spoofAttemptDetected, userIsNotRecognized, selfieImageLowQuality, hintNotProvided, faceNotFound, faceCroppingFailed, faceTooSmall, faceTooBlurry, badPhotoQuality, processingError, badRequest, deniedCameraPermissions, userCancelled, or unknown.

FaceMatch

This module checks whether the face from the scanned ID or passport and the face obtained from the SelfieScan module are a match.

Example success response:

{
  "result": {
    "status": "match",
    "confidence": 1,
    "nameMatched": false,
    "existingUser": false,
    "existingInterviewId": "exampleInterviewID",
    "idCategory": "primary"
  },
  "step": "FaceMatch"
}

The result.status field can be match or mismatch. FaceMatch uses this same result structure for both matches and mismatches.

FullName

This module asks the user to enter their name.

Example success response:

{
  "result": { "name": "exampleName", "status": "success", "resultCode": "success" },
  "step": "FullName"
}

status is success or fail on both platforms. resultCode carries the finer outcome and is populated on both platforms too: both report success and error, and Android additionally reports userCancelled and emulatorDetected, since on iOS a cancellation is reported at the session level rather than through a module callback. The captured value is omitted when the SDK has none — check for the key rather than comparing to an empty string.

Example failure response:

{
  "result": { "status": "fail", "resultCode": "error" },
  "step": "FullName"
}

The captured value is absent. The status field can be success or fail.

Geolocation

This module captures the current location of the user.

Example success response:

{
  "result": {
    "addressFields": {
      "street": "Evergreen Terrace 742",
      "colony": "Springfield",
      "postalCode": "555555",
      "city": "Springfield",
      "state": "United States"
    },
    "latitude": 44.0462,
    "longitude": -123.0220,
    "status": "success",
    "resultCode": "success"
  },
  "step": "Geolocation"
}

Example response when the user skipped the step or no location could be determined:

{
  "result": { "status": "fail", "resultCode": "error", "error": "locationUnavailable" },
  "step": "Geolocation"
}
  • status is success only when a location was fetched. A skipped, denied, or unavailable location is reported here as fail, and the flow continues. When isSkippable is false, the flow ends through onError instead. On Android, the fail result arrives first, and then onError fires.
  • error is present only when resultCode is error. It can be permissionsDenied, locationUnavailable, sslPinningFailed, integrityCompromised, or unknown. On iOS, a skip in the current UI is always reported as locationUnavailable.
  • addressFields, latitude, and longitude are absent when no location was fetched, and each address field is absent when the SDK has no value for it. On iOS, a location whose address could not be fully resolved is reported as fail with locationUnavailable, but still carries the partial addressFields and the coordinates.
  • state holds the country name, and city falls back to the region when the city is unknown.
  • resultCode can also be userCancelled on Android when the user backs out.

GlobalWatchlist

This module checks customer identities against sources of sanctions, Politically Exposed Persons (PEPs), and watchlists.

Example success response:

{
  "status": "success",
  "step": "GlobalWatchlist"
}

The status field can be success or fail. success means a match was found on the watchlist, which typically warrants further review. fail means no match was found.

GovernmentValidation

This module asks the user to input their information for validation against government services.

Example success response:

{
  "status": "success",
  "step": "GovernmentValidation"
}

The status field can be success or fail.

IdScan

Adding { module: 'IdScan' } to a flowConfig captures both sides of the ID in one combined module. On success, it fires two separate step completion events, IdScanFront and IdScanBack, rather than a single combined IdScan event. onStepCompleted does not accept IdScan as a module value; listen for IdScanFront and IdScanBack instead.

On error, IdScan fires one combined error event covering both sides, distinct from the individual front/back success statuses. Register it with IncodeSdk.onStepError({ module: 'IdScan', listener }):

{
  "module": "IdScan",
  "status": {
    "front": "ok",
    "back": "errorGlare"
  },
  "data": {"raw JSON OCR data"}
}

status.front and status.back can each be ok or one of several values indicating a scanning issue. The Incode UI informs the user about these errors and attempts the scan several times before responding with an error. Other values: errorClassification, noFacesFound, errorCropQuality, errorGlare, errorReadability, errorSharpness, errorTypeMismatch, userCancelled, unknownError, shadow, errorAddress, errorPassportClassification.

IdScanBack

Captures the back side of an ID document.

Example success response:

{
  "result": {
    "status": "ok",
    "classifiedIdType": "Voter Identification",
    "chosenIdType": "id",
    "idCategory": "primary",
    "image": { "pngBase64": "..." },
    "croppedFace": { "pngBase64": "..." }
  },
  "step": "IdScanBack"
}

The result object includes:

  • image: IncdImage object containing pngBase64 of the captured back ID.
  • croppedFace: IncdImage object containing pngBase64 of the cropped face from the back ID.
  • classifiedIdType: string. The ID type as classified by Incode, for example Voter Identification.
  • chosenIdType: string. The ID type the user chose to capture: id or passport.
  • idCategory: string. The ID category: primary or secondary.
  • status: string. The scan outcome. When the value is anything other than ok, the scan or validation did not complete successfully. The Incode UI informs the user and retries several times before responding with an error. Possible non-success values: errorClassification, noFacesFound, errorGlare, errorReadability, errorSharpness, errorTypeMismatch, userCancelled, unknownError, errorShadow, errorPassportClassification.
  • failReason: string (optional). The reason for the scan failure, if applicable.
  • issueName: string (optional). The name of the issuing authority of the document.
  • issueYear: number (optional). The year the document was issued.
  • countryCode: string (optional). The country code of the document.
  • allAttemptsExhausted: boolean (optional). Indicates whether all capture attempts have been exhausted.

IdScanFront

Captures the front side of an ID document.

Example success response:

{
  "result": {
    "status": "ok",
    "classifiedIdType": "Voter Identification",
    "chosenIdType": "id",
    "idCategory": "primary",
    "image": { "pngBase64": "..." },
    "croppedFace": { "pngBase64": "..." }
  },
  "step": "IdScanFront"
}

The result object includes:

  • image: IncdImage object containing pngBase64 of the captured front ID.
  • croppedFace: IncdImage object containing pngBase64 of the cropped face from the front ID.
  • classifiedIdType: string. The ID type as classified by Incode, for example Voter Identification.
  • chosenIdType: string. The ID type the user chose to capture: id or passport.
  • idCategory: string. The ID category: primary or secondary.
  • status: string. The scan outcome. When the value is anything other than ok, the scan or validation did not complete successfully. The Incode UI informs the user and retries several times before responding with an error. Possible non-success values: errorClassification, noFacesFound, errorGlare, errorReadability, errorSharpness, errorTypeMismatch, userCancelled, unknownError, errorShadow, errorPassportClassification.
  • failReason: string (optional). The reason for the scan failure, if applicable.
  • issueName: string (optional). The name of the issuing authority of the document.
  • issueYear: number (optional). The year the document was issued.
  • countryCode: string (optional). The country code of the document.
  • allAttemptsExhausted: boolean (optional). Indicates whether all capture attempts have been used.

MLConsent

This module asks the user for machine learning consent.

Example success response:

{
  "status": "success",
  "step": "MLConsent"
}

The status field can be success or fail.

NFCScan

This module reads and verifies chip data from ePassports or ID cards to validate document authenticity, detect tampering, and enhance anti-spoofing.

Example success response:

{
  "result": {
    "status": "success",
    "birthDate": "900101",
    "compositeCheckDigit": "7",
    "dateOfBirthCheckDigit": "3",
    "documentCode": "TD3",
    "documentNumber": "123456789",
    "documentNumberCheckDigit": "5",
    "expirationDateCheckDigit": "2",
    "expireAt": "300101",
    "gender": "M",
    "issuingStateOrOrganization": "USA",
    "nationality": "USA",
    "optionalData1": "ABCDEFGHI",
    "optionalData2": null,
    "personalNumber": "987654321",
    "personalNumberCheckDigit": "4",
    "primaryIdentifier": "DOE",
    "secondaryIdentifier": "JOHN MICHAEL"
  },
  "step": "NFCScan"
}

The result.status field can be success or fail.

Date fields such as birthDate and expireAt use YYMMDD format on Android. On iOS, they are returned as a native-formatted date string. All other fields are plain strings.

OCREdit

This module shows the user the parsed OCR data from their ID, which they can optionally edit.

Example success response:

{
  "status": "success",
  "step": "OCREdit"
}

The status field can be success or fail.

Phone

This module asks the user to enter their phone number.

Example success response:

{
  "result": { "phone": "+15555555555", "status": "success", "resultCode": "success" },
  "step": "Phone"
}

status is success or fail on both platforms. resultCode carries the finer outcome and is populated on both platforms too: both report success and error, and Android additionally reports userCancelled and emulatorDetected, since on iOS a cancellation is reported at the session level rather than through a module callback. The captured value is omitted when the SDK has none — check for the key rather than comparing to an empty string.

Example failure response:

{
  "result": { "status": "fail", "resultCode": "error" },
  "step": "Phone"
}

The captured value is absent. The status field can be success or fail.

ProcessId

Processes the ID after the front and back captures. ProcessId does not have its own status or failure result; success or failure comes from the separate IdScanFront and IdScanBack events.

Example success response:

{
  "result": {
    "data": {
      "fullAddress": "123 Evergreen Terrace, Springfield",
      "address": {
        "city": "Springfield",
        "colony": "Springfield",
        "postalCode": "555555",
        "state": "Serbia",
        "street": "Evergreen Terrace"
      },
      "birthDate": 631152000,
      "expirationDate": "300101",
      "gender": "M",
      "name": "JOHN DOE",
      "issueDate": "200101",
      "numeroEmisionCredencial": "01"
    },
    "extendedOcrData": "{...}"
  },
  "step": "ProcessId"
}

The result object includes:

  • data: the IdScanOcrData object containing the parsed OCR data. Confirmed identical on iOS and Android:
    • fullAddress
    • address: nested object with city, colony, postalCode, state, street
    • birthDate
    • expirationDate
    • gender
    • name
    • issueDate
    • numeroEmisionCredencial
  • extendedOcrData: string. Raw JSON containing the full OCR data, for example exteriorNumber, interiorNumber, typeOfId, documentFrontSubtype.

Notes:

  • result.data.birthDate is in epoch time.

QrScan

This module captures the QR code on the back of the ID, extracts the data from it, and sends it to the server.

Example success response:

{
  "result": { "idCic": "exampleIdCic" },
  "step": "QrScan"
}

The result object contains a single field, idCic (a string). QrScan does not return a status.

SelfieScan

This module captures a selfie from the user.

Example success response:

{
  "result": { "spoofAttempt": false, "status": "success", "allAttemptsExhausted": false },
  "step": "SelfieScan",
  "image": {
    "pngBase64": "...PNG Base 64 encoded",
    "encryptedBase64": "...PNG Encrypted Base 64 encoded"
  }
}

The response includes:

  • result.spoofAttempt: boolean. Indicates whether a spoof attempt was detected.
  • result.status: string. The capture outcome.
  • result.allAttemptsExhausted: boolean (optional). Indicates whether all capture attempts have been exhausted.
  • image.pngBase64: the captured selfie as a base64-encoded PNG.
  • image.encryptedBase64: the captured selfie as an encrypted base64-encoded PNG.

Example failure response:

{
  "status": "permissionsDenied",
  "step": "SelfieScan"
}

The status field can be none, permissionsDenied, simulatorDetected, or spoofDetected.

Signature

This module asks the user to add a digital signature by signing on a canvas.

Example success response:

{
  "result": { "status": "success", "image": "...PNG Base 64 encoded" },
  "step": "Signature"
}

Example failure response:

{ "status": "error", "step": "Signature" }

The status field can be error or invalidSession.

UserConsent

This module asks the user to give consent.

Example success response:

{
  "status": "success",
  "step": "UserConsent"
}

If the user declines to give consent, the onboarding flow rejects with code: 'userCancelled'.

UserScore

This module displays the user score to the user.

Example success response:

{
  "result": {
    "data": {
      "existingUser": true,
      "facialRecognitionScore": "0.0/100",
      "idVerificationScore": "79.0/100",
      "livenessOverallScore": "95.2/100",
      "overallScore": "0.0/100",
      "status": "fail"
    },
    "extendedUserScoreJsonData": "{..}"
  },
  "step": "UserScore"
}

The result object includes:

  • data: the parsed user score data.
  • extendedUserScoreJsonData: a raw JSON string containing the full user score data.

The result.data.status field can be ok, warn, unknown, manual, or fail.

VideoSelfie

This module records the device's screen while the user takes a selfie, presents their ID, answers a series of questions, and accepts the terms and conditions. The recorded video is then uploaded and stored for later use.

On module completion, the result given to the listener will take the shape of:

{
  "result": {
    "status": true
  }
}

status is a boolean, true when the video selfie was recorded and uploaded successfully.

Was this page helpful?