This topic describes how to call the InitFaceVerify API to initiate a request for ID Verification for Financial Services.
Initiate verification request
API operation: InitFaceVerify
Global endpoint: cloudauth.aliyuncs.com (IPv4) or cloudauth-dualstack.aliyuncs.com (IPv6)
Request method: POST and GET
Transport protocol: HTTPS
Description: Call this API before each verification to obtain a CertifyId, which links all API calls for a single authentication request.
QPS limit: Each API has a dedicated limit. See Server-side API QPS limits.
The Financial-grade Real Person Authentication service does not currently support hard caps or automatic suspension based on the number of calls. To control costs and prevent unexpected charges, configure consumption alert rules immediately after integration:
Configure consumption alerts: Set high-value consumption alerts to monitor your spending in real time.
Monitor your resource plan balance: If you have purchased a resource plan, set a resource plan balance alert so you can top up the plan or adjust your call strategy promptly.
Configure business monitoring: See Alert notification settings to monitor for business anomalies and request fluctuations.
Request parameters
Name | Type | Required | Description | Example |
SceneId | Long | Yes | The ID of the verification scenario to use. This ID is automatically generated after you create a verification scenario in the console. For instructions on creating a scenario, see Add a verification scenario. | 100000**** |
OuterOrderNo | String | Yes | Your custom unique business identifier, used for troubleshooting later. Use up to 32 alphanumeric characters. Ensure it is unique. | e0c34a77f5ac40a5aa5e6ed20c35**** |
ProductCode | String | Yes | The verification solution to use. Valid values:
| ID_PRO |
Model | String | No | The type of liveness detection. The following values are supported: Note Only the following values are supported for the liveness detection type. Custom actions or combinations are not supported.
Note
| MOVE_ACTION |
CertType | String | Yes | This parameter specifies the user's identity document type. For supported document types, see solution overview. The value is IDENTITY_CARD for all document types. Note When ProductCode is ID_PLUS, CertType is optional. | IDENTITY_CARD |
CertName | String | Yes | The end user's real name. Note When ProductCode is ID_PLUS, CertName is optional. | ZhangXX |
CertNo | String | Yes | The certificate number of the end user. Note When ProductCode is ID_PLUS, CertNo is optional. | 330103************ |
MetaInfo | String | Yes | Environment parameters from MetaInfo, which you must obtain using the client SDK. For details, see App (SDK) integration. | Note This example is for reference only. Do not use it directly in your integration. Follow the SDK integration guide for accurate implementation. |
Mobile | String | No | The end user's mobile phone number. | 130******** |
Ip | String | No | The end user's IP address. | 114.100.XX.XX |
UserId | String | No | A custom user ID. The ID must be unique and can contain up to 100 characters. | 123456789 |
CallbackUrl | String | No | This parameter specifies the callback URL for verification results. The callback method defaults to GET, and the URL must start with Important
| https://www.aliyun.com |
CallbackToken | String | No | A security token you generate yourself to prevent replay attacks and tampering. If you set this value, the callback URL includes the CallbackToken field. | NMjvQanQgplBSaEI0sL86WnQplB |
AuthId | String | No | User authorization ID. Maximum length is 64 characters. | 92d46b9e9e2d703f2897f350d5bd4149 |
EncryptType | String | No | The encryption algorithm to use. Only the SM2 Chinese cryptographic algorithm is supported. After enabling encrypted transmission, pass the encrypted CertName and CertNo. For encryption instructions, see Parameter encryption. | SM2 |
SuitableType | String | No | This parameter configures the elderly-friendly mode for each verification request. You can set a different value for each request based on your app's business attributes, user demographics, and operational features. The default value is 0.
Note
| 0 |
RarelyCharacters | String | No | Enable rare character mode:
Note Rare character mode is only supported for ID Verification for Financial Services in app, PC, and H5 integration scenarios. Other solutions do not support it. | Y |
AppQualityCheck | String | No | Specifies whether to enable the strict face quality check in the SDK.
Note
| N |
needMultiFaceCheck | String | No | Specifies whether to block verification if the device detects multiple faces. Valid values:
| Y |
enableBeauty | String | No | Enable retouching during face verification.
Important
| N |
Response data
Name | Type | Description | Example |
RequestId | String | The request ID. | 130A2C10-B9EE-4D84-88E3-5384FF039795 |
Code | String | The return code. A value of 200 indicates that the request was successful. For detailed descriptions of different Code values, see Return codes and messages. | 200 |
Message | String | The response message, which provides a brief description of the Code (return code). | success |
ResultObject.CertifyId | String | The unique ID for ID Verification. Pass this parameter when the client calls the verify function to start verification. Important
| 91707dc296d469ad38e4c5efa6a0**** |
FAQ
Can the InitFaceVerify interface be called directly from the client?
The InitFaceVerify interface is for server-side use only and cannot be called directly from the client. In a standard flow, your business server calls the InitFaceVerify interface to obtain a CertifyId. The server then passes this CertifyId to the client software development kit (SDK) to start the authentication. This architecture ensures that your business flow is secure and controllable. It prevents the client from bypassing your server-side business logic to initiate a comparison.
Does the multi-action liveness detection mode require a separate purchase?
The multi-action liveness detection mode does not require a separate purchase. To enable this mode, set the `Model` parameter to the corresponding value, such as `MULTI_PHOTINUS`, when you call the InitFaceVerify interface. The billing for this mode is the same as for other liveness detection types. No extra fees are charged.
Does ID Verification for Financial Services require separate steps for two-factor authentication and facial recognition?
ID Verification for Financial Services uses a single interface, InitFaceVerify, to perform a three-factor authentication that combines name, ID card number, and facial recognition. Separate integration steps are not required. You can call the InitFaceVerify interface and pass the `CertName` (name), `CertNo` (ID card number), and `MetaInfo` (device information) parameters to complete the end-to-end validation.
Why do I get a match result when the uploaded photo does not match the ID card?
If you receive a match result even when the uploaded photo does not match the ID card information, you are likely using the wrong interface. The liveness detection interface, which has a `ProductCode` of `LR_FR`, only verifies that a real person is performing the operation. It does not compare the face with the ID card information. To verify that the face matches the ID card, use the ID Verification for Financial Services interface. Select the correct `ProductCode` based on your business scenario:
ID_PRO: For scenarios that require only liveness detection, the system automatically compares the captured face with the provided identity information.
ID_PLUS: Use this for scenarios that require capturing the ID card information. The user must take a photo of their ID card and complete the liveness detection.