All Products
Search
Document Center

ID Verification:CheckResult

Last Updated:Nov 17, 2023

This topic describes how to use CheckResult API to request a result about eKYC process running status and other corresponding results.

Interface description

Interface name: CheckResult.

Service address: cloudauth-intl.cn-hongkong.aliyuncs.com.

Request method: HTTPS POST.

Interface description: When your client receives the SDK callback notification, you can obtain the result of the eKYC process through this interface on the server.

Request parameters

Parameter

Type

Required

Description

Example

MerchantBizId

String

Yes

A unique business ID for tracing purpose. For example, the sequence ID from the merchant's business-related database.

Note

The Alibaba Cloud server does not perform uniqueness check on the value of this field. For better tracking, it is strongly recommended to enable the merchant server to guarantee the uniqueness of the business ID.

e0c34a77f5ac40a5aa5e6ed20c35****

TransactionId

String

Yes

Required. The unique transaction ID that is returned in the response of Initialize API.

hksb7ba1b28130d24e015d694361bee4

IsReturnImage

String

No

A flag that specifies whether the image data needs to be returned in the response. The following values are supported:

  • Y: The image data needs to be returned in the response.

  • N: The image data does not need to be returned in the response.

By default, the value of N is used.

Y

Response parameters

Field name

Data type

Description

Example

HTTP Status Code

Integer

The HTTP status code.

200

HTTP Body

RequestId

String

The unique ID of the request, which can be used to locate issues.

Code

String

Return code. For the full list of codes, see Codes and Messages.

Success

Message

String

Response detailed message.

Success

Result.Passed

String

The final result of the identity verification.

Possible values and their meanings are as below:

  • Y: pass.

  • N: fail.

Y

Result.SubCode

String

Authentication result sub code

200

Result.ExtFaceInfo

String

Detailed information about face verification.

Optional. JSON string of ExtFaceInfo. For more information, see ExtFaceInfo. showed below.​

{
 "faceAttack": "N",
 "faceComparisonScore": 99.99,
 "faceImg": base64,
 "backupFaceImg": base64,
 "facePassed": "Y",
 "faceQuality": 95.45,
 "faceOcclusion": "N"
}

Result.ExtIdInfo

String

Detailed information about identity document recognition.

Optional. JSON string of ExtIdInfo. For more information, see ExtIdInfo showed below.​

{
 "ocrIdInfo": {
 "expiryDate": "",
 "originOfIssue": "公安部出入境管理局",
 "englishName": "LI SI",
 "sex": "男",
 "name": "李四",
 "idNumber": "H11111112",
 "issueDate": "2013-01-02",
 "birthDate": "1990-02-21"
 },
 "ocrIdPassed": "N",
 "spoofInfo": {
 "spoofResult": "Y",
 "spoofType": [
 "SCREEN_REMARK"
 ]
 }
}

Codes and Messages

HTTP Status Code

Code

Message

200

Success

The request has succeeded.

400

MissingParameter

The parameter is missing.

400

InvalidParameter

The parameter is invalid.

400

TransactionIdInvalid

Transaction id is invalid.

403

Forbidden.RAMUserAccessDenied

Grant AliyunAntCloudAuthFullAccess permission to the RAM user. For more information, see Authorize a RAM user to access Real ID.

403

Forbidden.AccountAccessDenied

The account is unauthorized, overdue, deactivated, or disabled.

403

Throttling.Api

Request was denied due to api flow control.

404

ProcessNotCompleted

The identity proofing process is not completed.

500

InternalError

The error message returned when a temporary server error occurs. We recommend that you try again. If the error code persists, please submit a ticket for help.

SubCode

SubCode

Whether billing

Message

200

Yes

pass.

201

Yes

Owner Name and ID number do not match in the authority database. The user information may be incorrect or false. You could suggest customer trying again.

202

Yes

No identity information can be found in the authority database. It is recommended to reserve manual review for this situation.

204

Yes

The authentication failed. Similarity score is lower than threshold. Possible reasons: not the same person or the quality of the face selfie image is too low.

205

Yes

The authentication failed. Spoofing behavior is detected.

207

Yes

Face comparison with the authority database failed. Possible causes: not the same person or the quality of the face selfie image is too low.

209

Yes

Authority database exception.

212

Yes

The result of certificate anti-counterfeiting detection indicates tampering, screen recapture or photo copy are detected.

ExtFaceInfo

The following table shows the fields that can be specified in the ExtFaceInfo data model.

Field name

Data type

Description

Example

facePassed

String

The face result of the identity verification.

Possible values and their meanings are as below:

  • Y: pass.

  • N: fail.

Y

faceComparisonScore

Double

Specifies the score that indicates a result of comparing the live face (selfie) against the face recognized from the identity document. Required if the face verification process runs successfully. The value of this field is in the range of 0-100.

99.99

faceImg

String

The face selfie image, which is encoded in base64. This field is specified only when the value of the isReturnImage field in the request is set to Y and the whole eKYC process runs successfully.

base64

backupFaceImg

String

Back up facial selfie images with base64 encoding. This field will only be specified when the isReturnImage field in the request is set to Y, configured to upload 2 photos, and the entire eKYC process runs successfully

base64

