Login expired. Please log in again.

Feedback

0/300

Feedback

Submitted successfully

ok

Feedback

Network exception, please try again later

ok

Applying for Termination API

Latest update time:2023.10.20 Release notes

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


Pathparameter is a path parameter.
Queryparameter needs to be passed in the request URL.
Bodyparameter 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 forCommon mode
Example: wxcbda96de0b165486
Sub-merchant ID sub_mchid string[1,32] Yes Body Sub-merchant ID allocated by WeChat Pay
Note: Only forInstitutional mode
Example: 10000097
App ID of the service provider sp_appid string[1,32] Yes Body Appid bound to the service provider
Note: Only forInstitutional 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 forInstitutional 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:


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

POST
https://apihk.mch.weixin.qq.com/v3/global/papay/contracts/100005698/terminate
{
"sp_appid": "wxcbda96de0b165486",
"sub_mchid": "10000097",
"sub_appid": "wxcbda96de0b165484", 
"termination_note": "Cause of termination" 
}
  

3. Response Parameters


            No 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


    Page navigation

Release notes

close
V1.0
2021.08.18
Applying for Termination API released online

About  WeChat  Pay

Powered By Tencent & Tenpay Copyright©

2005-2024 Tenpay All Rights Reserved.

Contact Us
Wechat Pay Global

WeChat Pay Global

置顶