All Products
Search
Document Center

ID Verification:CheckResult

Last Updated:Sep 17, 2025

This topic describes how to use the CheckResult operation to retrieve the authentication result for the ID OCR solution.

API description

  • Operation name: CheckResult

  • Request method: HTTPS POST

  • Description: After you receive a callback notification, you can call this operation on your server to retrieve the authentication result.

    Important

    ID Verification service results are stored for 30 days by default and are automatically deleted after this period. You must query the authentication results within 30 days after the authentication is complete.

  • QPS limit: The API has a dedicated queries per second (QPS) limit. For more information, see QPS limits for ID Verification server-side API operations.

  • Endpoints:

    Note

    The internal network is used for communication between Alibaba Cloud products in the same region. If your server is deployed in an Alibaba Cloud region, you can use the internal endpoint to access the ID Verification service. This provides more secure and stable network communication.

    China (Hong Kong)

    • Internet: cloudauth-intl.cn-hongkong.aliyuncs.com

    • Internal: cloudauth-intl-vpc.cn-hongkong.aliyuncs.com

Online debugging and integration

Note

Before you start debugging and integration, ensure that you read the Use OpenAPI Explorer to debug and integrate server-side APIs document to understand how to call APIs in OpenAPI Explorer and obtain SDKs and their code.

You can debug this operation in OpenAPI Explorer, and generate SDK sample code for this operation.

Request parameters

Name

Type

Required

Description

Example

MerchantBizId

String

Yes

A unique business ID that you customize to track and troubleshoot issues. The ID can be a combination of up to 32 letters and digits. Make sure that the ID is unique.

Note

Alibaba Cloud servers do not check the uniqueness of this value. 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 obtain this value by calling the Initialize API operation.

Important

To avoid tampering threats, you must use the TransactionId stored on your server from the Initialize API operation call. We do not recommend using the TransactionId from the client-side callback.

hksb7ba1b28130d24e015d6********

IsReturnImage

String

No

Specifies whether to return the authentication image materials.

  • Yes: Required

  • N: No (default)

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-5384FF03****

Code

String

Return to Code.

Success

Message

String

The detailed description of the response code.

success

Result.Passed

String

The final authentication result. Valid values:

  • Y: by

  • N: Failed

Y

Result.SubCode

String

The description of the authentication result. For more information, see ResultObject.SubCode error codes.

200

Result.ExtIdInfo

String

The information related to the ID OCR result. For the JSON format, see the example on the right. For more information, see ExtIdInfo.

{
  "ocrIdInfo": {
    "expiryDate": "",
    "originOfIssue": "Exit and Entry Administration, Ministry of Public Security",
    "englishName": "LI SI",
    "sex": "Male",
    "name": "Li Si",
    "idNumber": "H11111112",
    "issueDate": "2013-01-02",
    "birthDate": "1990-02-21"
  },
  "ocrIdPassed": "N",
  "spoofInfo": {
    "spoofResult": "Y",
    "spoofType": ["SCREEN_REMARK"]
  }
}

ExtIdInfo

Name

Type

Description

Example

ocrIdPassed

String

The final result of the ID OCR phase.

  • Y: Passed

  • N: Failed

N

idImage

String

The ID OCR photo in Base64 format. This field is returned if you set the isReturnImage parameter to Y in the request and the ID OCR process is completed.

base64

ocrIdInfo

String

The field information from the ID OCR. For more information, see OCR result fields.

Note

If the ID OCR process fails, this field is empty.

{
 "expiryDate": "",
 "originOfIssue": "Exit and Entry Administration, Ministry of Public Security",
 "englishName": "LI SI",
 "sex": "Male",
 "name": "Li Si",
 "idNumber": "H11111112",
 "issueDate": "2013-01-02",
 "birthDate": "1990-02-21"
 }

spoofInfo

String

The result of the ID anti-spoofing check. The result includes the risk decision and risk type.

Note

ID card detection is enabled only when IdSpoof = Y is set in the Initialize operation.

Otherwise, spoofResult defaults to N and spoofType is empty.

  • spoofResult:

    • Y: A risk is detected.

    • N: Normal.

  • spoofType:

    • SCREEN_REMARK: Screen recapture

    • PHOTO_COPY: Photocopy

    • TAMPER: PS tampered

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

ocrIdEditInfo

String

The ID OCR field information that the user submits after editing it on the OCR result page. This is returned when the client is configured to enable the OCR result editing page (ShowOcrResult).

Note

The ShowOcrResult configuration is set in the server-side Initialize operation for Web SDK integration.

{
 "expiryDate": "2026-01-02",
 "originOfIssue": "Exit and Entry Administration, Ministry of Public Security",
 "englishName": "ZHANG SAN",
 "sex": "Male",
 "name": "Zhang San",
 "idNumber": "H11111115",
 "issueDate": "2013-01-02",
 "birthDate": "1990-02-21"
 }

