This topic describes how to query the verification results of the eKYC solution by using the CheckResult operation.
API description
API operation: CheckResult
Request method: HTTPS POST
Description: After you receive a callback notification, call this API operation on the server to retrieve the authentication status and materials.
ImportantID Verification service results are stored for 30 days by default. After this period, the system automatically deletes them. You must query the authentication results within 30 days of the authentication completion.
The API has a dedicated queries per second (QPS) limit. For more information, see ID Verification server-side API QPS limits.
Endpoints:
NoteThe internal network is the communication network between Alibaba Cloud products within the same region. If your business server is deployed in the same Alibaba Cloud region as the ID Verification service, you can access the service through an internal endpoint for more secure and stable network communication.
China (Hong Kong)
Public endpoint:
cloudauth-intl.cn-hongkong.aliyuncs.comInternal endpoint:
cloudauth-intl-vpc.cn-hongkong.aliyuncs.com
Online testing and integration
Before you start debugging and integration, make sure that you have read the Use OpenAPI Explorer to debug and integrate server-side API operations document to understand how to call API operations on the OpenAPI platform and how to obtain SDKs and their code.
You can use OpenAPI Explorer to directly call and debug this API operation, and generate SDK code examples.
Request parameters
Name | Type | Required | Description | Example |
MerchantBizId | String | Yes | A unique business ID that you customize. It is used to track and troubleshoot issues. The ID can be a combination of letters and digits, and must be 32 characters in length. Make sure that the ID is unique. Note Alibaba Cloud servers do not check the uniqueness of this field. For better tracking, we strongly recommend that you ensure the uniqueness of this field. | e0c34a77f5ac40a5aa5e6ed20c35**** |
TransactionId | String | Yes | The unique identifier for the entire authentication flow. You must call the Initialize API operation to obtain this value. Important To prevent tampering threats, this value must be the TransactionId stored on your server-side when you called the Initialize API operation. We do not recommend using the TransactionId from the client-side callback. | hksb7ba1b28130d24e015d6******** |
IsReturnImage | String | No | Specifies whether to return authentication image materials.
| Y |
Response parameters
Name | Type | Description | Example | |
HTTP Status Code | Integer | The HTTP status code. | 200 | |
HTTP Body | RequestId | String | The request ID. | 130A2C10-B9EE-4D84-88E3-5384FF039795 |
Code | String | The response code. | Success | |
Message | String | The detailed description of the response code. | success | |
Result.Passed | String | The final authentication result. Valid values:
| Y | |
Result.SubCode | String | The description of the authentication result. For more information, see Error codes for ResultObject.SubCode. | 200 | |
Result.ExtFaceInfo | String | The result information about face liveness verification. For the JSON format, see the example on the right. For more information, see ExtFaceInfo. | | |
Result.ExtIdInfo | String | The result information about certificate OCR. For the JSON format, see the example on the right. For more information, see ExtIdInfo. | | |
Response codes
HTTP status code | Code | Message |
200 | Success | Request successful. |
400 | MissingParameter | Parameter cannot be empty. |
InvalidParameter | Invalid parameter. | |
TransactionIdInvalid | Invalid Transaction ID. | |
403 | Forbidden.RAMUserAccessDenied | You need to grant the RAM user the AliyunAntCloudAuthFullAccess permission. For more information, see Authorize RAM users to access the service. |
Forbidden.AccountAccessDenied | Ensure that you have activated ID verification and your account has no overdue payment. | |
Throttling.Api | API request is blocked due to throttling. | |
404 | ProcessNotCompleted | The entire authentication process is not completed. |
500 | InternalError | Internal system error. Provide feedback to engineers for troubleshooting. |
Error codes for ResultObject.SubCode
Error code | Is authentication record billed | Description and suggested reasons |
200 | Yes | Authentication passed. |
201 | Yes | The name and ID card do not match in the official database. The user's information may be incorrect or false. Suggest the user verify and retry. |
202 | Yes | Identity information not found in the official database. We recommend providing a manual review option. |
204 | Yes | The liveness face and certificate photo do not match. This may be due to person-certificate mismatch or low quality of the liveness photo. |
205 | Yes | Liveness detection indicates risk. |
206 | Yes | Business policy restriction. When safe mode is enabled, security checks are performed on the authentication device and environment. If risks are detected, the authentication result will fail. You can troubleshoot using the following methods:
|
207 | Yes | Face verification failed in the official database. This may be a different person or low quality of the liveness photo. |
209 | Yes | Authoritative comparison source exception. |
212 | Yes | Certificate anti-counterfeiting detection indicates risk. There may be high-risk operations such as rephotographing, tampering, or photocopying. |
ExtFaceInfo
Name | Type | Description | Example |
facePassed | String | Indicates whether the customer passes the face liveness verification. Valid values:
| Y |
faceComparisonScore | Double | The similarity score between the captured face image and the face image on the document. The score ranges from 0 to 100. Note A higher score indicates a higher probability that the two faces belong to the same person. The default threshold is 90. You can customize the threshold based on your business sample data. | 99.99 |
faceImg | String | The captured face image in the Base64 format. This parameter is returned if you set | Base64-encoded image |
faceAttack | String | Indicates whether a liveness attack was detected during face capture. Valid values:
| N |
faceQuality | Double | The quality score of the face image. The score ranges from 0 to 100. | 99.99 |
faceOcclusion | String | Indicates whether the face is occluded. Valid values:
| N |
docVideoUrl | String | The download URL of the evidence video in Object Storage Service (OSS). Note
| https://aliyun-cloudauth.oss-aliyuncs.com/******.webm |
faceAge | String | The predicted age of the individual based on the face image. If the prediction fails, this parameter is not returned. | 30 |
faceGender | String | The predicted gender of the individual based on the face image. If the prediction fails, this parameter is not returned. Valid values:
| M |
authorityComparisonScore | Double | The similarity score between the captured face image and the face image from the official authoritative data source. The score ranges from 0 to 100. Note
| 99.99 |
faceAttackScore | Double | The probability of a fake face attack predicted by the facial recognition algorithm. A higher score indicates a higher probability of a fake face. The score ranges from 0 to 100. | 80 |
guardRiskScore | Double | The probability of device risk predicted by the face guard algorithm. A higher score indicates a higher device risk. The score ranges from 0 to 100. | 90 |
ExtIdInfo
Name | Type | Description | Example |
ocrIdPassed | String | The final result of the certificate OCR phase.
| N |
idImage | String | The certificate OCR photo in Base64 format. This field is returned if you set the isReturnImage parameter to Y in the request and the certificate OCR process is completed. | Base64 format |
ocrIdInfo | String | The certificate OCR field information. Note If the certificate OCR process fails, this field is empty. | |
spoofInfo | String | The result of anti-counterfeiting detection, including the risk identification result and risk type: Note Card detection is enabled only when you set IdSpoof = Y in the Initialize operation. Otherwise, spoofResult returns N by default, and spoofType is empty.
| |
ocrIdEditInfo | String | The certificate OCR field information submitted by the user after editing it on the OCR result page. This is returned when the client is configured to enable the OCR result editing page (ShowOcrResult). | |
idBackImage | String | The OCR photo of the back of the certificate, in Base64 format. Note This field is returned if you set the isReturnImage = Y parameter in the request and the certificate OCR process is completed. | base64 |
ocrIdBackInfo | String | The OCR field information from the back of the certificate. Important If the certificate OCR process fails, this field is empty. | |
spoofBackInfo | String | The result of certificate anti-spoofing detection, including the threat decision result and threat type:
Note This is an algorithm prediction result. This field may not be returned. We recommend that you avoid setting necessary dependencies on it in your business. | |
Field returned by document recognition
Hong Kong (China) Identity Card
Both the 2003 and 2018 versions of smart identity cards are supported.
Field | Type | Description |
name | String | The name. |
englishName | String | The name in English. |
nameCode | String | The Chinese name code. |
sex | String | The gender. Valid values:
|
birthDate | String | The date of birth. |
idNumber | String | The ID card number. |
currentIssueDate | String | The date of registration. |
firstIssueDate | String | The month and year of first registration. |
isPermanent | String | Indicates whether the identity card is a permanent resident identity card. Valid values:
|
symbols | String | The remarks. Example: "***AZ". |
Exit-Entry Permit for Traveling to and from Hong Kong and Macao
Field | Type | Description |
name | String | The name. |
englishName | String | The romanized name. |
sex | String | The gender. |
birthDate | String | The date of birth. |
idNumber | String | The ID card number. |
issueDate | String | The issuance date. |
expiryDate | String | The expiration date. |
placeOfIssue | String | The issuance place. |
originOfIssue | String | The issuance authority. |
Mainland Travel Permit for Hong Kong and Macao Residents
Field | Type | Description |
name | String | The name. |
englishName | String | The romanized name. |
sex | String | The gender. |
birthDate | String | The date of birth. |
idNumber | String | The ID card number. |
issueDate | String | The issuance date. |
expiryDate | String | The expiration date. |
originOfIssue | String | The issuance authority. |
Mainland Travel Permit for Taiwan Residents
Field | Type | Description |
name | String | The name. |
englishName | String | The romanized name. |
sex | String | The gender. |
birthDate | String | The date of birth. |
idNumber | String | The ID card number. |
issueDate | String | The issuance date. |
expiryDate | String | The expiration date. |
originOfIssue | String | The issuance authority. |
placeOfIssue | String | The issuance place. |
Global passport
Field | Type | Description |
surname | String | The surname. |
givenname | String | The given name. |
sex | String | The gender. |
birthDate | String | The date of birth. |
passportNo | String | The passport number. |
nationality | String | The nationality. |
expiryDate | String | The expiration date. |
countryCode | String | The country code. |
Macao (China) Resident Identity Card
Field | Type | Description |
surnameCN | String | The surname in Chinese. |
givennameCN | String | The given name in Chinese. |
surname | String | The surname in English. |
givenname | String | The given name in English. |
sex | String | The gender. |
birthDate | String | The date of birth. |
idNumber | String | The ID card number. |
expiryDate | String | The expiration date. |
placeOfBirth | String | The code of the birthplace. Example: "AS". |
People's Republic of China Resident Identity Card
Field | Type | Description |
name | String | The name. |
sex | String | The gender. |
ethnicity | String | The ethnicity. |
birthDate | String | The date of birth. |
idNumber | String | The ID card number. |
address | String | The address. |
province | String | The province of residence. Note This is a reserved field and is empty by default. |
city | String | The city of residence. Note This is a reserved field and is empty by default. |
originOfIssue | String | The issuance authority. |
issueDate | String | The issuance date. |
expiryDate | String | The expiration date. |