Skip to content

查询结算资金

通过此接口可以查询结算资金的明细。

请求参数类型描述
xmlobject声明请求的XML数据结构
appidstring公众账号ID
mchidstring商户号
sub_mch_idstring子商户号
usetaginteger结算状态
offsetinteger偏移量
limitinteger最大记录条数
date_startstring开始日期
date_endstring结束日期
php
$instance->v2->pay->settlementquery->postAsync([
  'xml' => [
    'appid' => 'wxd678efh567hg6787',
    'mchid' => '1900000109',
    'sub_mch_id' => '1230000109',
    'usetag' => '1',
    'offset' => '0',
    'limit' => '10',
    'date_start' => '20150807',
    'date_end' => '20150807',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance->chain('v2/pay/settlementquery')->postAsync([
  'xml' => [
    'appid' => 'wxd678efh567hg6787',
    'mchid' => '1900000109',
    'sub_mch_id' => '1230000109',
    'usetag' => '1',
    'offset' => '0',
    'limit' => '10',
    'date_start' => '20150807',
    'date_end' => '20150807',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance['v2/pay/settlementquery']->postAsync([
  'xml' => [
    'appid' => 'wxd678efh567hg6787',
    'mchid' => '1900000109',
    'sub_mch_id' => '1230000109',
    'usetag' => '1',
    'offset' => '0',
    'limit' => '10',
    'date_start' => '20150807',
    'date_end' => '20150807',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$response = $instance->v2->pay->settlementquery->post([
  'xml' => [
    'appid' => 'wxd678efh567hg6787',
    'mchid' => '1900000109',
    'sub_mch_id' => '1230000109',
    'usetag' => '1',
    'offset' => '0',
    'limit' => '10',
    'date_start' => '20150807',
    'date_end' => '20150807',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance->chain('v2/pay/settlementquery')->post([
  'xml' => [
    'appid' => 'wxd678efh567hg6787',
    'mchid' => '1900000109',
    'sub_mch_id' => '1230000109',
    'usetag' => '1',
    'offset' => '0',
    'limit' => '10',
    'date_start' => '20150807',
    'date_end' => '20150807',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance['v2/pay/settlementquery']->post([
  'xml' => [
    'appid' => 'wxd678efh567hg6787',
    'mchid' => '1900000109',
    'sub_mch_id' => '1230000109',
    'usetag' => '1',
    'offset' => '0',
    'limit' => '10',
    'date_start' => '20150807',
    'date_end' => '20150807',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
返回字典类型描述
return_codestring返回状态码
return_msgstring返回信息
appidstring公众账号ID
mch_idstring商户号
nonce_strstring随机字符串
result_codestring业务结果
err_codestring错误代码
err_code_desstring错误代码描述
record_numstring返回数据行数
fbatchnostring付汇批次号
date_settlementstring结算日期
date_startstring交易开始日期
date_endstring交易结束日期
settlement_feeinteger划账金额
unsettlement_feeinteger未划账金额
settlementfee_typestring结算币种
pay_feeinteger支付金额
refund_feeinteger退款金额
pay_net_feeinteger支付净额
poundage_feeinteger手续费金额

参阅 官方文档

Published on the GitHub by TheNorthMemory