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

# 业务对象

发票（Invoice）业务对象字段说明

| 属性名                   | 类型                 | 描述                                                                                                                             |
| --------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| invoice\_id           | string             | 发票ID                                                                                                                           |
| merchant\_id          | string             | 商户ID                                                                                                                           |
| trade\_id             | string             | 交易单ID                                                                                                                          |
| subscription\_id      | string             | 订阅ID                                                                                                                           |
| price\_id             | string             | 定价方案ID                                                                                                                         |
| customer\_id          | string             | Subotiz平台顾客ID                                                                                                                  |
| order\_id             | string             | 第三方订单号                                                                                                                         |
| original\_invoice\_id | string             | 原始发票ID，用于退款发票引用原始发票                                                                                                            |
| refund\_order\_id     | string             | 关联的退款订单ID                                                                                                                      |
| amount                | string             | 支付金额，截取两位小数                                                                                                                    |
| currency              | string             | 币种                                                                                                                             |
| biz\_status           | string             | 发票状态：<br />open: 初始化<br />pending: 处理中<br />success: 支付成功<br />failed: 支付失败<br />refunded: 全额退款<br />partially\_refunded: 部分退款 |
| invoice\_type         | string             | 发票类型：<br />initial: 首次支付<br />trial: 试用期<br />renewal: 订阅续费<br />refund: 退款                                                    |
| paid\_at              | string             | 支付成功时间                                                                                                                         |
| cycle\_index          | int                | 订阅的当前周期索引                                                                                                                      |
| created\_at           | string             | 创建时间                                                                                                                           |
| metadata              | map\[string]string | 一组可附加到对象上的键值对，允许您以结构化格式存储附加信息。                                                                                                 |
| discounts             | Discounts          | 发票上的折扣，包括此发票的所有折扣信息                                                                                                            |
| price\_version\_id    | string             | 定价方案版本 ID                                                                                                                      |

## Discounts

| 属性名             | 类型                       | 描述        |
| --------------- | ------------------------ | --------- |
| current\_period | CurrentPeriodDiscount\[] | 当前时期的折扣详情 |

## CurrentPeriodDiscount

| 属性名              | 类型     | 描述       |
| ---------------- | ------ | -------- |
| discount\_id     | string | 折扣的唯一标识符 |
| discount\_amount | string | 折扣金额     |
| discount\_code   | string | 使用的折扣代码  |
