Skip to content

上传保单

在用户完成授权后(商户可通过授权完成回调通知或主动调用查询授权信息接口确认授权状态),商户通过此接口将保单的详细信息同步至微信支付平台。

请求参数类型描述
jsonobject声明请求的JSON数据结构
out_insurance_nostring商户保险编号
insured_name_liststring[]被保险人姓名列表
insurance_company_codestring承保公司代码
effective_timestring保单生效时间
expired_timestring保单失效时间
coverage_detailstring保障详情
support_renewalboolean是否支持续保
start_renewal_timestring可续保开始时间
end_renewal_timestring可续保结束时间
policy_typestring保单类型
POLICY_TYPE_OTHER | POLICY_TYPE_MEDICAL | POLICY_TYPE_ACCIDENT | POLICY_TYPE_CRITICAL | POLICY_TYPE_CAR | POLICY_TYPE_LIFE | POLICY_TYPE_PROPERTY | POLICY_TYPE_PET | POLICY_TYPE_ANNUITY 枚举值之一
car_numberstring车牌信息
pet_namestring宠物名称
addressstring地址信息
policy_statestring保单状态
POLICY_STATE_ISSUING | POLICY_STATE_APPROVED | POLICY_STATE_DECLINED | POLICY_STATE_INACTIVE 枚举值之一
policy_codestring保司保单号
plan_idnumber委托代扣模板ID
out_contract_codestring商户签约协议号
policy_periodsnumber[]保单的扣费周期列表
appidstring商户APPID
openidstring用户在商户公众号内的身份标识
headersobject声明请求的头参数
Wechatpay-Serialstring微信支付公钥ID/平台证书序列号
php
$instance->v3->inspolicymgr->deduct->policies->postAsync([
  'json' => [
    'out_insurance_no'       => 'Auisihsiahishishi4hihsid123418id',
    'insured_name_list'      => ['tCk1JSUV2QUlCQURBTkJna3Foa2lHOXc'],
    'insurance_company_code' => '1001',
    'effective_time'         => '2025-09-21T17:11:12+08:00',
    'expired_time'           => '2025-09-21T17:11:12+08:00',
    'coverage_detail'        => '可保190种疾病,确诊一次性赔付',
    'support_renewal'        => true,
    'start_renewal_time'     => '2025-09-21T17:11:12+08:00',
    'end_renewal_time'       => '2025-09-21T17:11:12+08:00',
    'policy_type'            => 'POLICY_TYPE_OTHER',
    'car_number'             => '粤B·AB123',
    'pet_name'               => '小狗',
    'address'                => '上海市浦东新区晨晖路1001号',
    'policy_state'           => 'POLICY_STATE_ISSUING',
    'policy_code'            => 'Coisihsiaxishishi4hihsid1ii411co',
    'plan_id'                => 12535,
    'out_contract_code'      => 'wxwtdk20200910100000',
    'policy_periods'         => [1],
    'appid'                  => 'wxd678efh567hg6787',
    'openid'                 => 'oYobu0MVnQfWpSMOYJz2AHPG_gQw',
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/inspolicymgr/deduct/policies')->postAsync([
  'json' => [
    'out_insurance_no'       => 'Auisihsiahishishi4hihsid123418id',
    'insured_name_list'      => ['tCk1JSUV2QUlCQURBTkJna3Foa2lHOXc'],
    'insurance_company_code' => '1001',
    'effective_time'         => '2025-09-21T17:11:12+08:00',
    'expired_time'           => '2025-09-21T17:11:12+08:00',
    'coverage_detail'        => '可保190种疾病,确诊一次性赔付',
    'support_renewal'        => true,
    'start_renewal_time'     => '2025-09-21T17:11:12+08:00',
    'end_renewal_time'       => '2025-09-21T17:11:12+08:00',
    'policy_type'            => 'POLICY_TYPE_OTHER',
    'car_number'             => '粤B·AB123',
    'pet_name'               => '小狗',
    'address'                => '上海市浦东新区晨晖路1001号',
    'policy_state'           => 'POLICY_STATE_ISSUING',
    'policy_code'            => 'Coisihsiaxishishi4hihsid1ii411co',
    'plan_id'                => 12535,
    'out_contract_code'      => 'wxwtdk20200910100000',
    'policy_periods'         => [1],
    'appid'                  => 'wxd678efh567hg6787',
    'openid'                 => 'oYobu0MVnQfWpSMOYJz2AHPG_gQw',
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/inspolicymgr/deduct/policies']->postAsync([
  'json' => [
    'out_insurance_no'       => 'Auisihsiahishishi4hihsid123418id',
    'insured_name_list'      => ['tCk1JSUV2QUlCQURBTkJna3Foa2lHOXc'],
    'insurance_company_code' => '1001',
    'effective_time'         => '2025-09-21T17:11:12+08:00',
    'expired_time'           => '2025-09-21T17:11:12+08:00',
    'coverage_detail'        => '可保190种疾病,确诊一次性赔付',
    'support_renewal'        => true,
    'start_renewal_time'     => '2025-09-21T17:11:12+08:00',
    'end_renewal_time'       => '2025-09-21T17:11:12+08:00',
    'policy_type'            => 'POLICY_TYPE_OTHER',
    'car_number'             => '粤B·AB123',
    'pet_name'               => '小狗',
    'address'                => '上海市浦东新区晨晖路1001号',
    'policy_state'           => 'POLICY_STATE_ISSUING',
    'policy_code'            => 'Coisihsiaxishishi4hihsid1ii411co',
    'plan_id'                => 12535,
    'out_contract_code'      => 'wxwtdk20200910100000',
    'policy_periods'         => [1],
    'appid'                  => 'wxd678efh567hg6787',
    'openid'                 => 'oYobu0MVnQfWpSMOYJz2AHPG_gQw',
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->inspolicymgr->deduct->policies->post([
  'json' => [
    'out_insurance_no'       => 'Auisihsiahishishi4hihsid123418id',
    'insured_name_list'      => ['tCk1JSUV2QUlCQURBTkJna3Foa2lHOXc'],
    'insurance_company_code' => '1001',
    'effective_time'         => '2025-09-21T17:11:12+08:00',
    'expired_time'           => '2025-09-21T17:11:12+08:00',
    'coverage_detail'        => '可保190种疾病,确诊一次性赔付',
    'support_renewal'        => true,
    'start_renewal_time'     => '2025-09-21T17:11:12+08:00',
    'end_renewal_time'       => '2025-09-21T17:11:12+08:00',
    'policy_type'            => 'POLICY_TYPE_OTHER',
    'car_number'             => '粤B·AB123',
    'pet_name'               => '小狗',
    'address'                => '上海市浦东新区晨晖路1001号',
    'policy_state'           => 'POLICY_STATE_ISSUING',
    'policy_code'            => 'Coisihsiaxishishi4hihsid1ii411co',
    'plan_id'                => 12535,
    'out_contract_code'      => 'wxwtdk20200910100000',
    'policy_periods'         => [1],
    'appid'                  => 'wxd678efh567hg6787',
    'openid'                 => 'oYobu0MVnQfWpSMOYJz2AHPG_gQw',
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/inspolicymgr/deduct/policies')->post([
  'json' => [
    'out_insurance_no'       => 'Auisihsiahishishi4hihsid123418id',
    'insured_name_list'      => ['tCk1JSUV2QUlCQURBTkJna3Foa2lHOXc'],
    'insurance_company_code' => '1001',
    'effective_time'         => '2025-09-21T17:11:12+08:00',
    'expired_time'           => '2025-09-21T17:11:12+08:00',
    'coverage_detail'        => '可保190种疾病,确诊一次性赔付',
    'support_renewal'        => true,
    'start_renewal_time'     => '2025-09-21T17:11:12+08:00',
    'end_renewal_time'       => '2025-09-21T17:11:12+08:00',
    'policy_type'            => 'POLICY_TYPE_OTHER',
    'car_number'             => '粤B·AB123',
    'pet_name'               => '小狗',
    'address'                => '上海市浦东新区晨晖路1001号',
    'policy_state'           => 'POLICY_STATE_ISSUING',
    'policy_code'            => 'Coisihsiaxishishi4hihsid1ii411co',
    'plan_id'                => 12535,
    'out_contract_code'      => 'wxwtdk20200910100000',
    'policy_periods'         => [1],
    'appid'                  => 'wxd678efh567hg6787',
    'openid'                 => 'oYobu0MVnQfWpSMOYJz2AHPG_gQw',
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/inspolicymgr/deduct/policies']->post([
  'json' => [
    'out_insurance_no'       => 'Auisihsiahishishi4hihsid123418id',
    'insured_name_list'      => ['tCk1JSUV2QUlCQURBTkJna3Foa2lHOXc'],
    'insurance_company_code' => '1001',
    'effective_time'         => '2025-09-21T17:11:12+08:00',
    'expired_time'           => '2025-09-21T17:11:12+08:00',
    'coverage_detail'        => '可保190种疾病,确诊一次性赔付',
    'support_renewal'        => true,
    'start_renewal_time'     => '2025-09-21T17:11:12+08:00',
    'end_renewal_time'       => '2025-09-21T17:11:12+08:00',
    'policy_type'            => 'POLICY_TYPE_OTHER',
    'car_number'             => '粤B·AB123',
    'pet_name'               => '小狗',
    'address'                => '上海市浦东新区晨晖路1001号',
    'policy_state'           => 'POLICY_STATE_ISSUING',
    'policy_code'            => 'Coisihsiaxishishi4hihsid1ii411co',
    'plan_id'                => 12535,
    'out_contract_code'      => 'wxwtdk20200910100000',
    'policy_periods'         => [1],
    'appid'                  => 'wxd678efh567hg6787',
    'openid'                 => 'oYobu0MVnQfWpSMOYJz2AHPG_gQw',
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
out_insurance_nostring商户保险编号
insurance_namestring保险名称
insured_name_liststring[]被保险人姓名列表
insurance_company_codestring承保公司代码
effective_timestring保单生效时间
expired_timestring保单失效时间
coverage_detailstring保障详情
support_renewalboolean是否支持续保
start_renewal_timestring可续保开始时间
end_renewal_timestring可续保结束时间
policy_typestring保单类型
POLICY_TYPE_OTHER | POLICY_TYPE_MEDICAL | POLICY_TYPE_ACCIDENT | POLICY_TYPE_CRITICAL | POLICY_TYPE_CAR | POLICY_TYPE_LIFE | POLICY_TYPE_PROPERTY | POLICY_TYPE_PET | POLICY_TYPE_ANNUITY 枚举值之一
car_numberstring车牌信息
pet_namestring宠物名称
addressstring地址信息
policy_statestring保单状态
POLICY_STATE_ISSUING | POLICY_STATE_APPROVED | POLICY_STATE_DECLINED | POLICY_STATE_INACTIVE 枚举值之一
policy_codestring保司保单号
plan_idnumber委托代扣模板ID
out_contract_codestring商户签约协议号
policy_periodsnumber[]保单的扣费周期列表

参阅 官方文档

Published on the GitHub by TheNorthMemory