idBackImage

String

The OCR photo of the back of the ID document, in Base64 format.

Note

This field is returned if the isReturnImage = Y parameter is set in the request and the ID OCR process is completed.

base64

ocrIdBackInfo

String

The OCR field information from the back of the ID document.

Important

If the ID OCR process fails, this field is empty.

{
   "originOfIssue": "Tanghe County Public Security Bureau",
   "issueDate": "20230102",
   "expireDate": "20330102"
 }

spoofBackInfo

String

The result of the ID anti-spoofing check for the back of the document. The result includes the risk decision and risk type.

Note

ID card detection is enabled only when IdSpoof = Y is set in the Initialize operation.

Otherwise, spoofResult defaults to N and spoofType is empty.

  • spoofResult:

    • Y: A risk is detected.

    • N: Normal.

  • spoofType:

    • SCREEN_REMARK: Screen recapture

    • PHOTO_COPY: Photocopy

    • TAMPER: PS tampered

Note

This is an algorithm prediction result. This field may not be returned. We recommend that you do not set a necessary dependency on this field in your business logic.

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

Return code

HTTP status code

Code

Message description

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.

ResultObject.SubCode error codes

Note

Subcode is returned based on different product solutions or integration methods. For details, refer to the following table.

Applicable solution

Error code

Is authentication record billed

Description and suggested reasons

General

200

Yes

Authentication passed.

  • ID_OCR pure server-side integration (DocOcr)

  • ID_OCR_MAX

211

Yes

The quality or resolution of the certificate image does not meet requirements, or the image itself is incomplete. Ensure the photo of the certificate's portrait side is clear, has normal exposure, is complete without occlusion, and has no significant angle deviation.

  • ID_OCR App (SDK) integration

  • ID_OCR Web (SDK) integration

  • ID_OCR_MAX

212

Yes

Certificate anti-counterfeiting detection indicates risk. There may be high-risk operations such as rephotographing, tampering, or photocopying.

  • ID_OCR pure server-side integration (DocOcr)

  • ID_OCR_MAX

213

Yes

The specified certificate type was not detected (recognition mode) or the certificate type could not be identified (classification mode).

We recommend uploading a clear, complete certificate image with normal angle.

OCR result fields

Hong Kong Identity Card

Note

Both the 2003 and 2018 versions of the smart identity card are supported.

Field

Type

Description

name

String

Name

englishName

String

Name (English)

nameCode

String

Chinese Commercial Code for the name

sex

String

Sex. Valid values:

  • M (Male)

  • F (Female)

birthDate

String

Date of birth

idNumber

String

Identity card number

currentIssueDate

String

Date of registration

firstIssueDate

String

Month and year of first registration

isPermanent

String

Indicates whether it is a permanent identity card. Valid values:

  • Y (Yes)

  • N (No)

symbols

String

Symbol mark. Example: "**AZ".

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

Field

Type

Description

name

String

Name

englishName

String

Name (Pinyin)

sex

String

Sex

birthDate

String

Date of birth

idNumber

String

Certificate number

issueDate

String

Date of issue

expiryDate

String

Date of expiry

placeOfIssue

String

Place of issue

originOfIssue

String

Issuing authority

Mainland Travel Permits for Hong Kong and Macao Residents

Field

Type

Description

name

String

Name

englishName

String

Name (English)

sex

String

Sex

birthDate

String

Date of birth

idNumber

String

Certificate number

issueDate

String

Date of issue

expiryDate

String

Date of expiry

originOfIssue

String

Issuing authority

Global Passport

Field

Type

Description

surname

String

Surname

givenname

String

Given name

sex

String

Sex

birthDate

String

Date of birth

passportNo

String

Passport number

nationality

String

Nationality

expiryDate

String

Date of expiry

countryCode

String

Country code

Macao Resident Identity Card

Field

Type

Description

surnameCN

String

Surname (Chinese)

givennameCN

String

Given name (Chinese)

surname

String

Surname (English)

givenname

String

Given name (English)

sex

String

Sex

birthDate

String

Date of birth

idNumber

String

Certificate number

expiryDate

String

Date of expiry

placeOfBirth

String

Place of birth code. Example: "AS".

Mainland Travel Permit for Taiwan Residents

Field

Type

Description

name

String

Name

englishName

String

Name (Pinyin)

sex

String

Sex

birthDate

String

Date of birth

idNumber

String

Certificate number

issueDate

String

Date of issue

expiryDate

String

Date of expiry

originOfIssue

String

Issuing authority

placeOfIssue

String

Place of issue

People's Republic of China Resident Identity Card

Field

Type

Description

name

String

Name

sex

String

Sex

ethnicity

String

Ethnicity

birthDate

String

Date of birth

idNumber

String

ID card number

address

String

Address