faceAttack

String

Specifies whether the face selfie image is detected as a fake face attack by using the face liveness check algorithm. If the image is a fake face attack, the value of Y is returned; otherwise, the value of N is returned.

N

faceQuality

Double

Specify a score that represents the result of the real face quality score. If the facial verification process runs successfully, it is mandatory. The value of this field is between 0 and 100.

99.99

faceOcclusion

String

The results of occlusion detection. If the facial verification process runs successfully, it is mandatory. The value of this field is Y (occluded)/N (unobstructed).

N

ExtIdInfo

The following table shows the fields that can be specified in the ExtIdInfo data model.

Field name

Data type

Description

Example

ocrIdPassed

String

Whether the identity document recognition process runs successfully. Valid values:

  • Y: pass.

  • N: fail.

N

idImage

String

The identity document image, in base64 format. This field is specified only when the value of the isReturnImage field in the request is set to 'Y' and the whole eKYC process runs successfully.

base64

ocrIdInfo

String

Document OCR identification information, Json string, see the "OCR extraction field" column for details on the content format.

Note

If authentication or OCR fails, this parameter is left empty.

{
 "expiryDate": "",
 "originOfIssue": "公安部出入境管理局",
 "englishName": "LI SI",
 "sex": "男",
 "name": "李四",
 "idNumber": "H11111112",
 "issueDate": "2013-01-02",
 "birthDate": "1990-02-21"
 }

spoofInfo

String

Spoofing check results of Identity document and corresponding types. Valid values:

  • spoofResult:

    • Y: failed the authenticity check.

    • N: pass.

  • spoofType:

    • SCREEN_REMARK: screen recapture.

    • PHOTO_COPY: Copy, not original document.

    • TAMPER: PS tampering.

{
 "spoofResult": "Y",
 "spoofType": [
 "SCREEN_REMARK"
 ]
}

ocrIdEditInfo

String

OCR guest editing information, Json string, for detailed information on content format, please refer to the "OCR Extraction Fields" column. Only when the customer completes ocr editing and certification is passed will there be return.

{
 "expiryDate": "2026-01-02",
 "originOfIssue": "公安部出入境管理局",
 "englishName": "ZHANG SAN",
 "sex": "男",
 "name": "张三",
 "idNumber": "H11111115",
 "issueDate": "2013-01-02",
 "birthDate": "1990-02-21"
 }

OCR extraction field

HKID (Hong Kong Identity Card)

Note

Both of 2003 and 2018 smart card version are included.

Field name

Data type

Description

name

String

Chinese Name.

englishName

String

English Name.

nameCode

String

Telex code, which is corresponding to the Chinese name.

sex

String

Gender. Valid values:

  • M (male)

  • F (female)

birthDate

String

Date of birth.

idNumber

String

ID number.

currentIssueDate

String

Date of latest registration.

firstIssueDate

String

Month and year of first registration.

isPermanent

String

Whether it is a permanent residence identity card. Valid values:

  • Y (permanent)

  • N (non-permanent)

symbols

String

Symbols below the date of Birth. Such as "***AZ".

China Exit-Entry Permit for Travelling to and from Hong Kong(China) and Macao

Field name

Data type

Description

name

String

Chinese Name.

englishName

String

English Name.

sex

String

Gender.

birthDate

String

Date of birth.

idNumber

String

ID number.

issueDate

String

Date of issuance.

expiryDate

String

Date of expiry.

placeOfIssue

String

Place of issue.

originOfIssue

String

Authority for issue.

China Mainland Travel Permit for Hong Kong and Macao Residents

Field name

Data type

Description

name

String

Chinese Name.

englishName

String

English Name.

sex

String

Gender.

birthDate

String

Date of birth.

idNumber

String

ID number

issueDate

String

Date of Issuance.

expiryDate

String

Date of Expiry.

originOfIssue

String

Authority for issue.

Passport for all countries

Field name

Data type

Description

surname

String

Surname.

givenname

String

Given name.

sex

String

Gender.

birthDate

String

Date of birth.

passportNo

String

Passport number.

nationality

String

Country.

expiryDate

String

Date of Expiry.

countryCode

String

Country Code.

Macau Identity Card

Field name

Data type

Description

surnameCN

String

Chinese surname.

givennameCN

String

Chinese given name.

surname

String

Surname.

givenname

String

Given name.

sex

String

Gender.

birthDate

String

Date of birth.

idNumber

String

ID number.

expiryDate

String

Date of Expiry.

placeOfBirth

String

Code for place of birth. Such as "AS".

China Mainland Travel Permit for Taiwan Residents

Field name

Data type

Description

name

String

Chinese Name.

englishName

String

English Name.

sex

String

Gender.

birthDate

String

Date of birth.

idNumber

String

ID number.

issueDate

String​

Date of issuance.

expiryDate

String

Date of expiry.

originOfIssue

String

Authority for issue.

placeOfIssue

String

Place of issue.

China Mainland 2nd-generation ID card

Field name

Data type

Descriptions

name

String

Name.

sex

String

Gender.

ethnicity

String

Ethnicity.

birthDate

String

Date of birth.

idNumber

String

ID number.

address

String

Address.

province

String

Province.

city

String

City.