Skip to content

获取分账账单文件下载地址

微信支付按天提供分账账单文件,商户可以通过该接口获取账单文件的下载地址。文件内包含分账相关的金额、时间等信息,供商户核对到账等情况。

请求参数类型描述
base_uristring声明接入点https://apihk.mch.weixin.qq.com/(香港接入)
queryobject声明请求的查询参数
sub_mchidstring子商户号
bill_datestring账单日期
php
$instance->v3->global->profitSharing->billDownloadUrl->getAsync([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'query' => [
    'sub_mchid' => '1900000109',
    'bill_date' => '2020-01-01',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/global/profit-sharing/bill-download-url')->getAsync([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'query' => [
    'sub_mchid' => '1900000109',
    'bill_date' => '2020-01-01',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/global/profit-sharing/bill-download-url']->getAsync([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'query' => [
    'sub_mchid' => '1900000109',
    'bill_date' => '2020-01-01',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->global->profitSharing->billDownloadUrl->get([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'query' => [
    'sub_mchid' => '1900000109',
    'bill_date' => '2020-01-01',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/global/profit-sharing/bill-download-url')->get([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'query' => [
    'sub_mchid' => '1900000109',
    'bill_date' => '2020-01-01',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/global/profit-sharing/bill-download-url']->get([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'query' => [
    'sub_mchid' => '1900000109',
    'bill_date' => '2020-01-01',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
download_urlstring下载地址

参阅 官方文档

Published on the GitHub by TheNorthMemory