This page catalogs the data returned by the plugin's APIs and modules, plus the typed error strings you may receive.
How results and errors are delivered
Every plugin call takes a success callback and an error callback:
cordova.exec(successCallback, errorCallback, "Cplugin", "methodName", [args]);
The success callback receives either a session-level result object or an aggregated result object containing per-module result payloads keyed by name. The error callback receives a typed error string.
The two sections below document both:
- API results: the shape of the success callback payload for each API method, and the error strings its error callback may deliver.
- Module result objects: the shape of the per-module payload that each module contributes to the aggregated result of
startOnboarding()andstartOnboardingSection().
User cancellation
User cancellation is not a successful completion. When the user cancels a section or flow, the error callback fires with a platform-specific string: "onUserCancelled" on Android and "userCancelled" on iOS. Handle these in your error callback alongside other typed errors.
API results
faceMatch()
Success callback receives the face match fields. The wrapper shape differs by platform:
- iOS:
{ faceMatchData: { ... } }— see faceMatchData. - Android: the face match fields are returned at the top level (no
faceMatchDatawrapper). Field names match faceMatchData.
finishOnboarding()
Success callback indicates the session was finalized successfully. The success string differs by platform ("onOnboardingFinished" on Android; "flow finished successfully" on iOS).
getUserScore()
Pass "fast" or "accurate" as the mode. The success payload shape differs by platform:
cordova.exec(
function (winParam) {
console.log("Score:", JSON.stringify(winParam));
},
function (err) { console.log("Error:", err); },
"Cplugin",
"getUserScore",
["fast"]
);
iOS wraps the score under userScoreData:
{
userScoreData: {
data: {
overallScore: "",
status: "", // stringified SDK enum (ok, warn, unknown, fail, manual)
facialRecognitionScore: "",
existingUser: "",
idVerificationScore: "",
livenessOverallScore: ""
},
extendedUserScoreJsonData: "{...}" // optional raw JSON string from API
}
}
Android returns the native UserScoreResult JSON directly (Gson serialization), not the userScoreData wrapper.
initializeSDK()
Success callback indicates the SDK was initialized successfully. The success string differs by platform ("success" on Android; "Incode SDK init complete" or "Incode SDK is already initialized" on iOS).
Errors are the same on Android and iOS, delivered as "<code>: <message>". Match on the code prefix if you need typed handling.
| Code | Meaning |
|---|---|
simulatorDetected |
Running on a simulator while testMode is false. |
testModeEnabled |
testMode is true in a production context. |
invalidInitParams |
Bad apiKey / apiUrl. |
configError |
Missing/invalid config (e.g. null config or empty apiConfig.url). |
unknown |
Unexpected error. |
isInitialized()
Success callback receives a boolean: true if the native SDK is fully initialized, false otherwise.
cordova.exec(
function (isInitialized) { console.log("Initialized:", isInitialized); },
function (err) { console.log("Error:", err); },
"Cplugin",
"isInitialized",
[]
);
setupOnboardingSession()
Success callback receives an object containing the created session identifiers:
{
interviewId: "string", // the session id
token: "string" // the session token
}
startFaceLogin()
iOS success callback receives a mapped face login object:
{
faceMatched: true, // boolean
spoofAttempt: false, // boolean
image: {
pngBase64: "", // base64-encoded selfie
encryptedBase64: "" // E2EE-encrypted selfie (when E2EE is enabled)
},
customerUUID: "", // string or null; null when faceMatched is false
interviewId: "", // string; session ID in which the user was approved
interviewToken: "", // string; session token in which the user was approved
token: "", // string; token for further API calls
transactionId: "", // string; unique ID of this face login attempt
hasFaceMask: false // boolean; true when login failed because user wore a mask
}
Android success (and some failure) callbacks receive the native SelfieScanResult JSON from Gson.
Error callback receives a platform-specific value. Neither platform emits fixed strings.
- iOS:
"face login failed: <native error>", or another descriptive string from the SDK. - Android: the native error message (or
"onError"when none is available),"onUserCancelled"when the user cancels, or in some failure paths the face login result JSON is passed to the error callback.
startOnboarding()
Success callback receives the aggregated result of the executed flow: a top-level object with one key per module that ran (for example, frontIdData, selfieData, faceMatchData). There is no top-level status field on this API — status is only added for startOnboardingSection(). See Module result objects below for each module's shape.
startOnboardingSection()
Success callback receives a top-level object:
{
status: "success",
sectionTag: "your-tag", // the value of the sectionTag parameter you passed
// ...plus one key per module that ran (see Module result objects below)
}
Each module that ran in the section contributes its own key (for example, frontIdData, selfieData, faceMatchData) to this object.
Error callback receives one of the following typed strings (from native onError / user-cancel handlers):
| Error | Platform | Meaning |
|---|---|---|
permissionsDenied |
Android, iOS | Required permissions denied. |
faceAuthenticationFailed |
Android, iOS | Face authentication module failed. |
sslPinningFailed |
Android, iOS | SSL pinning failure (MITM or bad certificate). |
locationUnavailable |
iOS | Unable to determine location. |
integrityCompromised |
iOS | Device integrity check failed. |
onUserCancelled |
Android | User cancelled the flow. |
userCancelled |
iOS | User cancelled the flow. |
unknown |
Android, iOS | Unexpected or unmapped error. |
Detailed face-authentication failure reasons (for example userIsNotRecognized) appear on the module result as faceAuthenticationData.error, not as the section errorCallback string.
Module result objects
Each module contributes a key to the startOnboarding() or startOnboardingSection() success callback payload. This section catalogs the shape of each key's value, alphabetized by key name.
antifraudData
From addAntifraud.
{ status: true } // boolean: true = antifraud check passed
approveData
From the non-UI approve module.
{
status: "approved", // "approved" | "failed"
id: "<uuid>", // session UUID
customerToken: "<token>" // customer token
}
backIdData
From addId.
{
status: "ok", // see status values below
image: "<base64String>", // base64-encoded image
classifiedIdType: "ID", // classified document type, e.g. "ID"
idCategory: "primary", // "primary" | "secondary"
chosenIdType: "id", // "id" | "passport"
allAttemptsExhausted: false // true when no more retries available
}
status values:
| Value | Meaning |
|---|---|
ok |
Capture succeeded |
unknown |
Unknown error |
errorClassification |
Document classification failed |
errorGlare |
Glare detected |
errorSharpness |
Image not sharp enough |
errorReadability |
Document not readable |
errorInCapture |
Capture error (iOS) |
errorUnacceptableID |
ID not acceptable (iOS) |
wrongSide |
Wrong document side shown (iOS) |
curpData
From CURPValidation.
{
status: "success", // "success" | success message string
curp: "string", // validated CURP code
data: any // raw CURP data from the validation service
}
{
status: "fail", // "fail" | error message string
}
documentData
From addDocumentScan. The data field's structure depends on the document type captured.
{
type: "addressStatement", // "addressStatement" | "medicalDoc" | "paymentProof" | "otherDocument1" | "otherDocument2" | "otherDocument3"
image: "<base64String>",
address: {
city: "string",
colony: "string",
postalCode: "string",
street: "string",
state: "string"
},
data: "<rawData>"
}
eKYC
From addEKYC. Note that the result key is eKYC, not eKYCData.
{ status: true } // boolean: true = eKYC checks passed
emailData
From addEmail.
{
email: "user@example.com",
status: "success" // "success" | "fail"
}
faceAuthenticationData
From addFaceAuthentication.
{
status: "success", // "success" | "fail"
customerUUID: "string", // UUID of the authenticated customer
selfieBase64: "string", // base64-encoded selfie image
selfieEncryptedBase64: "string", // E2EE-encrypted selfie (when E2EE is enabled)
error: null // null on success; typed string on failure (see below)
}
error values when status is "fail":
| Error | Meaning |
|---|---|
inactiveSession |
Session is no longer active |
nonexistentCustomer |
No enrolled face found for this user |
lensesDetected |
Glasses or lenses detected |
faceMaskDetected |
Face mask detected |
headCoverDetected |
Head covering detected |
closedEyesDetected |
Eyes are closed |
faceTooDark |
Insufficient lighting |
spoofAttemptDetected |
Liveness check failed |
userIsNotRecognized |
Face does not match enrolled user |
selfieImageLowQuality |
Selfie image quality too low |
hintNotProvided |
Required authentication hint was not set |
faceNotFound |
No face detected in frame |
faceCroppingFailed |
Face region could not be extracted |
faceTooSmall |
Face is too far from the camera |
faceTooBlurry |
Image is too blurry |
badPhotoQuality |
General photo quality failure |
processingError |
Server-side processing error |
badRequest |
Malformed request |
deniedCameraPermissions |
Camera permission denied (iOS) |
userCancelled |
User cancelled face authentication (iOS) |
unknown |
Unexpected error |
faceMatchData
From addFaceMatch, and from the standalone faceMatch() API (iOS wraps under faceMatchData; Android returns these fields at the top level).
{
status: "match", // "match" | "mismatch"
confidence: 0.99, // 0–1 match confidence
existingUser: true, // whether this is a returning user
existingInterviewId: "", // interview ID of the existing user if found
isFaceMatched: true,
isNameMatched: true,
idCategory: "primary", // "primary" | "secondary"
nfcVsIdConfidence: 0, // NFC vs ID face confidence (NFC flows only)
nfcVsSelfieConfidence: 0 // NFC vs selfie confidence (NFC flows only)
}
Older documentation may refer to existingUser as isExistingUser; the current name is existingUser.
frontIdAttemptData / backIdAttemptData
From addId attempt callbacks. iOS only — Android does not emit these keys.
Shape matches frontIdData / backIdData.
frontIdData
From addId.
{
status: "ok", // see status values below
image: "<base64String>", // base64-encoded image
classifiedIdType: "ID", // classified document type, e.g. "ID"
idCategory: "primary", // "primary" | "secondary"
chosenIdType: "id", // "id" | "passport"
allAttemptsExhausted: false // true when no more retries available
}
status values:
| Value | Meaning |
|---|---|
ok |
Capture succeeded |
unknown |
Unknown error |
errorClassification |
Document classification failed |
errorGlare |
Glare detected |
errorSharpness |
Image not sharp enough |
errorReadability |
Document not readable |
errorInCapture |
Capture error (iOS) |
errorUnacceptableID |
ID not acceptable (iOS) |
wrongSide |
Wrong document side shown (iOS) |
geoLocationData
From addGeolocation.
{
addressFields: {
city: "string",
colony: "string",
postalCode: "string",
street: "string",
state: "string"
},
error: "string" // locationUnavailable
}
govresult / govValidationData
From addGovernmentValidation. The result key differs by platform:
- Android:
govresult - iOS:
govValidationData
{ status: true } // boolean
machineLearningConsentData / MLConsentData
From addMachineLearningConsent. The result key differs by platform:
- Android:
machineLearningConsentData - iOS:
MLConsentData
{ status: true } // boolean: true = consent given successfully
nfcData
From addNFC. All MRZ and chip fields are extracted from the document chip. Date fields (birthDate, expireAt) follow the MRZ YYMMDD format returned by the document chip.
{
birthDate: "",
compositeCheckDigit: "",
dateOfBirthCheckDigit: "",
documentCode: "",
documentNumber: "",
documentNumberCheckDigit: "",
expirationDateCheckDigit: "",
expireAt: "",
gender: "",
issuingStateOrOrganization: "",
nationality: "",
optionalData1: "",
optionalData2: "",
personalNumber: "",
personalNumberCheckDigit: "",
primaryIdentifier: "",
secondaryIdentifier: "",
status: true // boolean
}
phoneData
From addPhone.
{ phone: "+1234567890" }
processIdData
From addId (added automatically via processId).
{
extendedOcrData: "<jsonString>", // raw JSON string with full OCR data
data: {
address: {
city: "string",
colony: "string",
postalCode: "string",
street: "string",
state: "string"
},
fullAddress: "string",
birthDate: 0, // Unix timestamp in milliseconds
expirationDate: 0, // Unix timestamp
gender: "string",
name: "string",
issueDate: 0, // Unix timestamp
numeroEmisionCredencial: "string"
}
}
selfieAttemptData
From addSelfieScan attempt callbacks. Same shape as selfieData. Emitted on both Android and iOS when a selfie capture attempt completes (including retries).
{
status: "success", // "success" | "unknown"
image: "<base64String>", // base64-encoded selfie
spoofAttempt: false,
allAttemptsExhausted: false
}
selfieData
From addSelfieScan.
{
status: "success", // "success" | "unknown"
image: "<base64String>", // base64-encoded selfie
spoofAttempt: false,
allAttemptsExhausted: false
}
signatureData
From addSignature. Only fires when the signature is collected.
{ status: "success" }
Older documentation may refer to this key as signaturePath; the current name is signatureData.
userConsentData
From addUserConsent.
- iOS:
{ status: true }when consent is given (statusis a boolean). - Android: currently emits an empty object
{}for this key.
userScore result (inline)
When userScore is run inline via { module: "userScore", mode: "fast" } in a flowConfig, iOS includes the score under userScoreData in the section result. Android's Cordova listener does not currently map an inline user-score callback into the section payload; use the standalone getUserScore() API after the section completes if you need the score on Android.
videoSelfieData
From addVideoSelfie.
{ status: true } // boolean: true = success, false = failed