申请解约
商户与用户的签约关系有误或者商户主动要求与用户之前的签约协议时可调用此接口完成解约。
请求参数 | 类型 | 描述 |
---|---|---|
base_uri | string | 声明接入点https://apihk.mch.weixin.qq.com/ (香港接入) |
contract_id | string | 委托代扣协议ID |
json | object | 声明请求的JSON 数据结构 |
appid | string | 机构APPID |
sp_appid | string | 机构appid |
sub_mchid | string | 子商户号 |
sub_appid | string | 子商户应用ID |
termination_note | string | 解约备注 |
php
$instance->v3->global->papay->contracts->_contract_id_->terminate->postAsync([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'contract_id' => '100005698',
'json' => [
'appid' => 'wxd678efh567hg6787',
'sp_appid' => 'wx8888888888888888',
'sub_mchid' => '1230000109',
'sub_appid' => 'wxcbda96de0b165484',
'termination_note' => '解约原因',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance->chain('v3/global/papay/contracts/{contract_id}/terminate')->postAsync([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'contract_id' => '100005698',
'json' => [
'appid' => 'wxd678efh567hg6787',
'sp_appid' => 'wx8888888888888888',
'sub_mchid' => '1230000109',
'sub_appid' => 'wxcbda96de0b165484',
'termination_note' => '解约原因',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance['v3/global/papay/contracts/{contract_id}/terminate']->postAsync([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'contract_id' => '100005698',
'json' => [
'appid' => 'wxd678efh567hg6787',
'sp_appid' => 'wx8888888888888888',
'sub_mchid' => '1230000109',
'sub_appid' => 'wxcbda96de0b165484',
'termination_note' => '解约原因',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r($response->getStatusCode() === 204);
})
->wait();
php
$response = $instance->v3->global->papay->contracts->_contract_id_->terminate->post([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'contract_id' => '100005698',
'json' => [
'appid' => 'wxd678efh567hg6787',
'sp_appid' => 'wx8888888888888888',
'sub_mchid' => '1230000109',
'sub_appid' => 'wxcbda96de0b165484',
'termination_note' => '解约原因',
],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance->chain('v3/global/papay/contracts/{contract_id}/terminate')->post([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'contract_id' => '100005698',
'json' => [
'appid' => 'wxd678efh567hg6787',
'sp_appid' => 'wx8888888888888888',
'sub_mchid' => '1230000109',
'sub_appid' => 'wxcbda96de0b165484',
'termination_note' => '解约原因',
],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance['v3/global/papay/contracts/{contract_id}/terminate']->post([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'contract_id' => '100005698',
'json' => [
'appid' => 'wxd678efh567hg6787',
'sp_appid' => 'wx8888888888888888',
'sub_mchid' => '1230000109',
'sub_appid' => 'wxcbda96de0b165484',
'termination_note' => '解约原因',
],
]);
print_r($response->getStatusCode() === 204);
返回字典 | 类型 | 描述 |
---|---|---|
空字符串(无返回内容) |
参阅 官方文档