Skip to content

发起保证金赔付用户运费

商户可调用该接口从保证金账户赔付给用户。注:接口频率限制为100次/s

请求参数类型描述
jsonobject声明请求的JSON数据结构
sub_mchidstring二级商户号
sp_appidstring公众账号ID
receiverobject赔付用户信息
transaction_infoobject转账接收方订单信息
transaction_idstring交易订单号
typestring转账接收方订单类型
WXPAY | WXVALUE 枚举值之一
user_infoobject转账接收方用户
sp_openidstring转账接收方用户 openid
out_bill_nostring商户单号
amountnumber赔付金额
transfer_remarkstring赔付原因
transfer_scene_idstring转账场景ID
user_recv_perceptionstring用户收款感知
php
$instance->v3->platsolution->ecommerce->mchTransfer->depositShippingCostCompensationBills->postAsync([
  'json' => [
    'sub_mchid'            => '1900000109',
    'sp_appid'             => 'wx8888888888888888',
    'receiver'             => [
      'transaction_info' => [
        'transaction_id' => '1217752501201407033233368018',
        'type'           => 'WXPAY',
      ],
      'user_info'        => [
        'sp_openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
      ],
    ],
    'out_bill_no'          => 'plfk2020042013',
    'amount'               => 10000,
    'transfer_remark'      => '直播违规扣罚',
    '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/deposit-shipping-cost-compensation-bills')->postAsync([
  'json' => [
    'sub_mchid'            => '1900000109',
    'sp_appid'             => 'wx8888888888888888',
    'receiver'             => [
      'transaction_info' => [
        'transaction_id' => '1217752501201407033233368018',
        'type'           => 'WXPAY',
      ],
      'user_info'        => [
        'sp_openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
      ],
    ],
    'out_bill_no'          => 'plfk2020042013',
    'amount'               => 10000,
    'transfer_remark'      => '直播违规扣罚',
    '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/deposit-shipping-cost-compensation-bills']->postAsync([
  'json' => [
    'sub_mchid'            => '1900000109',
    'sp_appid'             => 'wx8888888888888888',
    'receiver'             => [
      'transaction_info' => [
        'transaction_id' => '1217752501201407033233368018',
        'type'           => 'WXPAY',
      ],
      'user_info'        => [
        'sp_openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
      ],
    ],
    'out_bill_no'          => 'plfk2020042013',
    'amount'               => 10000,
    'transfer_remark'      => '直播违规扣罚',
    '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->depositShippingCostCompensationBills->post([
  'json' => [
    'sub_mchid'            => '1900000109',
    'sp_appid'             => 'wx8888888888888888',
    'receiver'             => [
      'transaction_info' => [
        'transaction_id' => '1217752501201407033233368018',
        'type'           => 'WXPAY',
      ],
      'user_info'        => [
        'sp_openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
      ],
    ],
    'out_bill_no'          => 'plfk2020042013',
    'amount'               => 10000,
    'transfer_remark'      => '直播违规扣罚',
    'transfer_scene_id'    => '1001',
    'user_recv_perception' => '退货运费补偿',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/platsolution/ecommerce/mch-transfer/deposit-shipping-cost-compensation-bills')->post([
  'json' => [
    'sub_mchid'            => '1900000109',
    'sp_appid'             => 'wx8888888888888888',
    'receiver'             => [
      'transaction_info' => [
        'transaction_id' => '1217752501201407033233368018',
        'type'           => 'WXPAY',
      ],
      'user_info'        => [
        'sp_openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
      ],
    ],
    'out_bill_no'          => 'plfk2020042013',
    'amount'               => 10000,
    'transfer_remark'      => '直播违规扣罚',
    'transfer_scene_id'    => '1001',
    'user_recv_perception' => '退货运费补偿',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/platsolution/ecommerce/mch-transfer/deposit-shipping-cost-compensation-bills']->post([
  'json' => [
    'sub_mchid'            => '1900000109',
    'sp_appid'             => 'wx8888888888888888',
    'receiver'             => [
      'transaction_info' => [
        'transaction_id' => '1217752501201407033233368018',
        'type'           => 'WXPAY',
      ],
      'user_info'        => [
        'sp_openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
      ],
    ],
    'out_bill_no'          => 'plfk2020042013',
    'amount'               => 10000,
    'transfer_remark'      => '直播违规扣罚',
    'transfer_scene_id'    => '1001',
    'user_recv_perception' => '退货运费补偿',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
sp_mchidstring服务商商户号
sub_mchidstring二级商户号
sub_appidstring二级商户AppID
receiver_detailobject转账接收方信息
receiverobject转账接收者信息
transaction_infoobject转账接收方订单信息
transaction_idstring交易订单号
typestring转账接收方订单类型
WXPAY | WXVALUE 枚举值之一
user_infoobject转账接收方用户
sp_openidstring转账接收方用户 openid
out_bill_nostring商户单号
amountnumber赔付金额
transfer_remarkstring赔付原因
bill_idstring微信支付转账单号
statestring赔付状态
ACCEPTED | SUCCESS | CLOSED | WAIT_USER_CONFIRM | CANCELING | CANCELLED 枚举值之一
accept_timestring受理时间
success_timestring成功时间
sponsor_mchidstring出资商户号

参阅 官方文档

Published on the GitHub by TheNorthMemory