提交保单授权信息
保险代扣预签约时,商户通过此接口预先请求用户授权,在签约完成后微信支付将授权信息转为待授权,用户在微信支付客户端内完成授权操作后,以允许微信支付平台获取并展示该笔保单的详细信息 。
| 请求参数 | 类型 | 描述 |
|---|---|---|
| json | object | 声明请求的JSON数据结构 |
| out_insurance_no | string | 商户保险编号 |
| appid | string | 商户APPID |
| plan_id | string | 保险代扣模板ID |
| out_contract_code | string | 商户签约协议号 |
| insurance_name | string | 保险名称 |
php
$instance->v3->inspolicymgr->deduct->authorizations->postAsync([
'json' => [
'out_insurance_no' => 'Auisihsiahishishi4hihsid123418id',
'appid' => 'wxd678efh567hg6787',
'plan_id' => '12535',
'out_contract_code' => 'wxwtdk20200910100000',
'insurance_name' => '微医保·百万医疗险',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
php
$instance->chain('v3/inspolicymgr/deduct/authorizations')->postAsync([
'json' => [
'out_insurance_no' => 'Auisihsiahishishi4hihsid123418id',
'appid' => 'wxd678efh567hg6787',
'plan_id' => '12535',
'out_contract_code' => 'wxwtdk20200910100000',
'insurance_name' => '微医保·百万医疗险',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
php
$instance['v3/inspolicymgr/deduct/authorizations']->postAsync([
'json' => [
'out_insurance_no' => 'Auisihsiahishishi4hihsid123418id',
'appid' => 'wxd678efh567hg6787',
'plan_id' => '12535',
'out_contract_code' => 'wxwtdk20200910100000',
'insurance_name' => '微医保·百万医疗险',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
php
$response = $instance->v3->inspolicymgr->deduct->authorizations->post([
'json' => [
'out_insurance_no' => 'Auisihsiahishishi4hihsid123418id',
'appid' => 'wxd678efh567hg6787',
'plan_id' => '12535',
'out_contract_code' => 'wxwtdk20200910100000',
'insurance_name' => '微医保·百万医疗险',
],
]);
print_r(json_decode((string) $response->getBody(), true));1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
php
$response = $instance->chain('v3/inspolicymgr/deduct/authorizations')->post([
'json' => [
'out_insurance_no' => 'Auisihsiahishishi4hihsid123418id',
'appid' => 'wxd678efh567hg6787',
'plan_id' => '12535',
'out_contract_code' => 'wxwtdk20200910100000',
'insurance_name' => '微医保·百万医疗险',
],
]);
print_r(json_decode((string) $response->getBody(), true));1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
php
$response = $instance['v3/inspolicymgr/deduct/authorizations']->post([
'json' => [
'out_insurance_no' => 'Auisihsiahishishi4hihsid123418id',
'appid' => 'wxd678efh567hg6787',
'plan_id' => '12535',
'out_contract_code' => 'wxwtdk20200910100000',
'insurance_name' => '微医保·百万医疗险',
],
]);
print_r(json_decode((string) $response->getBody(), true));1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
| 返回字典 | 类型 | 描述 |
|---|---|---|
| out_insurance_no | string | 商户保险编号 |
| appid | string | 商户APPID |
| plan_id | string | 保险代扣模板ID |
| out_contract_code | string | 商户签约协议号 |
| insurance_name | string | 保险名称 |
| auth_state | string | 授权状态AUTH_STATE_INIT | AUTH_STATE_PENDING | AUTH_STATE_GRANTED | AUTH_STATE_DENIED | AUTH_STATE_EXPIRED 枚举值之一 |
| user_auth_time | string | 用户授权时间 |
参阅 官方文档