Skip to content

保险商户受理续期自动续费协议

商户可通过本接口续期保险自动续费协议。前置条件:用户签约成功,当协议到期后且预签约中参数是否自动续保(can_auto_insure)或是否自动重新投保(can_auto_reinsure)为true。

请求参数类型描述
plan_idnumber委托代扣模板ID
contract_idstring委托代扣协议ID
jsonobject声明请求的JSON数据结构
appidstring应用ID
policy_periodsobject[]续期的扣费周期列表
policy_period_idnumber保险扣费周期编号
estimated_deduct_datestring预计扣费的日期
estimated_deduct_amountobject预计扣费金额
totalnumber金额
currencystring货币类型
php
$instance->v3->papay->insuranceSign->contracts->planId->_plan_id_->contractId->_contract_id_->renew->postAsync([
  'plan_id' => '',
  'contract_id' => '',
  'json' => [
    'appid' => 'wxd678efh567hg6787',
    'policy_periods' => [[
      'policy_period_id' => 1,
      'estimated_deduct_date' => '2019-11-22',
      'estimated_deduct_amount' => [
        'total' => 1,
        'currency' => 'CNY',
      ],
    ],],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance->chain('v3/papay/insurance-sign/contracts/plan-id/{plan_id}/contract-id/{contract_id}/renew')->postAsync([
  'plan_id' => '',
  'contract_id' => '',
  'json' => [
    'appid' => 'wxd678efh567hg6787',
    'policy_periods' => [[
      'policy_period_id' => 1,
      'estimated_deduct_date' => '2019-11-22',
      'estimated_deduct_amount' => [
        'total' => 1,
        'currency' => 'CNY',
      ],
    ],],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance['v3/papay/insurance-sign/contracts/plan-id/{plan_id}/contract-id/{contract_id}/renew']->postAsync([
  'plan_id' => '',
  'contract_id' => '',
  'json' => [
    'appid' => 'wxd678efh567hg6787',
    'policy_periods' => [[
      'policy_period_id' => 1,
      'estimated_deduct_date' => '2019-11-22',
      'estimated_deduct_amount' => [
        'total' => 1,
        'currency' => 'CNY',
      ],
    ],],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$response = $instance->v3->papay->insuranceSign->contracts->planId->_plan_id_->contractId->_contract_id_->renew->post([
  'plan_id' => '',
  'contract_id' => '',
  'json' => [
    'appid' => 'wxd678efh567hg6787',
    'policy_periods' => [[
      'policy_period_id' => 1,
      'estimated_deduct_date' => '2019-11-22',
      'estimated_deduct_amount' => [
        'total' => 1,
        'currency' => 'CNY',
      ],
    ],],
  ],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance->chain('v3/papay/insurance-sign/contracts/plan-id/{plan_id}/contract-id/{contract_id}/renew')->post([
  'plan_id' => '',
  'contract_id' => '',
  'json' => [
    'appid' => 'wxd678efh567hg6787',
    'policy_periods' => [[
      'policy_period_id' => 1,
      'estimated_deduct_date' => '2019-11-22',
      'estimated_deduct_amount' => [
        'total' => 1,
        'currency' => 'CNY',
      ],
    ],],
  ],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance['v3/papay/insurance-sign/contracts/plan-id/{plan_id}/contract-id/{contract_id}/renew']->post([
  'plan_id' => '',
  'contract_id' => '',
  'json' => [
    'appid' => 'wxd678efh567hg6787',
    'policy_periods' => [[
      'policy_period_id' => 1,
      'estimated_deduct_date' => '2019-11-22',
      'estimated_deduct_amount' => [
        'total' => 1,
        'currency' => 'CNY',
      ],
    ],],
  ],
]);
print_r($response->getStatusCode() === 204);
返回字典类型描述
空字符串(无返回内容)

参阅 官方文档

Published on the GitHub by TheNorthMemory