Identity Information Verification
Update Time:2025.02.20This API allows merchants to upload the purchaser and payer identity information which will be re-verified by WeChat Pay, and the verification result will be returned for the merchants to correct any wrong information in the declared order
|
API intro
Request Url: https://apihk.mch.weixin.qq.com/global/v3/customs/verify-certificate
Request method: POST
Applicable object: Common mode
path parameter is a path parameter.
query parameter needs to be passed in the request URL.
body parameter needs to be passed in the request JSON.
Request Parameters
Name | Variable Name | Type | Required | Description |
---|---|---|---|---|
Institution APPID | appid | String(32) | Yes | body Specifies Official Account ID assigned by WeChat |
Merchant ID | mchid | String(32) | Yes | body Specifies Merchant ID assigned by WeChat Payment |
Merchant order No. | out_trade_no | String(32) | Yes | body internal order No. of the merchant system. Should be within 32 characters and can only contain numbers, uppercase and lowercase letters, and _-|*@. It is unique for a merchant ID. |
WeChat order No. | transaction_id | String(32) | Yes | body Order No. returned by WeChat Pay |
Customs | customs | String(32) | Yes | body Customs for declaration. For the enumerated values, refer to Parameter Specifications |
Merchant's customs registration No. | merchant_customs_no | String(32) | Yes | body Customs registration No. of the merchant |
Merchant sub-order No. | sub_order_no | String(32) | No | body Merchant sub-order No. It is required if there is a split order. |
ID type | certificate_type | String(16) | Yes | body Upload fixed value IDCARD. Currently only Mainland China ID cards are supported. |
ID No. | certificate_id | String | Yes | body Mainland China ID card number. If the last digit is letter X, capitalize the letter X. This field needs to be encrypted. |
Name on ID card | certificate_name | String | Yes | body Name on ID card, which needs to be encrypted. |
Example:
To encrypt fields, refer to the following encryption algorithm:
1、Obtain the WeChat Pay Platform certificate and corresponding platform certificate serial number. The serial number is required to be passed for "Wechatpay-Serial" of the HTTP header of this API request.
2、Perform the RSA encryption for the parameter values with the public key of the WeChat Pay Platform certificate. Use `RSAES-PKCS1-v1_5` as the filling scheme.
3、The encrypted ciphertext that is encoded with base64 is used as the value of the appropriate parameter in the request.
Return Data
Normal return
Name | Variable Name | Type | Required | Description |
---|---|---|---|---|
Institution APPID | appid | string(32) | Yes | Official Account ID assigned by WeChat |
Merchant ID | mchid | string(32) | Yes | Merchant ID assigned by WeChat Pay |
Merchant order No. | out_trade_no | string(32) | Yes | internal order No. of the merchant system. Should be within 32 characters and can only contain numbers, uppercase and lowercase letters, and _-|*@. It is unique for a merchant ID. |
WeChat order No. | transaction_id | string(32) | Yes | Order No. returned by WeChat Pay |
Identity verification result | Verify_department_trade_id | string(32) | Yes | Verification result of the purchaser and payer identity information |
Abnormal return
Name | Variable Name | Type | Required | Description | |||
---|---|---|---|---|---|---|---|
Return Status Code | return_code | String(32) | Yes | Error code. See the error code list for the enumerated values. | |||
Returned message | message | String(256) | Yes | Returned message. If not empty, it presents the cause of the error. | |||
Detailed error description | detail | Object | No | It is returned when code is PARAM_ERROR. Details will be described below | |||
|
Example:
Error Codes
Error Codes | Description | Solution |
---|---|---|
INVALID_REQUEST | Payer's ID No. registered in WeChat is invalid. Please make a check. | There is a problem with the payer's identity information registered in WeChat. Contact WeChat Pay Assistant to find out the reason. |
Customs declaration record does not exist. | The customs declaration record does not exist. Please apply again or contact WeChat Pay Assistant to find out the reason. | |
Customs information is not configured. | The customs declaration API is only accessible after the customs information has been configured for the merchant. Please configure the customs information by referring to the customs registration guidelines above. | |
NOAUTH | The merchant has not registered with the current customs. | The merchant has not registered with the current customs. Try again after the registration is completed. |
Self-Clearance is not enabled. error | Check whether the Self-Clearance tool has been enabled for the merchant ("WeChat Pay Merchants Platform" > "Product Center" > "Apply for Self-Clearance"). | |
PARAM_ERROR | Parameter error | Invalid parameter. The parameter may be incorrect or is missing. Check whether the API parameters have been summited as required. |
Merchant entered invalid user ID No. | Enter the correct ID No. If you still get an error, contact WeChat Pay Assistant to find out the reason. | |
SYSTEMERROR | System error | Declare again, or contact WeChat Pay Assistant to find out the reason. |
USER_ACCOUNT_ABNORMAL | The identity information on the payment order for declaration does not match the payer's registered identity information. Customs declaration is not allowed. | The identity information on the payment order for declaration does not match the payer's registered identity information. Enter the actual payer's identity information and declare again. |