← Back to Documentation Index

This document describes the data returned by the plugin's APIs and modules, plus the typed error strings you may receive.


API Results

setupOnboardingSession

Success callback receives an object containing the created session identifiers:

{
  interviewId: "string", // the session id
  token: "string"        // the session token
}

startOnboarding

Success callback receives the aggregated result of the executed flow — a top-level object with a status plus the per-module result keys (see Module Results) for every module that ran.

startOnboardingSection

Success callback receives a top-level object:

{
  status: "success",            // "success" | "userCancelled"
  sectionTag: "your-tag",       // the value of the sectionTag parameter you passed
  // ...plus one key per module that ran (see Module Results below)
}

Each module that ran in the section contributes its own key (e.g. frontIdData, selfieData, faceMatchData) to this object.

getUserScore

Success callback receives the full score JSON object with identity verification scores. This is passed through directly from the Incode API. Pass "fast" or "accurate" as the mode.

cordova.exec(
  function (winParam) {
    console.log("Score:", JSON.stringify(winParam));
  },
  function (err) { console.log("Error:", err); },
  "Cplugin",
  "getUserScore",
  ["fast"]
);

finishOnboarding

Success callback indicates the session was finalized successfully. No structured payload is required for normal flow control.

startFaceLogin

  • Success: a face login result object containing selfie data (same shape as selfieData).
  • Error: a typed string from the face authentication error set — e.g. "userIsNotRecognized", "nonexistentCustomer", "spoofAttemptDetected". See faceAuthenticationData error values for the full list.

faceMatch (non-UI)

Success callback receives the face match result (see faceMatchData).

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",
  []
);

Module Results

Each module contributes a key to the startOnboardingSection / startOnboarding result object.

phoneData

From addPhone.

{ phone: "+1234567890" }

emailData

From addEmail.

{
  email: "[email protected]",
  status: "success" // "success" | "fail"
}

geoLocationData

From addGeolocation.

{
  addressFields: {
    city: "string",
    colony: "string",
    postalCode: "string",
    street: "string",
    state: "string"
  }
}

userConsentData

From addUserConsent.

{ status: true } // boolean

frontIdData / 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 (added 4.4.0)
}

status values:

ValueMeaning
okCapture succeeded
unknownUnknown error
errorClassificationDocument classification failed
errorGlareGlare detected
errorSharpnessImage not sharp enough
errorReadabilityDocument not readable
errorInCaptureCapture error (iOS)
errorUnacceptableIDID not acceptable (iOS)
wrongSideWrong document side shown (iOS)

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"
  }
}

selfieData

From addSelfieScan.

{
  status: "success",          // "success" | error strings
  image: "<base64String>",    // base64-encoded selfie
  spoofAttempt: false,
  allAttemptsExhausted: false // added 4.4.0
}

faceMatchData

From addFaceMatch and the non-UI faceMatch.

{
  status: "match",              // "match" | "mismatch"
  confidence: 0.99,             // 0–1 match confidence
  existingUser: true,           // whether this is a returning user (formerly isExistingUser, renamed in 4.0.0)
  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)
}

signatureData

From addSignature (formerly signaturePath).

{ status: "string" }

documentData

From addDocumentScan.

{
  type: "addressStatement", // "addressStatement" | "medicalDoc" | "paymentProof" | "otherDocument1" | "otherDocument2" | "otherDocument3"
  image: "<base64String>",
  address: {
    city: "string",
    colony: "string",
    postalCode: "string",
    street: "string",
    state: "string"
  },
  data: "<rawData>"
}

govresult

From addGovernmentValidation.

{ status: true } // boolean

approveData

From the non-UI approve module.

{
  status: "approved",       // "approved" | "declined" | "error"
  id: "<uuid>",             // session UUID
  customerToken: "<token>"  // customer token
}

nfcData

From addNFC. All MRZ/chip fields are extracted from the document chip.

{
  birthDate: "",
  compositeCheckDigit: "",
  dateOfBirthCheckDigit: "",
  documentCode: "",
  documentNumber: "",
  documentNumberCheckDigit: "",
  expirationDateCheckDigit: "",
  expireAt: "",
  gender: "",
  issuingStateOrOrganization: "",
  nationality: "",
  optionalData1: "",
  optionalData2: "",
  personalNumber: "",
  personalNumberCheckDigit: "",
  primaryIdentifier: "",
  secondaryIdentifier: "",
  status: true // boolean
}

videoSelfieData

From addVideoSelfie.

{ status: true } // boolean: true = success, false = failed

machineLearningConsentData

From addMachineLearningConsent.

{ status: true } // boolean: true = consent given successfully

antifraudData

From addAntifraud.

{ status: true } // boolean: true = antifraud check passed

eKYC

From addEKYC. Note: the result key is eKYC, not eKYCData.

{ status: true } // boolean: true = eKYC checks passed

curpData

From CURPValidation.

{
  status: "success",  // "success" | error message string
  curp: "string",     // validated CURP code
  data: any           // raw CURP data from the validation service
}

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":

ErrorMeaning
inactiveSessionSession is no longer active
nonexistentCustomerNo enrolled face found for this user
lensesDetectedGlasses or lenses detected
faceMaskDetectedFace mask detected
headCoverDetectedHead covering detected
closedEyesDetectedEyes are closed
faceTooDarkInsufficient lighting
spoofAttemptDetectedLiveness check failed
userIsNotRecognizedFace does not match enrolled user
selfieImageLowQualitySelfie image quality too low
hintNotProvidedRequired authentication hint was not set
faceNotFoundNo face detected in frame
faceCroppingFailedFace region could not be extracted
faceTooSmallFace is too far from the camera
faceTooBlurryImage is too blurry
badPhotoQualityGeneral photo quality failure
processingErrorServer-side processing error
badRequestMalformed request
unknownUnexpected error

selfieAttemptData

Intermediate result emitted after each selfie capture attempt (before the module completes). Same shape as selfieData. Only populated when a capture attempt is made but the module hasn't finished yet.

getUserScore result (inline userScore module)

When run inline via { module: "userScore", mode: "fast" }, the full score JSON object (identity verification scores) is included in the section result. This is passed through directly from the Incode API.


Error Reference

initializeSDK errors (typed strings)

ErrorMeaning
simulatorDetectedRunning on a simulator while testMode is false.
testModeEnabledtestMode is true in a production context.
invalidInitParamsBad apiKey / apiUrl.
configErrorConfiguration error.
sslPinningFailedSSL pinning failure (MITM or bad certificate).
unknownUnexpected error.

startOnboardingSection errors (typed strings)

ErrorMeaning
simulatorDetectedRunning on a simulator.
rootDetectedRooted device detected.
hookDetectedHooking framework detected.
permissionsDeniedRequired permissions denied.
virtualEnvDetectedVirtual / emulated environment detected.
unknownUnexpected error.

startFaceLogin errors (typed strings)

Typed error strings such as faceLoginFailed and noUserFound.

See Known Issues for notes on how device-environment detection (root, hook, virtual environment) behaves on Android.