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

# Object

Invoice entity field reference.

| Field                 | Type               | Desc                                                                                                                                                                                                   |
| --------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| invoice\_id           | string             | Invoice ID                                                                                                                                                                                             |
| merchant\_id          | string             | Merchant ID                                                                                                                                                                                            |
| trade\_id             | string             | Trade ID                                                                                                                                                                                               |
| subscription\_id      | string             | Subscription ID                                                                                                                                                                                        |
| price\_id             | string             | Pricing plan ID                                                                                                                                                                                        |
| customer\_id          | string             | Subotiz platform `customer_id`                                                                                                                                                                         |
| order\_id             | string             | Third-party order number                                                                                                                                                                               |
| original\_invoice\_id | string             | Original invoice ID, used for refund invoices to reference the original invoice                                                                                                                        |
| refund\_order\_id     | string             | Associated refund order ID                                                                                                                                                                             |
| amount                | string             | Payment amount, truncated to two decimal places                                                                                                                                                        |
| currency              | string             | Currency                                                                                                                                                                                               |
| biz\_status           | string             | Invoice status:<br />open: Initialized<br />pending: Processing<br />success: Payment succeeded<br />failed: Payment failed<br />refunded: Fully refunded<br />partially\_refunded: Partially refunded |
| invoice\_type         | string             | Invoice type:<br />initial: Initial payment<br />trial: Trial period<br />renewal: Subscription renewal<br />refund: Refund                                                                            |
| paid\_at              | string             | Payment success time                                                                                                                                                                                   |
| cycle\_index          | int                | Current cycle index of the subscription                                                                                                                                                                |
| created\_at           | string             | Creation time                                                                                                                                                                                          |
| metadata              | map\[string]string | A set of key-value pairs that can be attached to an object, allowing you to store additional information in a structured format.                                                                       |
| Discounts             | Discounts          | Discounts applied to the invoice, including all discount information for this invoice                                                                                                                  |
| price\_version\_id    | string             | Pricing plan version ID                                                                                                                                                                                |

## Discounts

| Field           | Type                     | Desc                                  |
| :-------------- | :----------------------- | :------------------------------------ |
| current\_period | CurrentPeriodDiscount\[] | The current period's discount details |

## CurrentPeriodDiscount

| Field            | Type   | Desc                                   |
| :--------------- | :----- | :------------------------------------- |
| discount\_id     | string | The unique identifier for the discount |
| discount\_amount | string | The amount discounted                  |
| discount\_code   | string | The discount code used                 |
