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

# 对帐文件链接获取

> 获取对账文件下载链接，支持代收、代付、资金流水数据。

**说明：**

* **文件格式与商户后台导出的文件格式一样，当天的数据会在第二天13点后生成对帐文件**

**URL：**

`/common/document/download`

**参数：**

| 参数名   | 必选 | 类型     | 说明                               |
| :---- | :- | :----- | :------------------------------- |
| appId | 是  | Long   | 业务ID（后台获取）                       |
| type  | 是  | Long   | 类型，15:代付订单数据，20:代收订单数据，40:资金流水数据 |
| date  | 是  | String | 时间，格式yyyyMMdd                    |
| sign  | 是  | String | 签名                               |

返回data参数说明

| 参数名     | 类型     | 说明                               |
| :------ | :----- | :------------------------------- |
| appId   | Long   | 业务ID（后台获取）                       |
| type    | Long   | 类型，15:代付订单数据，20:代收订单数据，40:资金流水数据 |
| date    | String | 时间，格式yyyyMMdd                    |
| fileUrl | String | 文件下载地址                           |
| expired | String | 有效期，1小时                          |
| sign    | String | 签名                               |

### 字段说明

#### 代收

* **Error**：收款异常
* **Not Started**：未开始
* **Paying**：收款中
* **Success**：收款成功
* **Failed**：收款失败
* **Payment Part Success**：部分收款
* **Payment Excess Success**：超额收款

#### 代付

* **Submit Error**：提交异常
* **Error**：出款异常
* **Not Started**：未开始
* **Pending**：出款中
* **Success**：出款成功
* **Failed**：出款失败

#### 通知状态

* **Not Start**：未通知
* **Success**：通知成功
* **Failed**：通知失败
* **Error**：通知异常

#### 结算状态

* **Error**：异常待确认
* **Not Start**：未开始
* **Settling**：结算中
* **Success**：结算成功
* **Settlement Failed (Reversed)**：结算失败（已冲正）

## 相关主题

* [公共接口概览](/docs/zh/api/version2/CommonApi)
* [实时对账报表创建](/docs/zh/V20260801/api/version2/ReconcileReportCreate)
* [对账报表查询](/docs/zh/V20260801/api/version2/ReconcileReportQuery)
