请求保险理赔预下单
商户可调用该接口进行赔付预下单,并锁定商户资金。若赔付订单状态已经为终态(成功或关闭),接口将返回错误码。在预下单成功后,商户需携带接口返回的跳转参数,引导用户至微信内进行确认,用户确认后执行赔付。若预下单后超过24小时没有赔付成功,系统将自动关闭订单。订单赔付成功或者关闭时,系统将通过接口指定的商户回调地址通知赔付结果。
请求参数 | 类型 | 描述 |
---|---|---|
json | object | 声明请求的JSON 数据结构 |
sub_mchid | string | 二级商户号 |
receiver | object | 收款方信息 |
type | string | 转账接收方类型MERCHANT | TRANSACTION_USER 枚举值之一 |
transaction_info | object | 转账接收方订单信息 |
transaction_id | string | 交易订单号 |
out_bill_no | string | 商户单号 |
amount | number | 赔付金额 |
transfer_remark | string | 赔付原因 |
notify_url | string | 商户回调地址 |
php
$instance->v3->platsolution->ecommerce->mchTransfer->insuranceClaimBills->preTransfer->postAsync([
'json' => [
'sub_mchid' => '1900001109',
'receiver' => [
'type' => 'MERCHANT',
'transaction_info' => [
'transaction_id' => '1217752501201407033233368018',
],
],
'out_bill_no' => 'plfk2020042013',
'amount' => 10000,
'transfer_remark' => '直播违规扣罚',
'notify_url' => 'https://www.weixin.qq.com/wxpay/pay.php',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/platsolution/ecommerce/mch-transfer/insurance-claim-bills/pre-transfer')->postAsync([
'json' => [
'sub_mchid' => '1900001109',
'receiver' => [
'type' => 'MERCHANT',
'transaction_info' => [
'transaction_id' => '1217752501201407033233368018',
],
],
'out_bill_no' => 'plfk2020042013',
'amount' => 10000,
'transfer_remark' => '直播违规扣罚',
'notify_url' => 'https://www.weixin.qq.com/wxpay/pay.php',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/platsolution/ecommerce/mch-transfer/insurance-claim-bills/pre-transfer']->postAsync([
'json' => [
'sub_mchid' => '1900001109',
'receiver' => [
'type' => 'MERCHANT',
'transaction_info' => [
'transaction_id' => '1217752501201407033233368018',
],
],
'out_bill_no' => 'plfk2020042013',
'amount' => 10000,
'transfer_remark' => '直播违规扣罚',
'notify_url' => 'https://www.weixin.qq.com/wxpay/pay.php',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->platsolution->ecommerce->mchTransfer->insuranceClaimBills->preTransfer->post([
'json' => [
'sub_mchid' => '1900001109',
'receiver' => [
'type' => 'MERCHANT',
'transaction_info' => [
'transaction_id' => '1217752501201407033233368018',
],
],
'out_bill_no' => 'plfk2020042013',
'amount' => 10000,
'transfer_remark' => '直播违规扣罚',
'notify_url' => 'https://www.weixin.qq.com/wxpay/pay.php',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/platsolution/ecommerce/mch-transfer/insurance-claim-bills/pre-transfer')->post([
'json' => [
'sub_mchid' => '1900001109',
'receiver' => [
'type' => 'MERCHANT',
'transaction_info' => [
'transaction_id' => '1217752501201407033233368018',
],
],
'out_bill_no' => 'plfk2020042013',
'amount' => 10000,
'transfer_remark' => '直播违规扣罚',
'notify_url' => 'https://www.weixin.qq.com/wxpay/pay.php',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/platsolution/ecommerce/mch-transfer/insurance-claim-bills/pre-transfer']->post([
'json' => [
'sub_mchid' => '1900001109',
'receiver' => [
'type' => 'MERCHANT',
'transaction_info' => [
'transaction_id' => '1217752501201407033233368018',
],
],
'out_bill_no' => 'plfk2020042013',
'amount' => 10000,
'transfer_remark' => '直播违规扣罚',
'notify_url' => 'https://www.weixin.qq.com/wxpay/pay.php',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
sub_mchid | string | 二级商户号 |
out_bill_no | string | 商户单号 |
bill_id | string | 微信支付转账单号 |
accept_time | string | 受理时间 |
package_info | string | 跳转领取页面的package信息 |
参阅 官方文档