SelphID Result
The possible fields returned in the result are the following:
finishStatus
Returns a number for the operation result. Possible values:
1: The operation was successful.
2: An error has occurred, which will be indicated in the string
errorTypeand, optionally, an extra information message will be shown in the propertyerrorMessage.
finishStatusDescription
Returns a description of the operation result. Possible values:
STATUS_OK: The operation was successful.
STATUS_ERROR: An error has occurred, which will be indicated in the string
errorType(errorDiagnostic for Flutter)and, optionally, an extra information message will be shown in the propertyerrorMessage.
errorType or errorDiagnostic(only for Flutter)
Indicates why the component failed. Possible values:
In iOS, the errorType received from the SDK in a timeout can be SDK_TIMEOUT or SELPHID_TIMEOUT(UIImage?, UIImage?). There is no case in iOS TIMEOUT without a prefix. The case SELPHID_TIMEOUT retains, when available, the raw document images captured before the timeout (UIImage? associated with the enum, not fields of the success result). In hybrid integrations, the internal Swift enum name must not be consumed as the response contract.
To serialize the error in iOS, use:
errorType.toString(addComponentPrefix: "SPD_")This returns SPD_TIMEOUT both for SDK_TIMEOUT and for SELPHID_TIMEOUT. On Android, the equivalent of the error list is TIMEOUT (without a prefix).
In an iOS timeout:
finishStatusisSTATUS_ERRORdataisnil(the following are not returnedfrontDocument,ocrResults, etc.)The raw images, if any, go in the associated value of
SELPHID_TIMEOUT, not indata
errorMessage
Indicates an additional error message. It is an optional value.
frontDocument / tokenFrontDocument:
The front image of the document, processed, cleaned, and cropped by the edges, and its corresponding token.
backDocument / tokenBackDocument
The back image of the document, processed, cleaned, and cropped by the edges, and its associated token.
faceImage / tokenFaceImage
The face image found in the document, if any, and its associated token.
Valid for the MATCHING FACIAL process.
documentCaptured
This property indicates the document model that was captured when a search is performed in SMSearch mode. This allows the application to know which model, among all the allowed ones, was detected.
matchingSidesScore
This property returns a calculation of the similarity of the data read between the front and back of the document. The calculation is performed by checking the similarity between the common fields read on both sides. The result of the calculation will be a value between 0.0 and 1.0 if there are common fields in the document. The higher the value, the more similar the compared data are. If the calculation returns -1.0, the document does not contain common fields or information from both sides is not yet available.
Property captureProgress
This property returns the state in which the capture process was when the widget finished successfully (STATUS_OK). In an iOS timeout, data is nil and this value is not included in the SdkResult from the error callback. These are the possible values:
0: In the Front reading, the widget finished without having detected anything. Usually when no document is placed.
1: In the Front reading, the widget finished having partially detected a document. In this case some of the expected elements could be detected, but not all the necessary ones.
2: In the Front reading, the widget finished having completed detection of all the document elements. If the widget ends in this state, it is because OCR analysis could not be completed successfully.
3: In the Front reading, the widget finished having analyzed and extracted all the OCR from the document. This is the state in which a correct Front reading of a document would end.
The states from 4 to 7 are exactly the same, only they refer to the process result when the back is analyzed.
ocrResults
This dictionary contains all the data detected in the document. The keys of each field are encoded in such a way that the key itself contains information about where the value was obtained. Thus, for example, the key Front/MRZ/DocumentNumber indicates the value of the DocumentNumber that was read on the Front of the document and in the MRZ region. These keys depend on the captured document and therefore will be different across countries and document models. The dictionary also contains keys with more generic names that do not carry location information. These keys contain the most complete data among all those read for that field.
These keys are the following:
FirstName: The value associated with this key contains the user's first name.
LastName: The value associated with this key contains the user's last name.
DateOfBirth: The value associated with this key contains the date of birth detected in the document.
Gender: The value associated with this key contains the user's sex detected in the document.
Nationality: The value associated with this key contains the user's nationality detected in the document.
DocumentNumber: The value associated with this key contains the document number.
DateOfExpiry: The value associated with this key contains the document expiry date.
Issuer: The value associated with this key contains the document issuer.
DateofIssue: The value associated with this key contains the document issue date.
PlaceOfBirth: The value associated with this key contains the user's place of birth.
Address: The value associated with this key contains the address detected in the document.
Additionally, keys of the results object itself are added to make searching easier:
DocumentCaptured: Value of the document model that was captured according to the model .xml. Corresponds to the documentCaptured property.
MatchingSidesScore: Value indicating the correspondence between the read sides of the document. Corresponds to the matchingSidesScore property.
timeoutDiagnostic
In Android, this property returns a string that explains why the widget timed out. In iOS, the widget generates this information internally, but the component do not exposes it in the SdkResult error showDiagnostic . If
countryCaptured
Country of the document.
documentTypeCaptured
Document type. Corresponds to those in section 5.1.10.
personalData
Reduced set of data obtained from the user:
issuer
documentNumber
issueDate
expiryDate
name
surname
fullName
gender
birthDate
birthPlace
nationality
address
nfcKey
numSupport
mrz
Last updated