Applying for Termination
Update Time:2025.01.07When the signing relationship between the merchant and the user is wrong or the merchant actively requests terminating the contract previously signed with the user, this interface can be called to terminate the contract. At present, the Auto-debit contract ID can be used to complete the termination at the merchant side. Moreover, the user can initiate termination through a WeChat client. The termination result will be sent to the merchant side based on Termination Callback Address.
|
1. API Intro
Applicable object: Common mode Institutional mode
Request Url: https://apihk.mch.weixin.qq.com/v3/global/papay/contracts/{contract_id}/terminate
Request method: POST
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 | Body Appid bound to the merchant ID |
Sub-merchant ID | sub_mchid | string[1,32] | Yes | Body Sub-merchant ID allocated by WeChat Pay |
App ID of the service provider | sp_appid | string[1,32] | Yes | Body Appid bound to the service provider |
App ID of the sub-merchant | sub_appid | string[1,32] | No | Body 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 signing |
Termination note | termination_note | string[1,256] | Yes | Body Note about the cause of termination, e.g., if the signing information is in error, a new contract must be signed |
Example:
Scenario 1:Common mode
Scenario 2:Service Provide Mode/Institution Mode
3. Response Parameters
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 |