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

# 进件状态查询

## 功能说明

按 `out_apply_no` 或 `merchant_code` 查询商户入驻进度及各支付机构进件明细。通知仅终态下发，中间态及通知异常时均**以本接口查询结果为准**。

* **两个查询键二选一**：`out_apply_no` 与 `merchant_code` 互斥，都传或都不传均拒绝；
* **两层状态独立**：顶层 `apply_status` 为商户入驻申请状态（商户审核驱动）；`institutions[].apply_status` 为单机构进件申请状态（机构申请单驱动），审核通过前机构层尚无申请单；
* **机构进件申请单号**：`institutions[].apply_no` 可作为[签约信息查询](https://opendocs.xft.xin/open/payment/merchant/sign-info.md)的请求键。

## 请求路径

`POST /openapi/v1/merchant/apply/query`

## 请求参数

| 字段 | 是否必填 | 字段类型 | 字段说明 |
| - | - | - | - |
| `out_apply_no` | 二选一 | String(≤64) | 申请单号，商户录入时上送；与 `merchant_code` 互斥 |
| `merchant_code` | 二选一 | String(≤64) | 平台商户号；与 `out_apply_no` 互斥 |

## 响应参数

| 字段 | 是否必填 | 字段类型 | 字段说明 |
| - | - | - | - |
| `out_apply_no` | 是 | String | 申请单号 |
| `apply_no` | 是 | String | 平台申请单号（首机构进件申请单号，报障用） |
| `merchant_code` | 是 | String | 平台商户号 |
| `merchant_name` | 是 | String | 商户名称 |
| `apply_status` | 是 | String | 商户入驻申请状态：`AUDITING`=审核中/`PASSED`=审核通过已进件或入驻/`REJECTED`=驳回 |
| `timestamp` | 是 | String | 商户状态更新时间，格式 `yyyy-MM-dd HH:mm:ss` |
| `reject_reason` | 否 | String | 商户审核驳回原因，驳回时非空 |
| `institutions` | 是 | Array | 各支付机构进件明细，元素见下表 |

`institutions[]` 元素：

| 字段 | 是否必填 | 字段类型 | 字段说明 |
| - | - | - | - |
| `institution_code` | 是 | String | 支付机构编码 |
| `institution_name` | 是 | String | 支付机构名称 |
| `apply_no` | 否 | String | 机构进件申请单号（审核通过发起进件后生成），可用于[签约信息查询](https://opendocs.xft.xin/open/payment/merchant/sign-info.md) |
| `apply_status` | 否 | String | 机构进件申请状态：`SUBMITTED`=已提交/`VERIFYING`=核身中/`SIGNING`=签约中/`COMPLETED`=已完成/`REJECTED`=驳回/`FAILED`=失败；未进件时为空 |
| `timestamp` | 否 | String | 状态更新时间，格式 `yyyy-MM-dd HH:mm:ss` |
| `institution_merchant_code` | 否 | String | 机构侧商户号 |
| `channel_return_code` | 否 | String | 渠道返回码 |
| `unionpay_merchant_no` | 否 | String | 银联商户号 |
| `wechat_sub_merchant_code` | 否 | String | 微信子商户号 |
| `alipay_sub_merchant_code` | 否 | String | 支付宝子商户号 |
| `terminal_code` | 否 | String | 终端号 |

## 示例

**请求（按申请单号）**

```json theme={"system"}
{
  "out_apply_no": "TST-20261018-CH-0012"
}
```

**响应（审核中）**

```json theme={"system"}
{
  "out_apply_no": "TST-20261018-CH-0012",
  "apply_no": "APL26101808560800002",
  "merchant_code": "801292371559190",
  "merchant_name": "杭州西湖云帆智慧零售有限公司",
  "apply_status": "AUDITING",
  "timestamp": "2026-10-18 08:56:08",
  "reject_reason": "",
  "institutions": [
    {
      "institution_code": "EASYPAY",
      "institution_name": "易生支付",
      "apply_no": "",
      "apply_status": "",
      "timestamp": "",
      "institution_merchant_code": "",
      "channel_return_code": "",
      "unionpay_merchant_no": "",
      "wechat_sub_merchant_code": "",
      "alipay_sub_merchant_code": "",
      "terminal_code": ""
    }
  ]
}
```

**响应（审核通过、机构进件完成）**

```json theme={"system"}
{
  "out_apply_no": "TST-20261018-CH-0012",
  "apply_no": "APL26101808560800002",
  "merchant_code": "801292371559190",
  "merchant_name": "杭州西湖云帆智慧零售有限公司",
  "apply_status": "PASSED",
  "timestamp": "2026-10-18 08:56:40",
  "reject_reason": "",
  "institutions": [
    {
      "institution_code": "EASYPAY",
      "institution_name": "易生支付",
      "apply_no": "APL26101808571000003",
      "apply_status": "COMPLETED",
      "timestamp": "2026-10-18 08:57:17",
      "institution_merchant_code": "890000000000001",
      "channel_return_code": "000000",
      "unionpay_merchant_no": "898110000000001",
      "wechat_sub_merchant_code": "1900000101",
      "alipay_sub_merchant_code": "2088000000000001",
      "terminal_code": "T000001"
    }
  ]
}
```

**失败示例（申请单不存在）**

```json theme={"system"}
{
  "code": 400,
  "reason": "NOT_FOUND",
  "message": "进件商户不存在: 999999999999999",
  "metadata": {}
}
```

> [!NOTE]
>
> 查询键与调用主体不匹配（非本主体录入的商户）返回 403 `PERMISSION_DENIED`；中间态无异步通知，请轮询本接口获取最新状态。


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