Plugin Response
Response States
SUCCESS: Process finished successfully
EXIT: Process terminated by the user with no errors
FAILURE: Process finished with the user's failure to pass the service requirements
ERROR : Process terminated due to an error in the builder
Note: In the case ofERROR, please check your configurations
Document verification plus - Case Handling
When using VIDVOCRResult.getData(), the returned ocrResult may include a documentVerificationPlus object.
This object contains validation flags and quality signals that help you determine whether the document should be accepted, reviewed, recaptured, or rejected.
Fields Returned Under documentVerificationPlus
documentVerificationPlusfrontDataValidity
boolean
Overall validity of the front side based on greyscale flags + invalid fields list
backDataValidity
boolean
Overall validity of the back side based on greyscale flags + invalid fields list
isFrontGreyscale
boolean
Indicates whether the front side is greyscale
isBackGreyscale
boolean
Indicates whether the back side is greyscale
expired
boolean
Whether the document is recognized as expired
reviewRequired
List<String>
Fields that require attention (e.g. Nid, gender, expirydate…)
How to Read These Values
frontDataValidityandbackDataValidityact as parent flags → You can take action directly based on them if you want a simple validation flow.For more control, you can check detailed signals:
use greyscale flags if you want to reject black-and-white copies
use
reviewRequiredto apply different logic per field e.g. reject if nid is invalid but allow if gender is inconsistent
This allows fully customizable decision logic depending on your business rules.
Example Handling Logic
Advance confidence - Case Handling
When using VIDVOCRResult.getData(), the returned ocrResult may include a advancedConfidence object.
This object contains manipulation flags that help you determine whether the document should be accepted, reviewed, recaptured, or rejected.
Fields Returned Under advanceConfidence
advanceConfidencefraudDetectionZone
int
Parent zone flag → Result of face + image manipulation combined
faceFraudZone
int
Fraud confidence specifically related to face physical tampering
frontImageManipulationZone
int
Indicates signs of front image physical manpulation
Zone Meaning
0
Green
No manipulation detected
1
Yellow
Requires human review (suspicious)
2
Red
Strong indicators of fraud / manipulation
Example Handling Logic
Primary Response Object
nameValuePairs
Note: All SDK responses are returned in JSON format
Note: This is the first-level object
nameValuePairs Object Body
nameValuePairs Object Bodystate<string>errorCode<string>errorMessage<string>ocrResult<object>capturedImageslist<object>eventslist<object>errorslist<object>
ocrResult Object Body
ocrResult Object BodyNote: This is the second-level object that contains all third-level objects
sessionID<string>
ocrResult <sub-object>
firstName<string>fullName<string>religion<string>gender<string>dateOfBirth<string>age<int>maritalStatus<string>husbandName<string>street<string>birthGovernorate<string>policeStation<string>governorate<string>profession<string>releaseDate<string>expiryDate<string>expired<boolean> : indicates whether the NID is past its expiry date.serialNumber<string>frontNid<string>backNid<string>frontDataValidity<boolean> : data on the front side is valid or not.backDataValidity<boolean> : data on the back side is valid or not.frontConfidence<int> : indicates if the front of the document is real or fake.backConfidence<int> : indicates if the back of the document is real or fake.isRootOfTrustCompatible<boolean>transactionIdFront<string> : This could be used in face match in liveness sdk.transactionIdBack<string>combinationID<string>documentVerificationPlus <object>
frontDataValidity<boolean> : data on the front side is valid or not.backDataValidity<boolean> : data on the back side is valid or not.isFrontGreyscale<boolean>backConfidence<int>isBackGreyscale<boolean>expired<boolean>reviewRequiredArrayList<string> : an ArrayList of the names of fields that is invalid.
advancedConfidence <object>
fraudDetectionZone <int>
fraudDetectionDetails <object>
faceFraudZone <int>
faceFraudConfidence <float>
frontImageManipulationZone <int>
frontImageManipulationConfidence <float>
Note: captures object contains the latest images used for the OCR service
The raw response in hmacDataList should be mapped to the result object as per the HMAC Validation Documentation
decryptionKeys <sub-object>
nationalIdFrontRequestKey[UInt8]nationalIdBackRequestKey[UInt8]combineResponseKey[UInt8]
Review Required Feature Breakdown:
The following are possible values that could come in the review required list along with their triggers
Review Required Possible Values
date_of_birth triggered by an invalid date or incorrect format
street when the field value is missing from the response
police_station when the field value is missing from the response
governorate when the field value is missing from the response
birth_governorate triggered by an invalid field format
back_nid triggered by an invalid field format
front_nid triggered by an invalid field format
serial_number triggered by an invalid field format
full_name triggered when the field value is missing from the response
first_name triggered when the field value is missing from the response
expiry_date triggered by an invalid date or incorrect format
release_date triggered by an invalid date or incorrect format
front_img triggered when is_front_greyscale is true
back_img triggered when is_back_greyscale is true
capturedImages Object Body
capturedImages Object BodynationalIDLabel<string>nationalIdImage<base64-string>
Note: capturedImages is a list of objects that contains all images captured throughout the experience
events Object Body
events Object Bodydate<string>key<string>screen<string>timestamp<string>type<string>
errors Object Body
errors Object Bodycode<string>message<base64-string>date<string>screen<string>timestamp<string>type<string>
Note: events and errors objects are only returned if enable_logging is set to true from the plugin configuration
State Responses
SUCCESS
nameValuePairs<object>state<string>ocrResult<sub-object>capturedImages<sub-object>events<sub-object>errors<sub-object>
EXIT
nameValuePairs<object>state<string>ocrResult<sub-object>capturedImages<sub-object>step<string>events<sub-object>errors<sub-object>
Note: step <string> identifies the point where the user chose to exit the SDK
FAILURE
nameValuePairs<object>state<string>errorCode<int>errorMessage<string>capturedImages<sub-object>ocrResult<sub-object>events<sub-object>errors<sub-object>
ERROR
nameValuePairs<object>state<string>errorCode<int>errorMessage<string>
Last updated