# 按核算单位查询台账

# 接口说明

此接口用于按核算单位查询每天的余额结余情况,服务商可以通过该接口获取每日余额结余情况用于封账

# 请求地址

https://open.wecard.qq.com/cgi-bin/pay/provider/get-recharge-balance-by-appid

# access_token 获取

参考 https://wiki.weixiao.qq.com/api/third/oauth/access_token.html

# 请求方式

GET

# 请求参数

参数 是否必填 类型 实例 说明
access_token String 应用有效凭证
start_date String 20231101 开始日期,格式为YYYYmmdd
end_date String 20231102 结束日期,格式为YYYYmmdd(仅能查询30天内的数据)
app_ids String 1010343033E,1010343033 需要查询的核算单位id,多个核算单位以英文逗号隔开

请求示例

/cgi-bin/pay/provider/get-recharge-balance-by-appid?access_token={{access_token}}&start_date=20231101&end_date=20231101&app_ids=1010343033E,1010343033

# 返回参数

参数 类型 说明
返回码 String 主体code
message String 返回说明
data date String 日期
appid String 核算单位id
app_name String 核算单位名称
balance Integer 余额(单位:分)

返回示例

{
  "code": 0,
  "data": [
    {
        "date": "20231101",
        "appid": "1010343033",
        "app_name": "默认核算单位",
        "balance": 132222
    }
  ],
  "message": "成功"
}