Skip to content

解冻剩余资金

不需要进行分账的订单,可直接调用本接口将订单的金额全部解冻给订单出资方账户(原订单资金结算账户);调用分账接口后,需要解冻剩余资金时,可调用本接口将剩余的未分账金额全部解冻给订单出资方账户。

请求参数类型描述
base_uristring声明接入点https://apihk.mch.weixin.qq.com/(香港接入)
jsonobject声明请求的JSON数据结构
sub_mchidstring子商户号
transaction_idstring微信订单号
out_order_nostring商户分账单号
descriptionstring分账描述
php
$instance->v3->global->profitSharing->orders->unfreeze->postAsync([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'json' => [
    'sub_mchid' => '1900000109',
    'transaction_id' => '4208450740201411110007820472',
    'out_order_no' => 'P20150806125346',
    'description' => '解冻全部剩余资金',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/global/profit-sharing/orders/unfreeze')->postAsync([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'json' => [
    'sub_mchid' => '1900000109',
    'transaction_id' => '4208450740201411110007820472',
    'out_order_no' => 'P20150806125346',
    'description' => '解冻全部剩余资金',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/global/profit-sharing/orders/unfreeze']->postAsync([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'json' => [
    'sub_mchid' => '1900000109',
    'transaction_id' => '4208450740201411110007820472',
    'out_order_no' => 'P20150806125346',
    'description' => '解冻全部剩余资金',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->global->profitSharing->orders->unfreeze->post([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'json' => [
    'sub_mchid' => '1900000109',
    'transaction_id' => '4208450740201411110007820472',
    'out_order_no' => 'P20150806125346',
    'description' => '解冻全部剩余资金',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/global/profit-sharing/orders/unfreeze')->post([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'json' => [
    'sub_mchid' => '1900000109',
    'transaction_id' => '4208450740201411110007820472',
    'out_order_no' => 'P20150806125346',
    'description' => '解冻全部剩余资金',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/global/profit-sharing/orders/unfreeze']->post([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'json' => [
    'sub_mchid' => '1900000109',
    'transaction_id' => '4208450740201411110007820472',
    'out_order_no' => 'P20150806125346',
    'description' => '解冻全部剩余资金',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
sub_mchidstring子商户号
transaction_idstring微信订单号
out_order_nostring商户分账单号
order_idstring微信分账单号
statestring分账单状态
receiversobject[]分账接收方列表
currencystring分账币种
amountinteger分账金额
descriptionstring分账描述
typestring分账接收方类型
accountstring分账接收方帐号
resultstring分账结果
fail_reasonstring分账失败原因
create_timestring分账创建时间
finish_timestring分账完成时间
detail_idstring分账明细单号
detail_typestring分账明细类型
settlement_currencystring出资方结算币种
settlement_amountinteger出资方结算金额
rateinteger汇率值

参阅 官方文档

Published on the GitHub by TheNorthMemory