> ## Documentation Index
> Fetch the complete documentation index at: https://opendocs.xft.xin/llms.txt
> Use this file to discover all available pages before exploring further.

# 商户余额查询

## 功能说明

收支平台通过商户号查询商户余额汇总。

## 请求地址

`POST /balance/merchant`

## 请求参数

| 字段 | 类型 | 必填 | 说明 |
| - | - | - | - |
| `merchant_code` | string(32) | 是 | 商户号 |

## 请求示例

```json theme={"system"}
{
  "merchant_code": "226801000000868445122"
}
```

## 响应参数

| 字段 | 类型 | 说明 |
| - | - | - |
| `merchant_code` | string | 平台分配的商户号 |
| `currency` | string | 币种，默认 CNY |
| `balance_info` | object | 余额信息 |
| `balance_info.withdraw` | int | 可提现余额，提现申请审核通过的金额 |
| `balance_info.freeze` | int | 冻结余额，入金金额 - 提现成功金额 - 可提现余额 |
| `balance_info.pay` | int | 可支付余额 |

## 响应示例

```json theme={"system"}
{
  "balance_info": {
    "freeze": 0,
    "pay": 0,
    "withdraw": 0
  },
  "currency": "156",
  "merchant_code": "226801000000868445122"
}
```

## 代码示例

```java theme={"system"}
XftMybankClient client = new DefaultXftMybankClient(
    "https://xhj-sit.91xft.cn/", "111111111111", "xvnYAUWB00jEdIrkdrt5CtQQNB1x4Jhl");
XftBalanceMerchantRequest request = new XftBalanceMerchantRequest();
request.setMerchantCode("226801000000865319122");
XftBalanceMerchantResponse response = client.execute(request);
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.