Skip to content

受理单次预约商家转账

商户可调用接口预先指定转账的单次计划,预创建预约记录并获取微信预约记录单号和跳转信息(package_info),再携带该(package_info)参数,通过微信SDK拉起微信支付客户端的用户确认页面。

请求参数类型描述
jsonobject声明请求的JSON数据结构
sub_mchidstring二级商户号
sp_appidstring服务商AppID
sub_appidstring二级商户AppID
out_reservation_nostring商户预约单号
transfer_scene_idstring转账场景ID
estimated_datestring预计最晚转账日期
estimated_max_amountnumber预计最大转账金额
exact_amountnumber准确转账金额
openidstring收款用户OpenID
user_real_namestring收款用户姓名
reserve_remarkstring预约备注
notify_urlstring商户回调地址
scene_report_dataobject场景报备信息
insurance_policyobject保险保单报备信息
product_registration_nostring保险产品备案编号
policy_nostring保险单号
namestring保险名称
withdrawal_nostring取现单号
claim_nostring理赔单号
headersobject声明请求的头参数
Wechatpay-Serialstring平台公钥ID/平台公钥证书序列号
php
$instance->v3->platsolution->mchTransfer->reservation->apply->postAsync([
  'json' => [
    'sub_mchid'            => '1900001109',
    'sp_appid'             => 'wxf636efh567hg4356',
    'sub_appid'            => 'wxf636efh567hg4356',
    'out_reservation_no'   => 'plfk2020042013',
    'transfer_scene_id'    => '1000',
    'estimated_date'       => '2019-11-22',
    'estimated_max_amount' => 400000,
    'exact_amount'         => 100000,
    'openid'               => 'o-MYE42l80oelYMDE34nYD456Xoy',
    'user_real_name'       => '757b340b45ebef5467rter35gf464344v3542sdf4t6re4tb4f54ty45t4yyry45',
    'reserve_remark'       => '由于存在收益波动,实际到账资金可能不等于当前金额',
    'notify_url'           => 'https://www.weixin.qq.com/wxpay/pay.php',
    'scene_report_data'    => [
      'insurance_policy' => [
        'product_registration_no' => '40058541257',
        'policy_no'               => '202301011651',
        'name'                    => '养老保险',
        'withdrawal_no'           => '202310410941',
        'claim_no'                => '202310410941',
      ],
    ],
  ],
  '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/platsolution/mch-transfer/reservation/apply')->postAsync([
  'json' => [
    'sub_mchid'            => '1900001109',
    'sp_appid'             => 'wxf636efh567hg4356',
    'sub_appid'            => 'wxf636efh567hg4356',
    'out_reservation_no'   => 'plfk2020042013',
    'transfer_scene_id'    => '1000',
    'estimated_date'       => '2019-11-22',
    'estimated_max_amount' => 400000,
    'exact_amount'         => 100000,
    'openid'               => 'o-MYE42l80oelYMDE34nYD456Xoy',
    'user_real_name'       => '757b340b45ebef5467rter35gf464344v3542sdf4t6re4tb4f54ty45t4yyry45',
    'reserve_remark'       => '由于存在收益波动,实际到账资金可能不等于当前金额',
    'notify_url'           => 'https://www.weixin.qq.com/wxpay/pay.php',
    'scene_report_data'    => [
      'insurance_policy' => [
        'product_registration_no' => '40058541257',
        'policy_no'               => '202301011651',
        'name'                    => '养老保险',
        'withdrawal_no'           => '202310410941',
        'claim_no'                => '202310410941',
      ],
    ],
  ],
  '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/platsolution/mch-transfer/reservation/apply']->postAsync([
  'json' => [
    'sub_mchid'            => '1900001109',
    'sp_appid'             => 'wxf636efh567hg4356',
    'sub_appid'            => 'wxf636efh567hg4356',
    'out_reservation_no'   => 'plfk2020042013',
    'transfer_scene_id'    => '1000',
    'estimated_date'       => '2019-11-22',
    'estimated_max_amount' => 400000,
    'exact_amount'         => 100000,
    'openid'               => 'o-MYE42l80oelYMDE34nYD456Xoy',
    'user_real_name'       => '757b340b45ebef5467rter35gf464344v3542sdf4t6re4tb4f54ty45t4yyry45',
    'reserve_remark'       => '由于存在收益波动,实际到账资金可能不等于当前金额',
    'notify_url'           => 'https://www.weixin.qq.com/wxpay/pay.php',
    'scene_report_data'    => [
      'insurance_policy' => [
        'product_registration_no' => '40058541257',
        'policy_no'               => '202301011651',
        'name'                    => '养老保险',
        'withdrawal_no'           => '202310410941',
        'claim_no'                => '202310410941',
      ],
    ],
  ],
  '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->platsolution->mchTransfer->reservation->apply->post([
  'json' => [
    'sub_mchid'            => '1900001109',
    'sp_appid'             => 'wxf636efh567hg4356',
    'sub_appid'            => 'wxf636efh567hg4356',
    'out_reservation_no'   => 'plfk2020042013',
    'transfer_scene_id'    => '1000',
    'estimated_date'       => '2019-11-22',
    'estimated_max_amount' => 400000,
    'exact_amount'         => 100000,
    'openid'               => 'o-MYE42l80oelYMDE34nYD456Xoy',
    'user_real_name'       => '757b340b45ebef5467rter35gf464344v3542sdf4t6re4tb4f54ty45t4yyry45',
    'reserve_remark'       => '由于存在收益波动,实际到账资金可能不等于当前金额',
    'notify_url'           => 'https://www.weixin.qq.com/wxpay/pay.php',
    'scene_report_data'    => [
      'insurance_policy' => [
        'product_registration_no' => '40058541257',
        'policy_no'               => '202301011651',
        'name'                    => '养老保险',
        'withdrawal_no'           => '202310410941',
        'claim_no'                => '202310410941',
      ],
    ],
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/platsolution/mch-transfer/reservation/apply')->post([
  'json' => [
    'sub_mchid'            => '1900001109',
    'sp_appid'             => 'wxf636efh567hg4356',
    'sub_appid'            => 'wxf636efh567hg4356',
    'out_reservation_no'   => 'plfk2020042013',
    'transfer_scene_id'    => '1000',
    'estimated_date'       => '2019-11-22',
    'estimated_max_amount' => 400000,
    'exact_amount'         => 100000,
    'openid'               => 'o-MYE42l80oelYMDE34nYD456Xoy',
    'user_real_name'       => '757b340b45ebef5467rter35gf464344v3542sdf4t6re4tb4f54ty45t4yyry45',
    'reserve_remark'       => '由于存在收益波动,实际到账资金可能不等于当前金额',
    'notify_url'           => 'https://www.weixin.qq.com/wxpay/pay.php',
    'scene_report_data'    => [
      'insurance_policy' => [
        'product_registration_no' => '40058541257',
        'policy_no'               => '202301011651',
        'name'                    => '养老保险',
        'withdrawal_no'           => '202310410941',
        'claim_no'                => '202310410941',
      ],
    ],
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/platsolution/mch-transfer/reservation/apply']->post([
  'json' => [
    'sub_mchid'            => '1900001109',
    'sp_appid'             => 'wxf636efh567hg4356',
    'sub_appid'            => 'wxf636efh567hg4356',
    'out_reservation_no'   => 'plfk2020042013',
    'transfer_scene_id'    => '1000',
    'estimated_date'       => '2019-11-22',
    'estimated_max_amount' => 400000,
    'exact_amount'         => 100000,
    'openid'               => 'o-MYE42l80oelYMDE34nYD456Xoy',
    'user_real_name'       => '757b340b45ebef5467rter35gf464344v3542sdf4t6re4tb4f54ty45t4yyry45',
    'reserve_remark'       => '由于存在收益波动,实际到账资金可能不等于当前金额',
    'notify_url'           => 'https://www.weixin.qq.com/wxpay/pay.php',
    'scene_report_data'    => [
      'insurance_policy' => [
        'product_registration_no' => '40058541257',
        'policy_no'               => '202301011651',
        'name'                    => '养老保险',
        'withdrawal_no'           => '202310410941',
        'claim_no'                => '202310410941',
      ],
    ],
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
sub_mchidstring二级商户号
out_reservation_nostring商户预约单号
reservation_idstring微信转账预约单号
accept_timestring预约记录受理时间
statestring预约记录状态
ACCEPTED | CONFIRMED | CLOSED 枚举值之一
package_infostring跳转微信支付用户确认预约页的package信息

参阅 官方文档

Published on the GitHub by TheNorthMemory