> ## 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)**：结算失败（已冲正）

## 相关主题

* [实时对账报表创建](https://doc.haipay.net/zh/operations/reconcile-report-create.md)
* [对账报表查询](https://doc.haipay.net/zh/operations/reconcile-report-query.md)
* [查阅接口响应结构与错误码](https://doc.haipay.net/zh/resources/error-responses.md)
* [配置商户密钥与 RSA 签名规则](https://doc.haipay.net/zh/get-started/configuration-and-signatures.md)


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