> ## 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.

# 子商户信息查询

## 功能说明

查询商户在各支付机构的注册信息，按支付机构返回机构商户号与微信/支付宝子商户号。进件成功后通过[审核异步通知](../merchant/apply-notify)与[进件状态查询](../merchant/apply-query)下发，本接口可查询更完整的机构侧信息。

* 商户进件到多个支付机构时，本接口按机构分组返回每条机构注册信息；
* `institution_merchant_code`（机构商户号）与 `sub_merchant_code`（微信/支付宝子商户号）未就绪时为空。

## 请求地址

`POST https://gw.xft.xin/openapi/v1/merchant/submerchants/query`

## 请求参数

| 字段              | 是否必选 | 字段类型   | 字段说明  |
| --------------- | ---- | ------ | ----- |
| `merchant_code` | 是    | String | 平台商户号 |

## 响应参数

| 字段              | 是否必选 | 字段类型   | 字段说明                       |
| --------------- | ---- | ------ | -------------------------- |
| `merchant_code` | 是    | String | 平台商户号                      |
| `institutions`  | 是    | Array  | 机构注册信息列表（按支付机构分组），元素见下方子字段 |
| `timestamp`     | 是    | int64  | 查询时间，秒级时间戳                 |

`institutions[]` 子字段：

| 字段                          | 是否必选 | 字段类型   | 字段说明                                          |
| --------------------------- | ---- | ------ | --------------------------------------------- |
| `institution_code`          | 是    | String | 支付机构编码，见[支付机构列表](../appendix/institutions)    |
| `institution_name`          | 否    | String | 机构名称（字段待确认）                                   |
| `institution_merchant_code` | 否    | String | 机构商户号：机构侧返回的商户号，未就绪时为空                        |
| `sub_merchant_code`         | 否    | String | 微信/支付宝子商户号（微信 sub\_mch\_id / 支付宝 smid），未就绪时为空 |

<Note>
  机构侧字段（`institution_name`）具体取值待确认，以联调为准。
</Note>

## 示例

**请求**

```json theme={null}
{
  "merchant_code": "M202608150001"
}
```

**响应**

```json theme={null}
{
  "merchant_code": "M202608150001",
  "institutions": [
    {
      "institution_code": "INS001",
      "institution_merchant_code": "325000001",
      "sub_merchant_code": "1900000101"
    },
    {
      "institution_code": "INS002",
      "institution_merchant_code": "666000001",
      "sub_merchant_code": "2026081500001"
    }
  ],
  "timestamp": 1755342000
}
```

**失败示例**

```json theme={null}
{
  "code": 400,
  "reason": "MERCHANT_NOT_EXIST",
  "message": "商户号不存在",
  "metadata": {}
}
```
