Applying for Termination

Update Time:2025.01.07

When 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.

Tips:

  • When the merchant applies for the deduction permission to obtain a template ID, it needs to provide Termination Callback Address for WeChat Pay to complete configuration. When the termination relationship occurs, the WeChat server will send the termination information to this address, that is, the content of termination notification is consistent with that of the notification after signing.


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
Note: Only for Common mode
Example: wxcbda96de0b165486

Sub-merchant ID

sub_mchid

string[1,32]

Yes

Body Sub-merchant ID allocated by WeChat Pay
Note: Only for Institutional mode
Example: 10000097

App ID of the service provider

sp_appid

string[1,32]

Yes

Body Appid bound to the service provider
Note: Only for Institutional mode
Example: wxcbda96de0b165486

App ID of the sub-merchant

sub_appid

string[1,32]

No

Body Appid bound to the sub-merchant ID for initiating signing
Note: Only for Institutional mode
Example: wxcbda96de0b165484

Auto-debit contract ID

contract_id

string[1,64]

Yes

Path Auto-debit contract ID returned by WeChat after successful signing
Example: 100005698

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: Cause of termination

Example:

Scenario 1:Common mode

1POST
2https://apihk.mch.weixin.qq.com/v3/global/papay/contracts/100005698/terminate
3{
4"appid": "wxcbda96de0b165486", 
5"termination_note": "Cause of termination" 
6}    

Scenario 2:Service Provide Mode/Institution Mode

1POST
2https://apihk.mch.weixin.qq.com/v3/global/papay/contracts/100005698/terminate
3{
4"sp_appid": "wxcbda96de0b165486",
5"sub_mchid": "10000097",
6"sub_appid": "wxcbda96de0b165484", 
7"termination_note": "Cause of termination" 
8}  

 

3. Response Parameters

1No data (the HTTP status code is 204).			 


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

 

 

About  WeChat  Pay

Powered By Tencent & Tenpay Copyright©

2005-2025 Tenpay All Rights Reserved.

Contact Us
Wechat Pay Global

WeChat Pay Global

Contact Us

Customer Service Tel

+86 571 95017

9:00-18:00 Monday-Friday GMT+8

Business Development

wxpayglobal@tencent.com

Developer Support

wepayTS@tencent.com

Wechat Pay Global

About Tenpay
Powered By Tencent & Tenpay Copyright© 2005-2025 Tenpay All Rights Reserved.