All Products
Search
Document Center

ID Verification:CheckResult

Last Updated:Dec 24, 2024

This topic describes how to call the CheckResult operation to query the verification result of a document optical character recognition (OCR) request.

Usage notes

Operation name: CheckResult.

Endpoint: cloudauth-intl.cn-hongkong.aliyuncs.com.

Request method: HTTPS POST.

Operation description: After you receive a callback notification, you can call this operation to obtain the result of your verification request from ID Verification.

QPS limits: Limits are imposed on the queries per second (QPS) of APIs. For more information, see QPS limits of ID Verification - KYC server-side APIs.

Request parameters

Parameter

Type

Required

Description

Example

MerchantBizId

String

Yes

The custom unique identifier of your business, which is used for troubleshooting. You can specify a custom value that is 32 characters in length and contains letters and digits. Make sure that the value is unique.

Note

ID Verification does not check the uniqueness of the value. For tracing purposes, we recommend that you specify a unique value.

e0c34a77f5ac40a5aa5e6ed20c35****

TransactionId

String

Yes

The unique identifier of the verification process. You can call the Initialize operation to obtain the value.

hksb7ba1b28130d24e015d694361bee4

IsReturnImage

String

No

Specifies whether to return the images that are used for verification. Valid values:

  • Y

  • N (default)

Y

Response parameters

Parameter

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 code that is returned for the request. For more information, see the "Codes and message descriptions" section in this topic.

Success

Message

String

The message that is returned for the request.

success

Result.Passed

String

Indicates whether your customer passed the verification. Valid values:

  • Y

  • N

Y

Result.SubCode

String

The code that corresponds to the verification result. For more information, see Codes of ResultObject.SubCode.

200

Result.ExtIdInfo

String

The result of the document verification. Document verification also refers to document OCR. The value is in the JSON format. For more information, see ExtIdInfo.

{
  "ocrIdInfo": {
    "expiryDate": "",
    "originOfIssue": "National Immigration Administration",
    "englishName": "LI SI",
    "sex": "Male",
    "name": "Bob",
    "idNumber": "H11111112",
    "issueDate": "2013-01-02",
    "birthDate": "1990-02-21"
  },
  "ocrIdPassed": "N",
  "spoofInfo": {
    "spoofResult": "Y",
    "spoofType": ["SCREEN_REMARK"]
  }
}

ExtIdInfo

Parameter

Type

Description

Example

ocrIdPassed

String

Indicates whether the customer passed the document verification. Valid values:

  • Y

  • N

N

idImage

String

The Base64-encoded image of the document. If you set the isReturnImage parameter to Y in your request and the document verification is complete, this parameter is returned.

base64

ocrIdInfo

String

The fields that are returned by document verification. For more information, see Fields returned by document verification.

Note

If the document verification failed, this parameter is empty.

{
 "expiryDate": "",
 "originOfIssue": "National Immigration Administration",
 "englishName": "LI SI",
 "sex": "Male",
 "name": "Bob",
 "idNumber": "H11111112",
 "issueDate": "2013-01-02",
 "birthDate": "1990-02-21"
 }

spoofInfo

String

The result of anti-counterfeiting detection, including the risk identification result and risk type.

  • Valid values of spoofResult:

    • Y: risky.

    • N: risk-free.

  • Valid values of spoofType:

    • SCREEN_REMARK: photos.

    • PHOTO_COPY: copies.

    • TAMPER: documents that are tampered with.

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

ocrIdEditInfo

String

The information about the OCR field of the certificate that your customer submits after the customer re-edits the OCR result. You can contact your account manager to disable this feature.

{
  "expiryDate": "2026-01-02",
  "originOfIssue": "National Immigration Administration",
  "englishName": "ZHANG SAN",
  "sex": "Male",
  "name": "Tom",
  "idNumber": "H11111115",
  "issueDate": "2013-01-02",
  "birthDate": "1990-02-21"
}

Codes and message descriptions

HTTP status code

Code

Message description

200

Success

The request is successful.

400

MissingParameter

A required parameter is empty.

400

InvalidParameter

A parameter is set to an invalid value.

400

TransactionIdInvalid

The transaction ID is invalid.

403

Forbidden.RAMUserAccessDenied

The AliyunAntCloudAuthFullAccess policy is not attached to the Resource Access Management (RAM) user.

For more information, see Authorize a RAM user to access ID Verification - KYC.

403

Forbidden.AccountAccessDenied

The account has overdue payments. We recommend that you top up your account and try again.

403

Throttling.Api

API throttling is triggered.

404

ProcessNotCompleted

The verification process is not complete.

500

InternalError

An internal error occurred. To troubleshoot the error, we recommend that you submit your feedback to engineers.

Codes of ResultObject.SubCode

Code

Billed

Description and cause

200

Yes

The customer passed the verification.

212

Yes

The results of anti-counterfeiting detection on documents show risks, such as photos and copies of documents and documents that are tampered with.

Fields returned by document verification

ID cards (Hong Kong (China))

Note

2003 and 2018 versions of ID 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:

  • M

  • F

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 ID card is a permanent ID card. Valid values:

  • Y

  • N

symbols

String

The remarks. Example: "**AZ".

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

Field

Type

Description

name

String

The name.

englishName

String

The name in pinyin.

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 name in English.

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.

Passports (Global)

Field

Type

Description

surname

String

The last name.

givenname

String

The first 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.

ID cards (Macao (China))

Field

Type

Description

surnameCN

String

The last name in Chinese.

givennameCN

String

The first name in Chinese.

surname

String

The last name in English.

givenname

String

The first 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".

Mainland Travel Permit for Taiwan Residents

Field

Type

Description

name

String

The name.

englishName

String

The name in pinyin.

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.

ID cards for residents in the Chinese mainland

Field

Type

Description

name

String

The name.

sex

String

The gender.

ethnicity

String

The nationality.

birthDate

String

The birth date.

idNumber

String

The ID card number.

address

String

The address.