Skip to content

申请解约

商户与用户的签约关系有误或者商户主动要求与用户之前的签约协议时可调用此接口完成解约。

请求参数类型描述
base_uristring声明接入点https://apihk.mch.weixin.qq.com/(香港接入)
contract_idstring委托代扣协议ID
jsonobject声明请求的JSON数据结构
appidstring机构APPID
sp_appidstring机构appid
sub_mchidstring子商户号
sub_appidstring子商户应用ID
termination_notestring解约备注
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);
返回字典类型描述
空字符串(无返回内容)

参阅 官方文档

Published on the GitHub by TheNorthMemory