电商合单委托代扣支付
商户可以通过该接口发起免密的合单支付
| 请求参数 | 类型 | 描述 |
|---|---|---|
| json | object | 声明请求的JSON数据结构 |
| combine_appid | string | 合单商户appid |
| combine_mchid | string | 合单商户号 |
| combine_out_trade_no | string | 合单商户订单号 |
| contract_id | string | 委托代扣协议ID |
| sub_orders | object[] | 子单信息 |
| mchid | string | 子单商户号 |
| attach | string | 附加数据 |
| amount | object | 订单金额 |
| total_amount | integer | 标价金额 |
| currency | string | 标价币种 |
| out_trade_no | string | 子单商户订单号 |
| sub_mchid | string | 二级商户号 |
| sub_appid | string | 二级商户appid |
| description | string | 商品描述 |
| settle_info | object | 结算信息 |
| profit_sharing | boolean | 是否指定分账 |
| subsidy_amount | integer | 补差金额 |
php
$instance->v3->ecommerce->combinePapay->transactions->postAsync([
'json' => [
'combine_appid' => 'wxd678efh567hg6787',
'combine_mchid' => '1900000109',
'combine_out_trade_no' => 'P20150806125346',
'contract_id' => '123124412412423431',
'sub_orders' => [[
'mchid' => '1900000109',
'attach' => '深圳分店',
'amount' => [
'total_amount' => 100,
'currency' => 'CNY',
],
'out_trade_no' => '20150806125346',
'sub_mchid' => '1900000109',
'sub_appid' => 'wxd678efh567hg6787',
'description' => '腾讯充值中心-QQ会员充值',
'settle_info' => [
'profit_sharing' => true,
'subsidy_amount' => 10,
],
],],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance->chain('v3/ecommerce/combine-papay/transactions')->postAsync([
'json' => [
'combine_appid' => 'wxd678efh567hg6787',
'combine_mchid' => '1900000109',
'combine_out_trade_no' => 'P20150806125346',
'contract_id' => '123124412412423431',
'sub_orders' => [[
'mchid' => '1900000109',
'attach' => '深圳分店',
'amount' => [
'total_amount' => 100,
'currency' => 'CNY',
],
'out_trade_no' => '20150806125346',
'sub_mchid' => '1900000109',
'sub_appid' => 'wxd678efh567hg6787',
'description' => '腾讯充值中心-QQ会员充值',
'settle_info' => [
'profit_sharing' => true,
'subsidy_amount' => 10,
],
],],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance['v3/ecommerce/combine-papay/transactions']->postAsync([
'json' => [
'combine_appid' => 'wxd678efh567hg6787',
'combine_mchid' => '1900000109',
'combine_out_trade_no' => 'P20150806125346',
'contract_id' => '123124412412423431',
'sub_orders' => [[
'mchid' => '1900000109',
'attach' => '深圳分店',
'amount' => [
'total_amount' => 100,
'currency' => 'CNY',
],
'out_trade_no' => '20150806125346',
'sub_mchid' => '1900000109',
'sub_appid' => 'wxd678efh567hg6787',
'description' => '腾讯充值中心-QQ会员充值',
'settle_info' => [
'profit_sharing' => true,
'subsidy_amount' => 10,
],
],],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$response = $instance->v3->ecommerce->combinePapay->transactions->post([
'json' => [
'combine_appid' => 'wxd678efh567hg6787',
'combine_mchid' => '1900000109',
'combine_out_trade_no' => 'P20150806125346',
'contract_id' => '123124412412423431',
'sub_orders' => [[
'mchid' => '1900000109',
'attach' => '深圳分店',
'amount' => [
'total_amount' => 100,
'currency' => 'CNY',
],
'out_trade_no' => '20150806125346',
'sub_mchid' => '1900000109',
'sub_appid' => 'wxd678efh567hg6787',
'description' => '腾讯充值中心-QQ会员充值',
'settle_info' => [
'profit_sharing' => true,
'subsidy_amount' => 10,
],
],],
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance->chain('v3/ecommerce/combine-papay/transactions')->post([
'json' => [
'combine_appid' => 'wxd678efh567hg6787',
'combine_mchid' => '1900000109',
'combine_out_trade_no' => 'P20150806125346',
'contract_id' => '123124412412423431',
'sub_orders' => [[
'mchid' => '1900000109',
'attach' => '深圳分店',
'amount' => [
'total_amount' => 100,
'currency' => 'CNY',
],
'out_trade_no' => '20150806125346',
'sub_mchid' => '1900000109',
'sub_appid' => 'wxd678efh567hg6787',
'description' => '腾讯充值中心-QQ会员充值',
'settle_info' => [
'profit_sharing' => true,
'subsidy_amount' => 10,
],
],],
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance['v3/ecommerce/combine-papay/transactions']->post([
'json' => [
'combine_appid' => 'wxd678efh567hg6787',
'combine_mchid' => '1900000109',
'combine_out_trade_no' => 'P20150806125346',
'contract_id' => '123124412412423431',
'sub_orders' => [[
'mchid' => '1900000109',
'attach' => '深圳分店',
'amount' => [
'total_amount' => 100,
'currency' => 'CNY',
],
'out_trade_no' => '20150806125346',
'sub_mchid' => '1900000109',
'sub_appid' => 'wxd678efh567hg6787',
'description' => '腾讯充值中心-QQ会员充值',
'settle_info' => [
'profit_sharing' => true,
'subsidy_amount' => 10,
],
],],
],
]);
print_r(json_decode((string) $response->getBody(), true));| 返回字典 | 类型 | 描述 |
|---|---|---|
| combine_appid | string | 合单商户APPID |
| combine_mchid | string | 合单商户号 |
| combine_out_trade_no | string | 合单商户订单号 |
| sub_orders | object[] | 子单信息 |
| mchid | string | 子单商户号 |
| trade_type | string | 交易类型 |
| trade_state | string | 交易状态 |
| bank_type | string | 付款银行 |
| attach | string | 附加数据 |
| success_time | string | 支付完成时间 |
| transaction_id | string | 子单微信订单号 |
| out_trade_no | string | 子单商户订单号 |
| sub_mchid | string | 二级商户号 |
| sub_appid | string | 二级商户appid |
| amount | object | 订单金额 |
| total_amount | integer | 标价金额 |
| currency | string | 标价币种 |
| payer_amount | integer | 现金支付金额 |
| payer_currency | string | 现金支付币种 |
| combine_payer_info | object | 支付者 |
| openid | string | 用户标识 |
参阅 官方文档