Skip to content

还款下单

还款下单,只能使用还款对应的查单、关单接口

请求参数类型描述
jsonobject声明请求的JSON数据结构
combine_out_trade_nostring还款单订单号
combine_mchidstring还款服务商商户号
sub_ordersobject[]还款明细单信息列表
mchidstring还款单发起商户号
sub_mchidstring子商户号
out_trade_nostring还款明细单订单号
amountobject订单金额
total_amountnumber标价金额
currencystring标价币种
attachstring附加数据
descriptionstring商品描述
settle_infoobject结算信息
profit_sharingboolean是否指定分账
subsidy_amountinteger补差金额
time_expirestring交易结束时间
notify_urlstring通知地址
h5_infoobjectH5调起支付场景信息
combine_appidstring还款服务商APPID
payer_client_ipstring用户终端IP
typestring场景类型
iOS | Android | Wap 枚举值之一
app_namestring应用名称
app_urlstring网站URL
bundle_idstringiOS平台BundleID
package_namestringAndroid平台PackageName
app_infoobjectAPP调起支付场景信息
combine_appidstring还款服务商APPID
miniprogram_infoobject小程序调起支付场景信息
combine_appidstring还款服务商APPID
openidstring用户标识
php
$instance->v3->repayment->combineTransactions->partner->prepay->postAsync([
  'json' => [
    'combine_out_trade_no' => '1217752501201407033233368018',
    'combine_mchid'        => '1230000109',
    'sub_orders'           => [[
      'mchid'        => '1230000109',
      'sub_mchid'    => '1900000109',
      'out_trade_no' => '20150806125346',
      'amount'       => [
        'total_amount' => 10,
        'currency'     => 'CNY',
      ],
      'attach'       => '深圳分店',
      'description'  => '某某放心借',
      'settle_info'  => [
        'profit_sharing' => true,
        'subsidy_amount' => 10,
      ],
    ],],
    'time_expire'          => '2018-06-08T10:34:56+08:00',
    'notify_url'           => 'https://yourapp.com/notify',
    'h5_info'              => [
      'combine_appid'   => 'wxd678efh567hg6787',
      'payer_client_ip' => '127.0.0.1',
      'type'            => 'iOS',
      'app_name'        => '王者荣耀',
      'app_url'         => 'https://pay.qq.com',
      'bundle_id'       => 'com.tencent.wzryiOS',
      'package_name'    => 'com.tencent.tmgp.sgame',
    ],
    'app_info'             => [
      'combine_appid' => 'wxd678efh567hg6787',
    ],
    'miniprogram_info'     => [
      'combine_appid' => 'wxd678efh567hg6787',
      'openid'        => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/repayment/combine-transactions/partner/prepay')->postAsync([
  'json' => [
    'combine_out_trade_no' => '1217752501201407033233368018',
    'combine_mchid'        => '1230000109',
    'sub_orders'           => [[
      'mchid'        => '1230000109',
      'sub_mchid'    => '1900000109',
      'out_trade_no' => '20150806125346',
      'amount'       => [
        'total_amount' => 10,
        'currency'     => 'CNY',
      ],
      'attach'       => '深圳分店',
      'description'  => '某某放心借',
      'settle_info'  => [
        'profit_sharing' => true,
        'subsidy_amount' => 10,
      ],
    ],],
    'time_expire'          => '2018-06-08T10:34:56+08:00',
    'notify_url'           => 'https://yourapp.com/notify',
    'h5_info'              => [
      'combine_appid'   => 'wxd678efh567hg6787',
      'payer_client_ip' => '127.0.0.1',
      'type'            => 'iOS',
      'app_name'        => '王者荣耀',
      'app_url'         => 'https://pay.qq.com',
      'bundle_id'       => 'com.tencent.wzryiOS',
      'package_name'    => 'com.tencent.tmgp.sgame',
    ],
    'app_info'             => [
      'combine_appid' => 'wxd678efh567hg6787',
    ],
    'miniprogram_info'     => [
      'combine_appid' => 'wxd678efh567hg6787',
      'openid'        => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/repayment/combine-transactions/partner/prepay']->postAsync([
  'json' => [
    'combine_out_trade_no' => '1217752501201407033233368018',
    'combine_mchid'        => '1230000109',
    'sub_orders'           => [[
      'mchid'        => '1230000109',
      'sub_mchid'    => '1900000109',
      'out_trade_no' => '20150806125346',
      'amount'       => [
        'total_amount' => 10,
        'currency'     => 'CNY',
      ],
      'attach'       => '深圳分店',
      'description'  => '某某放心借',
      'settle_info'  => [
        'profit_sharing' => true,
        'subsidy_amount' => 10,
      ],
    ],],
    'time_expire'          => '2018-06-08T10:34:56+08:00',
    'notify_url'           => 'https://yourapp.com/notify',
    'h5_info'              => [
      'combine_appid'   => 'wxd678efh567hg6787',
      'payer_client_ip' => '127.0.0.1',
      'type'            => 'iOS',
      'app_name'        => '王者荣耀',
      'app_url'         => 'https://pay.qq.com',
      'bundle_id'       => 'com.tencent.wzryiOS',
      'package_name'    => 'com.tencent.tmgp.sgame',
    ],
    'app_info'             => [
      'combine_appid' => 'wxd678efh567hg6787',
    ],
    'miniprogram_info'     => [
      'combine_appid' => 'wxd678efh567hg6787',
      'openid'        => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->repayment->combineTransactions->partner->prepay->post([
  'json' => [
    'combine_out_trade_no' => '1217752501201407033233368018',
    'combine_mchid'        => '1230000109',
    'sub_orders'           => [[
      'mchid'        => '1230000109',
      'sub_mchid'    => '1900000109',
      'out_trade_no' => '20150806125346',
      'amount'       => [
        'total_amount' => 10,
        'currency'     => 'CNY',
      ],
      'attach'       => '深圳分店',
      'description'  => '某某放心借',
      'settle_info'  => [
        'profit_sharing' => true,
        'subsidy_amount' => 10,
      ],
    ],],
    'time_expire'          => '2018-06-08T10:34:56+08:00',
    'notify_url'           => 'https://yourapp.com/notify',
    'h5_info'              => [
      'combine_appid'   => 'wxd678efh567hg6787',
      'payer_client_ip' => '127.0.0.1',
      'type'            => 'iOS',
      'app_name'        => '王者荣耀',
      'app_url'         => 'https://pay.qq.com',
      'bundle_id'       => 'com.tencent.wzryiOS',
      'package_name'    => 'com.tencent.tmgp.sgame',
    ],
    'app_info'             => [
      'combine_appid' => 'wxd678efh567hg6787',
    ],
    'miniprogram_info'     => [
      'combine_appid' => 'wxd678efh567hg6787',
      'openid'        => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/repayment/combine-transactions/partner/prepay')->post([
  'json' => [
    'combine_out_trade_no' => '1217752501201407033233368018',
    'combine_mchid'        => '1230000109',
    'sub_orders'           => [[
      'mchid'        => '1230000109',
      'sub_mchid'    => '1900000109',
      'out_trade_no' => '20150806125346',
      'amount'       => [
        'total_amount' => 10,
        'currency'     => 'CNY',
      ],
      'attach'       => '深圳分店',
      'description'  => '某某放心借',
      'settle_info'  => [
        'profit_sharing' => true,
        'subsidy_amount' => 10,
      ],
    ],],
    'time_expire'          => '2018-06-08T10:34:56+08:00',
    'notify_url'           => 'https://yourapp.com/notify',
    'h5_info'              => [
      'combine_appid'   => 'wxd678efh567hg6787',
      'payer_client_ip' => '127.0.0.1',
      'type'            => 'iOS',
      'app_name'        => '王者荣耀',
      'app_url'         => 'https://pay.qq.com',
      'bundle_id'       => 'com.tencent.wzryiOS',
      'package_name'    => 'com.tencent.tmgp.sgame',
    ],
    'app_info'             => [
      'combine_appid' => 'wxd678efh567hg6787',
    ],
    'miniprogram_info'     => [
      'combine_appid' => 'wxd678efh567hg6787',
      'openid'        => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/repayment/combine-transactions/partner/prepay']->post([
  'json' => [
    'combine_out_trade_no' => '1217752501201407033233368018',
    'combine_mchid'        => '1230000109',
    'sub_orders'           => [[
      'mchid'        => '1230000109',
      'sub_mchid'    => '1900000109',
      'out_trade_no' => '20150806125346',
      'amount'       => [
        'total_amount' => 10,
        'currency'     => 'CNY',
      ],
      'attach'       => '深圳分店',
      'description'  => '某某放心借',
      'settle_info'  => [
        'profit_sharing' => true,
        'subsidy_amount' => 10,
      ],
    ],],
    'time_expire'          => '2018-06-08T10:34:56+08:00',
    'notify_url'           => 'https://yourapp.com/notify',
    'h5_info'              => [
      'combine_appid'   => 'wxd678efh567hg6787',
      'payer_client_ip' => '127.0.0.1',
      'type'            => 'iOS',
      'app_name'        => '王者荣耀',
      'app_url'         => 'https://pay.qq.com',
      'bundle_id'       => 'com.tencent.wzryiOS',
      'package_name'    => 'com.tencent.tmgp.sgame',
    ],
    'app_info'             => [
      'combine_appid' => 'wxd678efh567hg6787',
    ],
    'miniprogram_info'     => [
      'combine_appid' => 'wxd678efh567hg6787',
      'openid'        => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
prepay_idstring预支付交易会话标识
h5_urlstring支付跳转链接

参阅 官方文档

Published on the GitHub by TheNorthMemory