Skip to content

通过商户协议号解除委托代扣签约协议

商户可通过本接口解约委托代扣签约协议。前置条件 对应的委托代扣签约协议是已生效状态的委托代扣签约协议。

请求参数类型描述
plan_idnumber委托代扣模板ID
out_contract_codestring商户签约协议号
jsonobject声明请求的JSON数据结构
sub_mchidstring子商户号商户号
contract_termination_remarkstring解约备注
php
$instance->v3->papay->sign->partner->contracts->planId->_plan_id_->outContractCode->_out_contract_code_->terminate->postAsync([
  'plan_id' => '12535',
  'out_contract_code' => 'wxwtdk20200910100000',
  'json' => [
    'sub_mchid' => '1900000109',
    'contract_termination_remark' => '用户解约',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/papay/sign/partner/contracts/plan-id/{plan_id}/out-contract-code/{out_contract_code}/terminate')->postAsync([
  'plan_id' => '12535',
  'out_contract_code' => 'wxwtdk20200910100000',
  'json' => [
    'sub_mchid' => '1900000109',
    'contract_termination_remark' => '用户解约',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/papay/sign/partner/contracts/plan-id/{plan_id}/out-contract-code/{out_contract_code}/terminate']->postAsync([
  'plan_id' => '12535',
  'out_contract_code' => 'wxwtdk20200910100000',
  'json' => [
    'sub_mchid' => '1900000109',
    'contract_termination_remark' => '用户解约',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->papay->sign->partner->contracts->planId->_plan_id_->outContractCode->_out_contract_code_->terminate->post([
  'plan_id' => '12535',
  'out_contract_code' => 'wxwtdk20200910100000',
  'json' => [
    'sub_mchid' => '1900000109',
    'contract_termination_remark' => '用户解约',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/papay/sign/partner/contracts/plan-id/{plan_id}/out-contract-code/{out_contract_code}/terminate')->post([
  'plan_id' => '12535',
  'out_contract_code' => 'wxwtdk20200910100000',
  'json' => [
    'sub_mchid' => '1900000109',
    'contract_termination_remark' => '用户解约',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/papay/sign/partner/contracts/plan-id/{plan_id}/out-contract-code/{out_contract_code}/terminate']->post([
  'plan_id' => '12535',
  'out_contract_code' => 'wxwtdk20200910100000',
  'json' => [
    'sub_mchid' => '1900000109',
    'contract_termination_remark' => '用户解约',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
contract_idstring委托代扣协议ID
sp_mchidstring普通服务商商户号
sp_appidstring普通服务商的AppID
sub_mchidstring子商户号
sub_appidstring子商户的AppID
plan_idnumber委托代扣模板ID
out_contract_codestring商户签约协议号
contract_display_accountstring用户账户展示名称
contract_statestring委托代扣协议状态
contract_signed_timestring协议签署时间
contract_expired_timestring协议到期时间
sp_openidstring用户OpenID
sub_openidstring子商户AppID对应的用户OpenID
contract_terminate_infoobject协议解约信息
contract_termination_modestring协议解约方式
contract_terminated_timestring协议解约时间
contract_termination_remarkstring解约备注
out_user_codestring商户侧用户标识
deduct_scheduleobject预约扣费场景的预约信息
estimated_deduct_datestring预计扣费的日期
estimated_deduct_amountobject预计的扣费金额
totalnumber金额
currencystring货币类型
schedule_statestring扣费预约状态
scheduled_amountobject已预约的扣费金额信息
totalnumber金额
currencystring货币类型
deduct_amountobject实际扣费金额
totalnumber金额
currencystring货币类型
deduct_datestring实际扣费的日期

参阅 官方文档

Published on the GitHub by TheNorthMemory