Querying Signing Status(By contract_id)
Update Time:2025.01.07The signing relationship query interface provides the single transaction signing relationship query
1. API Intro
Applicable object: Common mode Institutional mode
Request Url: https://apihk.mch.weixin.qq.com/v3/global/papay/contracts/{contract_id}
Request method: GET
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.
2. Request Parameters
Name | Variable Name | Type | Required | Description |
---|---|---|---|---|
App ID | appid | string[1,32] | Yes | Query Appid bound to the merchant ID |
Sub-merchant ID | sub_mchid | string[1,32] | Yes | Query Sub-merchant ID allocated by WeChat Pay |
App ID of the service provider | sp_appid | string[1,32] | Yes | Query Appid bound to the service provider |
App ID of the sub-merchant | sub_appid | string[1,32] | No | Query Appid bound to the sub-merchant ID for initiating signing |
Auto-debit contract ID | contract_id | string[1,64] | Yes | Path Auto-debit contract ID returned by WeChat after successful Auto-debit signing; this parameter is required when contract_id is selected to perform query |
Example:
Scenario 1:Common mode
Scenario 2:Service Provide Mode/Institution Mode
3. Response Parameters
Name | Variable Name | Type | Required | Description |
---|---|---|---|---|
Merchant ID | mchid | string[1,32] | Yes | Merchant ID allocated by WeChat Pay |
App ID | appid | string[1,32] | Yes | Appid bound to the merchant ID |
Merchant ID of the service provider | sp_mchid | string[1,32] | Yes | The institution's merchant ID allocated by WeChat Pay |
Sub-merchant ID | sub_mchid | string[1,32] | Yes | Sub-merchant ID allocated by WeChat Pay |
App ID of the service provider | sp_appid | string[1,32] | Yes | Appid bound to the service provider’s Official Account |
App ID of the sub-merchant | sub_appid | string[1,32] | No | Mini program appid of the sub-merchant who initiates the signing |
Auto-debit contract ID | contract_id | string[1,32] | Yes | Auto-debit contract ID returned by WeChat after successful signing |
Template ID | plan_id | Int | Yes | When a merchant applies for deduction permission to WeChat Pay, WeChat Pay will allocate a unique deduction template ID to the merchant |
Signed contract No. | out_contract_code | string[1,32] | Yes | Signed contract No. passed in when the merchant requests signing, which must be unique at the merchant side |
Displayed user account name | user_display_name | string[1,32] | Yes | The name of the signing user, displayed on the page |
Agreement state | state | string[1,32] | Yes | NOTSIGN: Not signed |
Signing time of the contract | signed_time | string[1,32] | Yes | Signing time of the contract |
Terminating time of the contract | terminated_time | string[1,32] | No | When state is TERMINATED, the value indicates the terminating time of the contract |
Termination mode of the contract | termination_mode | int | No | When state is TERMINATED, the value indicates the termination mode of the contract |
Termination note | termination_note | string | No | When state is TERMINATED, the value indicates the termination note |
User ID under the merchant’s appid | openid | string[1,128] | Yes | Openid of the user under the merchant’s appid |
Example:
Scenario 1:Common mode
Scenario 2:Service Provide Mode/Institution Mode
4. Error Codes
Error Codes | Error Message | Description | Solution |
---|---|---|---|
403 | CONTRACT_NOT_EXIST | The contract cannot be found | Please check whether the request contract is correct or whether it is terminated. |
400 | PARAM_ERROR | Parameter error | Please check the request parameter format. |
500 | SYSTEMERROR | System error | Please try the request again |