请求赔付
商户可调用该接口赔付给用户。
请求参数 | 类型 | 描述 |
---|---|---|
json | object | 声明请求的JSON 数据结构 |
receiver | object | 收款方信息 |
type | string | 转账接收方类型MERCHANT | TRANSACTION_USER 枚举值之一 |
transaction_info | object | 转账接收方订单信息 |
transaction_id | string | 交易订单号 |
out_bill_no | string | 商户单号 |
amount | number | 赔付金额 |
transfer_remark | string | 赔付原因 |
sponsor_mchid | string | 出资商户号 |
transfer_scene_id | string | 转账场景ID |
user_recv_perception | string | 用户收款感知 |
php
$instance->v3->platsolution->ecommerce->mchTransfer->compensateBills->postAsync([
'json' => [
'receiver' => [
'type' => 'MERCHANT',
'transaction_info' => [
'transaction_id' => '1217752501201407033233368018',
],
],
'out_bill_no' => 'plfk2020042013',
'amount' => 10000,
'transfer_remark' => '直播违规扣罚',
'sponsor_mchid' => '1900001109',
'transfer_scene_id' => '1001',
'user_recv_perception' => '退货运费补偿',
],
])
->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/compensate-bills')->postAsync([
'json' => [
'receiver' => [
'type' => 'MERCHANT',
'transaction_info' => [
'transaction_id' => '1217752501201407033233368018',
],
],
'out_bill_no' => 'plfk2020042013',
'amount' => 10000,
'transfer_remark' => '直播违规扣罚',
'sponsor_mchid' => '1900001109',
'transfer_scene_id' => '1001',
'user_recv_perception' => '退货运费补偿',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/platsolution/ecommerce/mch-transfer/compensate-bills']->postAsync([
'json' => [
'receiver' => [
'type' => 'MERCHANT',
'transaction_info' => [
'transaction_id' => '1217752501201407033233368018',
],
],
'out_bill_no' => 'plfk2020042013',
'amount' => 10000,
'transfer_remark' => '直播违规扣罚',
'sponsor_mchid' => '1900001109',
'transfer_scene_id' => '1001',
'user_recv_perception' => '退货运费补偿',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->platsolution->ecommerce->mchTransfer->compensateBills->post([
'json' => [
'receiver' => [
'type' => 'MERCHANT',
'transaction_info' => [
'transaction_id' => '1217752501201407033233368018',
],
],
'out_bill_no' => 'plfk2020042013',
'amount' => 10000,
'transfer_remark' => '直播违规扣罚',
'sponsor_mchid' => '1900001109',
'transfer_scene_id' => '1001',
'user_recv_perception' => '退货运费补偿',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/platsolution/ecommerce/mch-transfer/compensate-bills')->post([
'json' => [
'receiver' => [
'type' => 'MERCHANT',
'transaction_info' => [
'transaction_id' => '1217752501201407033233368018',
],
],
'out_bill_no' => 'plfk2020042013',
'amount' => 10000,
'transfer_remark' => '直播违规扣罚',
'sponsor_mchid' => '1900001109',
'transfer_scene_id' => '1001',
'user_recv_perception' => '退货运费补偿',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/platsolution/ecommerce/mch-transfer/compensate-bills']->post([
'json' => [
'receiver' => [
'type' => 'MERCHANT',
'transaction_info' => [
'transaction_id' => '1217752501201407033233368018',
],
],
'out_bill_no' => 'plfk2020042013',
'amount' => 10000,
'transfer_remark' => '直播违规扣罚',
'sponsor_mchid' => '1900001109',
'transfer_scene_id' => '1001',
'user_recv_perception' => '退货运费补偿',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
sp_mchid | string | 服务商商户号 |
receiver_detail | object | 转账接收方信息 |
receiver | object | 转账接收者信息 |
type | string | 转账接收方类型MERCHANT | TRANSACTION_USER 枚举值之一 |
transaction_info | object | 转账接收方订单信息 |
transaction_id | string | 交易订单号 |
out_bill_no | string | 商户单号 |
amount | number | 赔付金额 |
transfer_remark | string | 赔付原因 |
bill_id | string | 微信支付转账单号 |
state | string | 赔付状态ACCEPTED | SUCCESS | CLOSED | WAIT_USER_CONFIRM | CANCELING | CANCELLED 枚举值之一 |
accept_time | string | 受理时间 |
success_time | string | 成功时间 |
sponsor_mchid | string | 出资商户号 |
参阅 官方文档