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

# Exported resource types

## Resources

The table below provides an overview of the supported resource types, their schema, and any notes on their sync behavior:

| Resource Type                                                           | Sync Cadence | Notes                                                                                                                                                                                                                                                                                                                  |
| ----------------------------------------------------------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Accounting Period Lock](#accounting-period-lock)                       | Daily        | [Accounting Period Lock](/revenue-reporting/revenue-recognition#actions-in-the-past-and-accounting-period-locks)                                                                                                                                                                                                       |
| [Adjustment](#adjustment)                                               | Daily        | [Adjustments](/product-catalog/build-catalog#adjustments)                                                                                                                                                                                                                                                              |
| [Adjustment Interval](#adjustment-interval)                             | Daily        | [Adjustments](/product-catalog/build-catalog#adjustments)                                                                                                                                                                                                                                                              |
| [Billable Metric](#billable-metric)                                     | Daily        | [Metric](/core-concepts#metric)                                                                                                                                                                                                                                                                                        |
| [Coupon](#coupon)                                                       | Daily        | [Coupons](/product-catalog/adjustments#coupons)                                                                                                                                                                                                                                                                        |
| [Coupon Redemption](#coupon-redemption)                                 | Daily        | [How to use Coupons](/product-catalog/adjustments#coupons)                                                                                                                                                                                                                                                             |
| [Credit Ledger Entry](#credit-ledger-entry)                             | Daily        | Orb syncs all committed (i.e. non-pending) ledger entries.                                                                                                                                                                                                                                                             |
| [Credit Ledger Entry Event](#credit-ledger-entry-event)                 | Daily        | This resource represents the same data as [Credit Ledger Entry](#credit-ledger-entry), but includes additional fields to enable recognition with respect to accounting period locks.                                                                                                                                   |
| [Credit Note](#credit-note)                                             | Daily        | [Credit notes](/invoicing/credit-notes)                                                                                                                                                                                                                                                                                |
| [Credit Note Line Item](#credit-note-line-item)                         | Daily        |                                                                                                                                                                                                                                                                                                                        |
| [Credit Note Line Item Event](#credit-note-line-item-event)             | Daily        | This resource represents the same data as [Credit Note Line Item](#credit-note-line-item), but includes additional fields to enable recognition with respect to accounting period locks.                                                                                                                               |
| [Customer](/api-reference/customer/fetch-customer)                      | Daily        | [Customer](/core-concepts#customer)                                                                                                                                                                                                                                                                                    |
| [Customer Balance Transaction](#customer-balance-transaction)           | Daily        |                                                                                                                                                                                                                                                                                                                        |
| [Daily Credit Note Line Item Event](#daily-credit-note-line-item-event) | Daily        | This resource represents the same data as [Credit Note Line Item](#credit-note-line-item), but includes additional fields to enable recognition with respect to accounting period locks.                                                                                                                               |
| [Daily Line Item Revenue](#daily-line-item-revenue)                     | Daily        |                                                                                                                                                                                                                                                                                                                        |
| [Daily Line Item Revenue Event](#daily-line-item-revenue-event)         | Daily        | This resource represents the same data as [Daily Line Item Revenue](#daily-line-item-revenue), but includes additional fields to enable recognition with respect to accounting period locks.                                                                                                                           |
| [Dimensional Price Group](#dimensional-price-group)                     | Daily        | [Dimensional pricing](/product-catalog/price-configuration#dimensional-pricing)                                                                                                                                                                                                                                        |
| [Invoice Line Item Billing](#invoice-line-item-billing)                 | Daily        |                                                                                                                                                                                                                                                                                                                        |
| [Invoice Line Item Billing Event](#invoice-line-item-billing-event)     | Daily        | This resource represents the same data as [Invoice Line Item Billing](#invoice-line-item-billing), but includes additional fields to enable recognition with respect to accounting period locks.                                                                                                                       |
| [Invoice Metadata](#invoice-metadata)                                   | Daily        |                                                                                                                                                                                                                                                                                                                        |
| [Item](#item)                                                           | Daily        | [Item](/core-concepts#item)                                                                                                                                                                                                                                                                                            |
| [License](#license)                                                     | Daily        | [License allocations](/product-catalog/license-allocations)                                                                                                                                                                                                                                                            |
| [License Type](#license-type)                                           | Daily        | [License allocations](/product-catalog/license-allocations#license-type)                                                                                                                                                                                                                                               |
| [Payment Application](#payment-application)                             | Daily        | [Payments](/invoicing/payments)                                                                                                                                                                                                                                                                                        |
| [Payment Attempt](#payment-attempt)                                     | Daily        | [Payments](/invoicing/payments)                                                                                                                                                                                                                                                                                        |
| [Plan](/api-reference/plan/fetch-plan)                                  | Daily        | [Plan and Price](/core-concepts#plan-and-price)                                                                                                                                                                                                                                                                        |
| [Price](#price)                                                         | Daily        | [Plan and Price](/core-concepts#plan-and-price)                                                                                                                                                                                                                                                                        |
| [Price Interval](#price-interval)                                       | Daily        | [Plan and Price](/core-concepts#plan-and-price)                                                                                                                                                                                                                                                                        |
| [Subscription](/api-reference/subscription/fetch-subscription)          | Daily        | [Subscription](/core-concepts#subscription). The response mirrors the shape of the fetch subscription [endpoint](/api-reference/subscription/fetch-subscription). This resource excludes adjustment intervals; see the [Adjustment Interval](#adjustment-interval) and the [Adjustment](#adjustment) export resources. |
| [Subscription version](#subscription-version)                           | Daily        | This captures the [subscription schedule](/core-concepts#subscription) of a subscription, specifically allowing you to understand plan transitions.                                                                                                                                                                    |

<img src="https://mintcdn.com/orb-9bba378a/Y-mE9D86uAJ1-8i0/images/dataexportstable.png?fit=max&auto=format&n=Y-mE9D86uAJ1-8i0&q=85&s=ef0e0a29e7b449bb9ce07eceaa51285c" alt="Dataexportstable Pn" width="3024" height="1646" data-path="images/dataexportstable.png" />

## General guidance

### API-based resources

A subset of Orb's exported resources are based off of the API response shape. These are not directly defined below, but linked to the relevant API reference documentation, and may change as the API evolves. In addition, these resources often include JSON fields that require further parsing and are less well defined.

#### List of resources

The following resource schemas are dependent on the API resources:

* [Customer](/api-reference/customer/fetch-customer)
* [Invoice](/api-reference/invoice/fetch-invoice)
* [Plan](/api-reference/plan/fetch-plan)
* [Subscription](/api-reference/subscription/fetch-subscription)

<Note>
  Customer, Plan, and Subscription resources will always have deletion markers in addition to the API response shape.
</Note>

#### Nested resources

API-based resources often contain nested fields that reference *other* objects. For example, the Plan resource references Prices which are a separate, top-level resource.

Additionally, API‑based resources often include nested or “helper” fields that duplicate parts of other objects for convenience. These embedded fields are intended to make simple questions easier to answer in a single query and to keep exports readable without many joins.

<Warning>
  "Helper fields" are **snapshots** taken when the top‑level resource was last updated, and may not reflect subsequent changes to the nested objects.

  For an up‑to‑date or authoritative view, you should always join against the dedicated export for that object.
</Warning>

Dedicated resource recommendations to optimize for freshness of common helper fields:

| Snapshot helper fields                                                                       | Recommended join for dedicated alternative                                                                                                                    |
| -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Subscription<br />`current_billing_period_start_date`<br />`current_billing_period_end_date` | Invoice Metadata<br />Join on `subscription_id`, where `invoice_type` = subscription.<br />Treat `invoice_date` plus plan/price cadence as the billed period. |
| Subscription<br />`current_billing_period_start_date`<br />`current_billing_period_end_date` | Daily Line item Revenue<br />Group by `subscription_id` and `invoice_id.`<br />Use`timeframe_start, timeframe_end` as period boundaries.                      |
| Plan<br />`prices`                                                                           | Price<br />Join on `price_id`                                                                                                                                 |

## Resource schemas

### Accounting Period Lock

#### Overview

The [accounting period lock](/revenue-reporting/revenue-recognition#actions-in-the-past-and-accounting-period-locks) resource represents the history of the lock postures of monthly accounting periods in Orb.

By default, accounting period entries are initialized in Orb as open, and can be closed by a user. Orb only generates entries for accounting periods when closing open periods or opening closed periods.

* If no entries exist for any accounting periods, this means that all periods are currently open.
* If only one closed accounting period exists, this means that all periods before that closed period are also closed, and all periods after it are open.

If a closed accounting period is reopened, a new open entry for that period will be generated with the `sequence_number` incremented. Importantly, a single entry for an accounting period only describes the lock posture of that period at a certain time.

To determine the timeline of actions performed on an accounting period, reference all entries for that period in order of ascending `sequence_number`.

To determine the current state of an accounting period, reference the entry for that period with the largest `sequence_number`.

#### Schema

| Field Name                      | Type               | Description                                                                                                                                                                                                                                       |
| ------------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id                              | string             | The ID of the accounting period lock.                                                                                                                                                                                                             |
| updated\_at                     | timestamp          | The last updated date of the accounting period lock.                                                                                                                                                                                              |
| created\_at                     | nullable timestamp | The timestamp when the accounting period lock was created.                                                                                                                                                                                        |
| period\_start                   | timestamp          | The start timestamp (inclusive) of the period in the account's timezone. This timestamp is used to determine when revenue events should be recognized.                                                                                            |
| period\_end                     | timestamp          | The end timestamp (exclusive) of the period in the account's timezone. This timestamp is used to determine when revenue events should be recognized.                                                                                              |
| conceptual\_period\_start\_date | date               | The start timestamp (inclusive) of the period, at midnight UTC time. This timestamp is used to refer to accounting periods consistently.                                                                                                          |
| conceptual\_period\_end\_date   | date               | The end timestamp (exclusive) of the period, at midnight UTC time. This timestamp is used to refer to accounting periods consistently.                                                                                                            |
| locked\_at                      | nullable timestamp | The timestamp that the period was closed.                                                                                                                                                                                                         |
| unlocked\_at                    | timestamp          | The timestamp that the period was opened.                                                                                                                                                                                                         |
| locked\_by\_user\_email         | nullable string    | The email of the user who closed the period.<br /><br />Note that if the user was deleted before the resource was exported, this email may also be null.                                                                                          |
| unlocked\_by\_user\_email       | nullable string    | The email of the user who opened the period. If null, this means that this period was opened by Orb as part of initializing a period.<br /><br />Note that if the user was deleted before the resource was exported, this email may also be null. |
| sequence\_number                | int                | A key used to order accounting period lock entries in chronological order.                                                                                                                                                                        |
| deleted\_at                     | nullable timestamp | Deletion marker for this resource. If not null, then the resource has been deleted as of the time set.                                                                                                                                            |

### Adjustment

#### Overview

The adjustment resource represents a minimum, maximum, or discount that can be applied to a single price or a set of prices. See the [Adjustments](/product-catalog/build-catalog#adjustments) section for more information. The adjustment table is most useful when joining with other tables using the `adjustment_id` field. For example,

* you can see how a coupon is defined by the `adjustment_id` linked on the coupon resource
* you can better understand how an adjustment is applied onto a daily line item **revenue** resource by inspecting the `adjustment_ids` column in the [Daily Line Item Revenue](#daily-line-item-revenue) resource

#### Schema

| Field Name              | Type               | Description                                                                                                                                                                                                      |
| ----------------------- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id                      | string             | The ID of the adjustment.                                                                                                                                                                                        |
| updated\_at             | timestamp          | The last updated date of the adjustment.                                                                                                                                                                         |
| created\_at             | nullable timestamp | The timestamp when the adjustment was created.                                                                                                                                                                   |
| applies\_to\_price\_ids | string\[]          | The IDs of the prices that the adjustment applies to.                                                                                                                                                            |
| filters                 | nullable JSON      | The set of filters used to scope which prices the adjustment applies to, beyond `applies_to_price_ids`.                                                                                                          |
| adjustment\_type        | string             | The type of adjustment. Can be "minimum", "maximum", "percentage\_discount", "amount\_discount", or "usage\_discount".                                                                                           |
| adjustment\_value       | decimal            | The value of the adjustment. For percentage discounts, this is a percentage. For amount discounts, maximums, and minimums, this is an amount in the price's currency. For usage discounts, this is a percentage. |
| currency                | string             | The currency of the adjustment. This is determined by the price's currency.                                                                                                                                      |
| reason                  | nullable string    | The reason for the adjustment.                                                                                                                                                                                   |
| item\_id                | nullable string    | The ID of the item, as it appears on an invoice. This is only applicable for minimums.                                                                                                                           |
| is\_invoice\_level      | boolean            | Whether the adjustment is an invoice level adjustment or price-level adjustment.                                                                                                                                 |
| is\_trial               | boolean            | Whether the adjustment represents a trial discount.                                                                                                                                                              |
| plan\_id                | nullable string    | The ID of the plan, if the adjustment is associated with a plan.                                                                                                                                                 |
| plan\_phase\_order      | nullable int       | The order of the plan phase, if the adjustment is associated with a plan and phase.                                                                                                                              |
| min\_plan\_version      | nullable int       | The minimum plan version, if the adjustment is associated with a plan and version.                                                                                                                               |
| max\_plan\_version      | nullable int       | The maximum plan version, if the adjustment is associated with a plan and version.                                                                                                                               |
| deleted\_at             | nullable timestamp | Deletion marker for this resource. If not null, then the resource has been deleted as of the time set.                                                                                                           |

### Adjustment Interval

#### Overview

The adjustment interval resource represents a time frame during which an adjustment applies to a subscription. [See editing subscriptions](/product-catalog/editing-subscriptions) and [add or edit price intervals](/api-reference/price-interval/add-or-edit-price-intervals) for more information.

#### Schema

| Field Name                        | Type               | Description                                                                                            |
| --------------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------ |
| id                                | string             | The ID of the adjustment interval.                                                                     |
| updated\_at                       | timestamp          | The last updated date of the adjustment interval.                                                      |
| created\_at                       | nullable timestamp | The timestamp when the adjustment interval was created.                                                |
| subscription\_id                  | string             | The ID of the subscription.                                                                            |
| customer\_id                      | string             | The ID of the customer.                                                                                |
| adjustment\_id                    | string             | The ID of the adjustment.                                                                              |
| applies\_to\_price\_interval\_ids | JSON               | The IDs of the price intervals that the adjustment applies to.                                         |
| start\_time\_inclusive            | timestamp          | The start date of the adjustment interval.                                                             |
| end\_time\_exclusive              | nullable timestamp | The end date of the adjustment interval, if defined.                                                   |
| deleted\_at                       | nullable timestamp | Deletion marker for this resource. If not null, then the resource has been deleted as of the time set. |

### Billable Metric

#### Overview

A billable metric defines an aggregation over usage events.

#### Schema

| Field Name  | Type               | Description                                                                                            |
| ----------- | ------------------ | ------------------------------------------------------------------------------------------------------ |
| id          | string             | The ID of the billable metric.                                                                         |
| updated\_at | timestamp          | The last updated date of the billable metric.                                                          |
| created\_at | nullable timestamp | The timestamp when the billable metric was created.                                                    |
| metadata    | json               | User specified key-value pairs for the resource. If not present, this defaults to an empty dictionary. |
| name        | string             | The user provided name of this billable metric.                                                        |
| description | string             | The user provided description of this billable metric.                                                 |
| item\_id    | string             | The id of the item, see the [Item](#item) export.                                                      |
| status      | string             | Available options: active, draft, or archived.                                                         |
| deleted\_at | nullable timestamp | Deletion marker for this resource. If not null, then the resource has been deleted as of the time set. |

### Coupon

#### Overview

A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription.

#### Schema

| Field Name           | Type               | Description                                                                                                                                                |
| -------------------- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id                   | string             | The ID of the coupon.                                                                                                                                      |
| updated\_at          | timestamp          | The last updated date of the coupon.                                                                                                                       |
| created\_at          | nullable timestamp | The timestamp when the coupon was created.                                                                                                                 |
| redemption\_code     | string             | This string can be used to redeem this coupon for a given subscription.                                                                                    |
| discount             | json               | A JSON blob representing either a PercentageDiscount or AmountDiscount                                                                                     |
| times\_redeemed      | int                | The number of times this coupon has been redeemed.                                                                                                         |
| duration\_in\_months | nullable int       | This allows for a coupon's discount to apply for a limited time (determined in months); a null value here means "unlimited time".                          |
| max\_redemptions     | nullable int       | The maximum number of redemptions allowed for this coupon before it is exhausted; null here means "unlimited".                                             |
| archived\_at         | nullable timestamp | An archived coupon can no longer be redeemed. Active coupons will have a value of null for archived\_at; this field will be non-null for archived coupons. |
| deleted\_at          | nullable timestamp | Deletion marker for this resource. If not null, then the resource has been deleted as of the time set.                                                     |

### Coupon Redemption

#### Overview

The Coupon Redemption resource type represents a coupon that has been redeemed by a customer.

#### Schema

| Field Name       | Type               | Description                                                                                            |
| ---------------- | ------------------ | ------------------------------------------------------------------------------------------------------ |
| id               | string             | The ID of the coupon redemption.                                                                       |
| updated\_at      | timestamp          | The last updated date of the coupon redemption.                                                        |
| created\_at      | nullable timestamp | The timestamp when the coupon redemption was created.                                                  |
| start\_date      | timestamp          | The start date of the coupon redemption.                                                               |
| end\_date        | nullable timestamp | An optional end date of the coupon redemption.                                                         |
| coupon\_id       | string             | The ID of the coupon.                                                                                  |
| adjustment\_id   | string             | The ID of the adjustment.                                                                              |
| subscription\_id | string             | The ID of the subscription.                                                                            |
| customer\_id     | string             | The ID of the customer.                                                                                |
| unredeemed\_time | nullable timestamp | An optional timestamp of when the coupon was unredeemed, if it was unredeemed.                         |
| deleted\_at      | nullable timestamp | Deletion marker for this resource. If not null, then the resource has been deleted as of the time set. |

### Credit Ledger Entry

#### Overview

The Credit ledger entry resource represents the various operations that occur for each credit block (e.g. increments and decrements). This resource is helpful to understand how a credit block gets burned down.

#### Schema

| Field Name               | Type               | Description                                                      |
| ------------------------ | ------------------ | ---------------------------------------------------------------- |
| id                       | string             | The ID of the credit ledger entry.                               |
| updated\_at              | timestamp          | The last updated date of the credit ledger entry.                |
| created\_at              | timestamp          | The timestamp when the credit ledger entry was created.          |
| reverted\_at             | nullable timestamp | If set, the time at which this entry was reverted.               |
| amount                   | string             | The amount that was applied on this credit ledger entry.         |
| credit\_block            | JSONB              | The associated credit block for this entry                       |
| currency                 | string             | The currency of the credit ledger entry.                         |
| customer                 | JSONB              | The customer record associated with this entry.                  |
| description              | nullable string    | An optional description of the entry.                            |
| starting\_balance        | string             | The beginning balance of the ledger.                             |
| ending\_balance          | string             | The ending balance of the ledger.                                |
| entry\_status            | string             | The status of the ledger entry.                                  |
| entry\_type              | string             | The type of the ledger entry.                                    |
| invoice\_id              | nullable string    | If set, the relevant invoice this entry applies to.              |
| invoice\_line\_item\_id  | nullable string    | If set, the relevant invoice line item ID this entry applies to. |
| ledger\_sequence\_number | integer            | The sequence number of the ledger entry.                         |
| metadata                 | nullable JSON      | If set, the metadata attached to this ledger entry.              |
| new\_block\_expiry\_date | nullable timestamp | If set, the time at which this expiry has been updated to.       |
| price\_id                | nullable string    | If set, the relevant price identifier.                           |
| event\_id                | nullable string    | If set, the ID of the event associated with this ledger entry.   |
| void\_amount             | nullable string    | If set, the amount of the increment that was voided.             |
| void\_reason             | nullable string    | If set, the reason for the increment being voided.               |

### Credit Ledger Entry Event

#### Overview

This resource represents the same data as [Credit Ledger Entry](#credit-ledger-entry), but also includes `timestamp`, `lock_adjusted_timestamp`, and `is_revert` fields, enabling the recognition of credit block operations with respect to the [accounting period lock posture at the time of the operations](/data-exports/best-practices#lock-adjusted-timestamps).

#### Schema

| Field Name                  | Type               | Description                                                                                                                                          |
| --------------------------- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| id                          | string             | A composite ID of the form `{source_id}-{is_revert}`.                                                                                                |
| updated\_at                 | timestamp          | The last updated date of the credit ledger entry.                                                                                                    |
| created\_at                 | nullable timestamp | The timestamp when the credit ledger entry was created.                                                                                              |
| source\_id                  | string             | The ID of the credit ledger entry.                                                                                                                   |
| is\_revert                  | boolean            | Whether this entry represents a creation or revert event.                                                                                            |
| timestamp                   | timestamp          | The original time that this entry was created or reverted in Orb.                                                                                    |
| lock\_adjusted\_timestamp   | timestamp          | The time that this entry should be recognized based on the accounting period lock posture.                                                           |
| amount                      | decimal            | The amount that was applied on this credit ledger entry.                                                                                             |
| currency                    | string             | The currency of the credit ledger entry.                                                                                                             |
| invoicing\_currency         | nullable string    | The currency used for invoicing if it differs from the price's currency. <br /><br />Today, this only occurs if you are using virtual pricing units. |
| customer\_id                | string             | The customer ID associated with this entry.                                                                                                          |
| description                 | nullable string    | An optional description of the entry.                                                                                                                |
| starting\_balance           | decimal            | The beginning balance of the ledger.                                                                                                                 |
| ending\_balance             | decimal            | The ending balance of the ledger.                                                                                                                    |
| entry\_status               | string             | The status of the ledger entry.                                                                                                                      |
| entry\_type                 | string             | The type of the ledger entry.                                                                                                                        |
| invoice\_id                 | nullable string    | If set, the relevant invoice this entry applies to.                                                                                                  |
| invoice\_line\_item\_id     | nullable string    | If set, the relevant invoice line item ID this entry applies to.                                                                                     |
| ledger\_sequence\_number    | integer            | The sequence number of the ledger entry.                                                                                                             |
| block\_id                   | nullable string    | If set, the associated credit block ID for this entry.                                                                                               |
| cost\_basis                 | nullable decimal   | If set, the associated credit block cost basis for this entry.                                                                                       |
| block\_expiry\_date         | nullable timestamp | If set, the associated credit block's expiry date for this entry.                                                                                    |
| metadata                    | nullable JSON      | If set, the metadata attached to this ledger entry.                                                                                                  |
| new\_block\_expiry\_date    | nullable timestamp | If set, the time at which this expiry has been updated to.                                                                                           |
| price\_id                   | nullable string    | If set, the relevant price identifier.                                                                                                               |
| recognized\_revenue\_amount | nullable decimal   | If set, the converted amount recognized.                                                                                                             |
| void\_amount                | nullable string    | If set, the amount of the increment that was voided.                                                                                                 |
| void\_reason                | nullable string    | If set, the reason for the increment being voided.                                                                                                   |
| deleted\_at                 | nullable timestamp | Deletion marker for this resource. If not null, then the resource has been deleted as of the time set.                                               |

### Credit note

#### Overview

The Credit note resource type represents a credit note that has been issued to a customer. A credit note is a document that can be used to decrease the amount due or issue a credit for an already issued invoice.

#### Schema

| Field Name           | Type               | Description                                                                                                                     |
| -------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
| id                   | string             | The ID of the credit note.                                                                                                      |
| updated\_at          | timestamp          | The last updated date of the credit note.                                                                                       |
| created\_at          | timestamp          | The timestamp when the credit note was created.                                                                                 |
| voided\_at           | nullable timestamp | The time at which the credit note was voided in Orb, if applicable.                                                             |
| credit\_note\_number | string             | The unique identifier for credit notes.                                                                                         |
| invoice\_id          | string             | The id of the invoice resource that this credit note is applied to.                                                             |
| memo                 | nullable string    | An optional memo supplied on the credit note.                                                                                   |
| reason               | nullable string    | An optional reason for the credit note. Available options: "Duplicate", "Fraudulent", "Order change", "Product unsatisfactory". |
| type                 | string             | The type of credit note. Available options: `refund`, `adjustment`.                                                             |
| currency             | string             | The currency of the credit note.                                                                                                |
| subtotal             | string             | The total prior to any creditable invoice-level discounts or minimums.                                                          |
| total                | string             | The total including creditable invoice-level discounts or minimums, and tax.                                                    |
| customer\_id         | string             | The id of the customer resource that this credit note is applied to.                                                            |
| credit\_note\_pdf    | nullable string    | A URL to a PDF of the credit note.                                                                                              |
| deleted\_at          | nullable timestamp | Deletion marker for this resource. If not null, then the resource has been deleted as of the time set.                          |

### Credit Note Line Item

#### Overview

The Credit Note Line Item resource type represents a line item that is associated with a credit note.

#### Schema

| Field Name       | Type               | Description                                                                                                                                                                                      |
| ---------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| id               | string             | The ID of the credit note line item.                                                                                                                                                             |
| updated\_at      | timestamp          | The last updated date of the credit note line item.                                                                                                                                              |
| created\_at      | timestamp          | The timestamp when the credit note line item was created.                                                                                                                                        |
| voided\_at       | nullable timestamp | The date and time when the credit note was voided.                                                                                                                                               |
| credit\_note\_id | string             | The ID of the credit note.                                                                                                                                                                       |
| name             | string             | The name of the corresponding invoice line item.                                                                                                                                                 |
| amount           | string             | The amount of the line item, excluding any line item minimums and discounts.                                                                                                                     |
| quantity         | nullable number    | An optional quantity credited.                                                                                                                                                                   |
| tax\_amounts     | dict\[]            | Any tax amounts applied onto the line item.                                                                                                                                                      |
| deleted\_at      | nullable timestamp | Deletion marker for this resource. If not null, then the resource has been deleted as of the time set.                                                                                           |
| timeframe\_start | nullable timestamp | The inclusive timestamp for the start of the relevant period. <br /><br />Note that entries are scoped to day boundaries, but may start or end in the middle of the day if a plan change occurs. |
| timeframe\_end   | nullable timestamp | The exclusive timestamp for the end of the relevant period. <br /><br />Note that entries are scoped to day boundaries, but may start or end in the middle of the day if a plan change occurs.   |
| line\_item\_id   | nullable string    | The ID of the line item                                                                                                                                                                          |
| item\_id         | nullable string    | The ID of the product or service item                                                                                                                                                            |
| block\_id        | nullable string    | If set, the associated credit block ID for this line item.                                                                                                                                       |
| total            | nullable decimal   | The total amount of the line item, excluding tax                                                                                                                                                 |
| total\_with\_tax | nullable decimal   | The total amount of the line item, including tax                                                                                                                                                 |

### Credit Note Line Item Event

#### Overview

This resource represents the same data as [Credit Note Line Item](#credit-note-line-item), but also includes `timestamp`, `lock_adjusted_timestamp`, and `is_revert` fields, enabling the recognition of credit note line items with respect to the [accounting period lock posture at the time of credit note issuance](/data-exports/best-practices#lock-adjusted-timestamps).

#### Schema

| Field Name                | Type               | Description                                                                                                                                                                                      |
| ------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| id                        | string             | A composite ID of the form `{source_id}-{is_revert}`.                                                                                                                                            |
| updated\_at               | timestamp          | The last updated date of the credit note line item.                                                                                                                                              |
| created\_at               | nullable timestamp | The timestamp when the credit note line item was created.                                                                                                                                        |
| source\_id                | string             | The ID of the credit note line item.                                                                                                                                                             |
| is\_revert                | boolean            | Whether this entry represents a creation or revert event.                                                                                                                                        |
| timestamp                 | timestamp          | The original time that this entry was created or reverted in Orb.                                                                                                                                |
| lock\_adjusted\_timestamp | timestamp          | The time that this entry should be recognized based on the accounting period lock posture.                                                                                                       |
| credit\_note\_id          | string             | The ID of the credit note.                                                                                                                                                                       |
| invoice\_id               | string             | The ID of the associated invoice.                                                                                                                                                                |
| customer\_id              | nullable string    | The ID of the customer.                                                                                                                                                                          |
| name                      | string             | The name of the corresponding invoice line item.                                                                                                                                                 |
| quantity                  | nullable number    | The quantity credited.                                                                                                                                                                           |
| tax\_amounts              | dict\[]            | Any tax amounts applied onto the line item.                                                                                                                                                      |
| deleted\_at               | nullable timestamp | Deletion marker for this resource. If not null, then the resource has been deleted as of the time set.                                                                                           |
| timeframe\_start          | nullable timestamp | The inclusive timestamp for the start of the relevant period. <br /><br />Note that entries are scoped to day boundaries, but may start or end in the middle of the day if a plan change occurs. |
| timeframe\_end            | nullable timestamp | The exclusive timestamp for the end of the relevant period. <br /><br />Note that entries are scoped to day boundaries, but may start or end in the middle of the day if a plan change occurs.   |
| invoice\_line\_item\_id   | nullable string    | The ID of the invoice line item.                                                                                                                                                                 |
| invoicing\_currency       | nullable string    | The currency used for invoicing if it differs from the price's currency. <br /><br />Today, this only occurs if you are using virtual pricing units.                                             |
| item\_id                  | nullable string    | The ID of the product or service item.                                                                                                                                                           |
| block\_id                 | nullable string    | If set, the associated credit block ID for this line item.                                                                                                                                       |
| total                     | nullable decimal   | The total amount of the line item, excluding tax.                                                                                                                                                |
| total\_with\_tax          | nullable decimal   | The total amount of the line item, including tax.                                                                                                                                                |

### Customer Balance Transaction

#### Overview

The customer balance is an amount in the customer's currency, which Orb automatically applies to subsequent invoices. This balance can be adjusted manually via Orb's webapp on the customer details page.

#### Schema

| Field Name        | Type               | Description                                                                                                                                                                                         |
| ----------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id                | string             | The ID of the customer balance transaction.                                                                                                                                                         |
| updated\_at       | timestamp          | The last updated date of the customer balance transaction.                                                                                                                                          |
| created\_at       | timestamp          | The timestamp when the customer balance transaction was created.                                                                                                                                    |
| starting\_balance | decimal            | The original value of the customer's balance prior to the transaction, in the customer's currency.                                                                                                  |
| ending\_balance   | decimal            | The new value of the customer's balance after the transaction, in the customer's currency.                                                                                                          |
| amount            | decimal            | The value of the amount changed in the transaction.                                                                                                                                                 |
| action            | string             | Available options: `applied_to_invoice`, `manual_adjustment`, `prorated_refund`, `revert_prorated_refund`, `return_from_voiding`, `credit_note_applied`, `credit_note_voided`, `overpayment_refund` |
| type              | string             | Available options: `increment`, `decrement`                                                                                                                                                         |
| description       | nullable string    | An optional description provided for manual customer balance adjustments.                                                                                                                           |
| invoice\_id       | nullable string    | An optional ID if there is an associated invoice.                                                                                                                                                   |
| credit\_note\_id  | nullable string    | An optional ID if there is an associated credit note.                                                                                                                                               |
| customer\_id      | string             | The ID of the customer.                                                                                                                                                                             |
| deleted\_at       | nullable timestamp | Deletion marker for this resource. If not null, then the resource has been deleted as of the time set.                                                                                              |

### Daily Credit Note Line Item Event

#### Overview

This resource represents the same data as [Credit Note Line Item](#credit-note-line-item), but also includes `timestamp`, `lock_adjusted_timestamp`, and `is_revert` fields, enabling the recognition of credit note line items with respect to the [accounting period lock posture at the time of credit note issuance](/data-exports/best-practices#lock-adjusted-timestamps). Entries are scoped to day boundaries.

#### Schema

| Field Name                | Type               | Description                                                                                                                                                                                      |
| ------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| id                        | string             | A composite ID of the form `{source_id}-{is_revert}`.                                                                                                                                            |
| updated\_at               | timestamp          | The last updated date of the credit note line item.                                                                                                                                              |
| created\_at               | nullable timestamp | The timestamp when the credit note line item was created.                                                                                                                                        |
| source\_id                | string             | The ID of the credit note line item.                                                                                                                                                             |
| is\_revert                | boolean            | Whether this entry represents a creation or revert event.                                                                                                                                        |
| timestamp                 | timestamp          | The original time that this entry was created or reverted in Orb.                                                                                                                                |
| lock\_adjusted\_timestamp | timestamp          | The time that this entry should be recognized based on the accounting period lock posture.                                                                                                       |
| credit\_note\_id          | string             | The ID of the credit note.                                                                                                                                                                       |
| invoice\_id               | string             | The ID of the associated invoice.                                                                                                                                                                |
| invoice\_line\_item\_id   | nullable string    | The ID of the invoice line item.                                                                                                                                                                 |
| customer\_id              | nullable string    | The ID of the customer.                                                                                                                                                                          |
| invoicing\_currency       | nullable string    | The currency used for invoicing. Since credit notes are always issued after invoice issuance, there is only ever one currency.                                                                   |
| name                      | string             | The name of the corresponding invoice line item.                                                                                                                                                 |
| item\_id                  | nullable string    | The ID of the product or service item.                                                                                                                                                           |
| block\_id                 | nullable string    | If set, the associated credit block ID for this line item.                                                                                                                                       |
| timeframe\_start          | nullable timestamp | The inclusive timestamp for the start of the relevant period. <br /><br />Note that entries are scoped to day boundaries, but may start or end in the middle of the day if a plan change occurs. |
| timeframe\_end            | nullable timestamp | The exclusive timestamp for the end of the relevant period. <br /><br />Note that entries are scoped to day boundaries, but may start or end in the middle of the day if a plan change occurs.   |
| total                     | nullable decimal   | The total amount of the line item, excluding tax.                                                                                                                                                |
| deleted\_at               | nullable timestamp | Deletion marker for this resource. If not null, then the resource has been deleted as of the time set.                                                                                           |

### Daily Line Item Revenue

#### Overview

The Daily Line Item Revenue resource type can be used to track the daily quantity and associated costs for invoice line items. This resource type will function similarly to the [subscription costs endpoint](/api-reference/subscription/fetch-subscription-costs), but with more fine grained access to information.

This information can be used to power use cases like:

* Daily revenue recognition workflows
* Running pricing exercises

As mentioned, this resource will track daily quantities, but will reflect intra-day plan changes where applicable. This means that rows may span time periods less than a day in cases where a plan changes. Values in the export are periodic values (as opposed to cumulative values) and only relevant to the applicable timeframe.

The Daily Line Item Revenue resource type is conceptually an append only resource type. Entries in this table can be reverted. For example, when a backdated operation occurs, this may result in old values changing. When entries are reverted, they will have a corresponding timestamp in their `reverted_at` field but will still exist in the table. This means that historical queries can be constructed to understand what values were returned in the past.

The Daily Line Item Revenue resource type relies on upstream processes running to calculate these values. Importantly, this processing relies on the grace period ending before it can run. This means that entries in this resource type will be delayed. On average, we expect this delay to be approximately three days.

#### Schema

| Field Name                   | Type                                                                                                                                                                                      | Description                                                                                                                                                                                                                                                                                                                                                                          |
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| id                           | string                                                                                                                                                                                    | The ID of the daily line item revenue object.                                                                                                                                                                                                                                                                                                                                        |
| updated\_at                  | timestamp                                                                                                                                                                                 | The last updated date of the daily line item revenue object.                                                                                                                                                                                                                                                                                                                         |
| created\_at                  | nullable timestamp                                                                                                                                                                        | The timestamp when the daily line item revenue object was created.                                                                                                                                                                                                                                                                                                                   |
| customer\_id                 | string                                                                                                                                                                                    | The ID of the customer.                                                                                                                                                                                                                                                                                                                                                              |
| subscription\_id             | nullable string                                                                                                                                                                           | The ID of the subscription. <br /><br />Note that a subscription ID may not always be present due to things like one-off invoices.                                                                                                                                                                                                                                                   |
| pricing\_currency            | string                                                                                                                                                                                    | The currency of the underlying price.                                                                                                                                                                                                                                                                                                                                                |
| invoicing\_currency          | nullable string                                                                                                                                                                           | The currency used for invoicing if it differs from the price's currency. <br /><br />Today, this only occurs if you are using virtual pricing units.                                                                                                                                                                                                                                 |
| item\_id                     | string                                                                                                                                                                                    | The ID of the item                                                                                                                                                                                                                                                                                                                                                                   |
| invoice\_id                  | string                                                                                                                                                                                    | The ID of the invoice                                                                                                                                                                                                                                                                                                                                                                |
| invoice\_line\_item\_id      | string                                                                                                                                                                                    | The ID of the invoice line item                                                                                                                                                                                                                                                                                                                                                      |
| price\_id                    | string                                                                                                                                                                                    | The ID of the price                                                                                                                                                                                                                                                                                                                                                                  |
| billable\_metric\_id         | nullable string                                                                                                                                                                           | The ID of the billable metric. <br /><br />Note that a billable metric ID may not be present if the associated price is not usage based.                                                                                                                                                                                                                                             |
| plan\_id                     | nullable string                                                                                                                                                                           | The ID of the plan. <br /><br />Note that it may not always be present due to things like one-off invoices.                                                                                                                                                                                                                                                                          |
| timeframe\_start             | timestamp                                                                                                                                                                                 | The inclusive timestamp for the start of the relevant period. <br /><br />Note that entries are scoped to day boundaries, but may start or end in the middle of the day if a plan change occurs.                                                                                                                                                                                     |
| timeframe\_end               | timestamp                                                                                                                                                                                 | The exclusive timestamp for the end of the relevant period. <br /><br />Note that entries are scoped to day boundaries, but may start or end in the middle of the day if a plan change occurs.                                                                                                                                                                                       |
| line\_item\_start\_date      | timestamp                                                                                                                                                                                 | The start date of the associated line item.                                                                                                                                                                                                                                                                                                                                          |
| line\_item\_end\_date        | timestamp                                                                                                                                                                                 | The end date of the associated line item.                                                                                                                                                                                                                                                                                                                                            |
| invoice\_date                | nullable timestamp                                                                                                                                                                        | The invoice date.                                                                                                                                                                                                                                                                                                                                                                    |
| quantity                     | decimal                                                                                                                                                                                   | The price's quantity for the relevant timeframe.                                                                                                                                                                                                                                                                                                                                     |
| subtotal                     | decimal                                                                                                                                                                                   | The list price before any adjustments have been applied.                                                                                                                                                                                                                                                                                                                             |
| adjusted\_subtotal           | decimal                                                                                                                                                                                   | The list price after adjustments have been applied. <br /><br />Called the "total" in the subscription costs API. This has been renamed to avoid confusion.                                                                                                                                                                                                                          |
| amount                       | decimal                                                                                                                                                                                   | The list price after: adjustments have been applied, prepaid credits have been applied, license allocations and license overage write-offs have been applied, overage conversions have been applied, and partial invoice amounts have been applied.                                                                                                                                  |
| rounded\_amount              | decimal                                                                                                                                                                                   | The amount after rounding occurs. If no rounding occurs, this value will be the same as `amount`. This value does not include tax.                                                                                                                                                                                                                                                   |
| credits\_applied             | decimal                                                                                                                                                                                   | The number of credits used.                                                                                                                                                                                                                                                                                                                                                          |
| license\_allocation\_applied | nullable decimal                                                                                                                                                                          | The amount of license allocation applied to this line item. Only populated for line items whose usage drew down from a license allocation.                                                                                                                                                                                                                                           |
| license\_allocation\_overage | nullable decimal                                                                                                                                                                          | The license allocation overage written off for this line item. Only non-zero when the license allocation is configured to write off overage.                                                                                                                                                                                                                                         |
| conversion\_rate             | decimal                                                                                                                                                                                   | The conversion rate between the price currency and the invoicing currency. <br /><br />If they are the same, this is 1.                                                                                                                                                                                                                                                              |
| adjustments                  | JSONB<br /><br />An array of dictionaries with: adjustment ID, adjustment type, amount, and price IDs.                                                                                    | The adjustments made to line items to account for maximums, minimums, and discounts.                                                                                                                                                                                                                                                                                                 |
| sub\_line\_items             | nullable JSONB<br /><br />If this field is null, the number of sub-line items exceeds 500. This is differentiated from cases with no sub-line items, where the column will be empty JSON. | The serialized sub-line items from the invoice. <br /><br />This field can contain up to 500 sub-line items for a given line item. If the number of sub-line items exceeds 500, this field will not contain any sub-line items.                                                                                                                                                      |
| is\_partial\_invoice         | boolean                                                                                                                                                                                   | True if this line item was part of a [Threshold invoice](https://docs.withorb.com/reference/create-subscription#threshold-billing)                                                                                                                                                                                                                                                   |
| partially\_invoiced\_amount  | nullable decimal                                                                                                                                                                          | If this is from a threshold invoice, the amount that was partially invoiced.                                                                                                                                                                                                                                                                                                         |
| reverted\_at                 | nullable timestamp                                                                                                                                                                        | When this entry was reverted. <br /><br />Entries are reverted when backdated operations occur that change the amounts for a given invoice line item on a specified day. Entries are never deleted and are only marked as reverted to allow for historical tracking of values returned on a given day in the past. <br /><br />A row is valid in this table if reverted\_at is null. |

### Daily Line Item Revenue Event

#### Overview

This resource represents the same data as [Daily Line Item Revenue](#daily-line-item-revenue), but also includes `timestamp`, `lock_adjusted_timestamp`, and `is_revert` fields, enabling revenue recognition with respect to the [accounting period lock posture at the time of original recognition](/data-exports/best-practices#lock-adjusted-timestamps).

#### Schema

| Field Name                   | Type                                                                                                                                                                                      | Description                                                                                                                                                                                                                                         |
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id                           | string                                                                                                                                                                                    | A composite ID of the form `{source_id}-{is_revert}`.                                                                                                                                                                                               |
| updated\_at                  | timestamp                                                                                                                                                                                 | The last updated date of the daily line item revenue object.                                                                                                                                                                                        |
| created\_at                  | nullable timestamp                                                                                                                                                                        | The timestamp when the daily line item revenue object was created.                                                                                                                                                                                  |
| source\_id                   | string                                                                                                                                                                                    | The ID of the daily line item revenue object.                                                                                                                                                                                                       |
| is\_revert                   | boolean                                                                                                                                                                                   | Whether this entry represents a creation or revert event.                                                                                                                                                                                           |
| timestamp                    | timestamp                                                                                                                                                                                 | The original time that this entry was created or reverted in Orb.                                                                                                                                                                                   |
| lock\_adjusted\_timestamp    | timestamp                                                                                                                                                                                 | The time that this entry should be recognized based on the accounting period lock posture.                                                                                                                                                          |
| customer\_id                 | string                                                                                                                                                                                    | The ID of the customer.                                                                                                                                                                                                                             |
| subscription\_id             | nullable string                                                                                                                                                                           | The ID of the subscription. <br /><br />Note that a subscription ID may not always be present due to things like one-off invoices.                                                                                                                  |
| pricing\_currency            | string                                                                                                                                                                                    | The currency of the underlying price.                                                                                                                                                                                                               |
| invoicing\_currency          | nullable string                                                                                                                                                                           | The currency used for invoicing if it differs from the price's currency. <br /><br />Today, this only occurs if you are using virtual pricing units.                                                                                                |
| item\_id                     | string                                                                                                                                                                                    | The ID of the item                                                                                                                                                                                                                                  |
| invoice\_id                  | string                                                                                                                                                                                    | The ID of the invoice                                                                                                                                                                                                                               |
| invoice\_line\_item\_id      | string                                                                                                                                                                                    | The ID of the invoice line item                                                                                                                                                                                                                     |
| price\_id                    | string                                                                                                                                                                                    | The ID of the price                                                                                                                                                                                                                                 |
| billable\_metric\_id         | nullable string                                                                                                                                                                           | The ID of the billable metric. <br /><br />Note that a billable metric ID may not be present if the associated price is not usage based.                                                                                                            |
| plan\_id                     | nullable string                                                                                                                                                                           | The ID of the plan. <br /><br />Note that it may not always be present due to things like one-off invoices.                                                                                                                                         |
| timeframe\_start             | timestamp                                                                                                                                                                                 | The inclusive timestamp for the start of the relevant period. <br /><br />Note that entries are scoped to day boundaries, but may start or end in the middle of the day if a plan change occurs.                                                    |
| timeframe\_end               | timestamp                                                                                                                                                                                 | The exclusive timestamp for the end of the relevant period. <br /><br />Note that entries are scoped to day boundaries, but may start or end in the middle of the day if a plan change occurs.                                                      |
| line\_item\_start\_date      | nullable timestamp                                                                                                                                                                        | The start date of the associated line item.                                                                                                                                                                                                         |
| line\_item\_end\_date        | nullable timestamp                                                                                                                                                                        | The end date of the associated line item.                                                                                                                                                                                                           |
| invoice\_date                | nullable timestamp                                                                                                                                                                        | The invoice date.                                                                                                                                                                                                                                   |
| quantity                     | decimal                                                                                                                                                                                   | The price's quantity for the relevant timeframe.                                                                                                                                                                                                    |
| subtotal                     | decimal                                                                                                                                                                                   | The list price before any adjustments have been applied.                                                                                                                                                                                            |
| adjusted\_subtotal           | decimal                                                                                                                                                                                   | The list price after adjustments have been applied. <br /><br />Called the "total" in the subscription costs API. This has been renamed to avoid confusion.                                                                                         |
| amount                       | decimal                                                                                                                                                                                   | The list price after: adjustments have been applied, prepaid credits have been applied, license allocations and license overage write-offs have been applied, overage conversions have been applied, and partial invoice amounts have been applied. |
| rounded\_amount              | decimal                                                                                                                                                                                   | The amount after rounding occurs. If no rounding occurs, this value will be the same as `amount`. This value does not include tax.                                                                                                                  |
| correction\_amount           | nullable decimal                                                                                                                                                                          | The amount of corrections applied to the line item, reflected in `rounded_amount`.                                                                                                                                                                  |
| credits\_applied             | decimal                                                                                                                                                                                   | The number of credits used.                                                                                                                                                                                                                         |
| license\_allocation\_applied | nullable decimal                                                                                                                                                                          | The amount of license allocation applied to this line item. Only populated for line items whose usage drew down from a license allocation.                                                                                                          |
| license\_allocation\_overage | nullable decimal                                                                                                                                                                          | The license allocation overage written off for this line item. Only non-zero when the license allocation is configured to write off overage.                                                                                                        |
| conversion\_rate             | decimal                                                                                                                                                                                   | The conversion rate between the price currency and the invoicing currency. <br /><br />If they are the same, this is 1.                                                                                                                             |
| adjustments                  | JSONB<br /><br />An array of dictionaries with: adjustment ID, adjustment type, amount, and price IDs.                                                                                    | The adjustments made to line items to account for maximums, minimums, and discounts.                                                                                                                                                                |
| sub\_line\_items             | nullable JSONB<br /><br />If this field is null, the number of sub-line items exceeds 500. This is differentiated from cases with no sub-line items, where the column will be empty JSON. | The serialized sub-line items from the invoice. <br /><br />This field can contain up to 500 sub-line items for a given line item. If the number of sub-line items exceeds 500, this field will not contain any sub-line items.                     |
| is\_partial\_invoice         | boolean                                                                                                                                                                                   | True if this line item was part of a [Threshold invoice](https://docs.withorb.com/reference/create-subscription#threshold-billing)                                                                                                                  |
| partially\_invoiced\_amount  | nullable decimal                                                                                                                                                                          | If this is from a threshold invoice, the amount that was partially invoiced.                                                                                                                                                                        |
| deleted\_at                  | nullable timestamp                                                                                                                                                                        | Deletion marker for this resource. If not null, then the resource has been deleted as of the time set.                                                                                                                                              |

### Dimensional Price Group

#### Overview

The dimensional price group resource represents a dimensional price group that can be reused across prices and plans. See [Create dimensional price group](/api-reference/dimensional-price-group/create-dimensional-price-group) for more information. The dimensional price group table is most useful when joining with the Price table using the `dimensional_price_group_id` field. For example, you can use `dimensional_price_group_id` in the Price schema above to understand which prices partition the same billable metric (and by which `dimensions`), and use the `dimension_values` in the Price schema to understand which partition a particular price represents.

#### Schema

| Field Name                              | Type                    | Description                                                                                            |
| --------------------------------------- | ----------------------- | ------------------------------------------------------------------------------------------------------ |
| id                                      | string                  | The ID of the dimensional price group.                                                                 |
| updated\_at                             | timestamp               | The last updated date of the dimensional price group.                                                  |
| created\_at                             | timestamp               | The timestamp when the dimensional price group was created.                                            |
| name                                    | string                  | The name of the price group.                                                                           |
| external\_dimensional\_price\_group\_id | nullable string         | The ID of the price group in the external system.                                                      |
| billable\_metric\_id                    | string                  | The ID of the billable metric that the price group partitions                                          |
| dimensions                              | JSON (array of strings) | The dimensions that the price group partitions                                                         |
| deleted\_at                             | nullable timestamp      | Deletion marker for this resource. If not null, then the resource has been deleted as of the time set. |

### Invoice Line Item Billing

#### Overview

The Invoice Line Item Billing resource type can be used to track the individual line item values for invoices that have been issued / billed.

This information can be used to power use cases like:

* Calculating the precise amounts discounted per line item
* Breaking down the amounts billed for a specific price or billable metric

The Invoice Line Item Billing resource type is conceptually an append only resource type. There are infrequent cases where entries can be voided (usually from a requested manual intervention). If this has occurred, it will be reflected in the `voided_at` column.

The Invoice Line Item Revenue resource type relies on an invoice being issued before rows are written. Importantly, invoice issuing relies on the grace period ending before it can occur. This means that entries in this resource type will be delayed.

#### Schema

| Field Name                   | Type                                                                                                                                                                                      | Description                                                                                                                                                                                                                                         |
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id                           | string                                                                                                                                                                                    | The ID of the invoice line item billing object.                                                                                                                                                                                                     |
| updated\_at                  | timestamp                                                                                                                                                                                 | The last updated date of the invoice line item billing object.                                                                                                                                                                                      |
| created\_at                  | nullable timestamp                                                                                                                                                                        | The timestamp when the invoice line item billing object was created.                                                                                                                                                                                |
| customer\_id                 | string                                                                                                                                                                                    | The ID of the customer.                                                                                                                                                                                                                             |
| subscription\_id             | nullable string                                                                                                                                                                           | The ID of the subscription. <br /><br />Note that a subscription ID may not always be present due to things like one-off invoices.                                                                                                                  |
| pricing\_currency            | string                                                                                                                                                                                    | The currency of the underlying price.                                                                                                                                                                                                               |
| invoicing\_currency          | nullable string                                                                                                                                                                           | The currency used for invoicing if it differs from the price's currency. <br /><br />Today, this only occurs if you are using virtual pricing units.                                                                                                |
| item\_id                     | string                                                                                                                                                                                    | The ID of the item                                                                                                                                                                                                                                  |
| invoice\_id                  | string                                                                                                                                                                                    | The ID of the invoice                                                                                                                                                                                                                               |
| invoice\_line\_item\_id      | string                                                                                                                                                                                    | The ID of the invoice line item                                                                                                                                                                                                                     |
| price\_id                    | string                                                                                                                                                                                    | The ID of the price                                                                                                                                                                                                                                 |
| billable\_metric\_id         | nullable string                                                                                                                                                                           | The ID of the billable metric. <br /><br />Note that a billable metric ID may not be present if the associated price is not usage based.                                                                                                            |
| plan\_id                     | nullable string                                                                                                                                                                           | The ID of the plan. <br /><br />Note that it may not always be present due to things like one-off invoices.                                                                                                                                         |
| block\_id                    | nullable string                                                                                                                                                                           | If set, the associated credit block ID for this line item.                                                                                                                                                                                          |
| invoice\_date                | nullable timestamp                                                                                                                                                                        | The invoice date.                                                                                                                                                                                                                                   |
| timeframe\_start             | timestamp                                                                                                                                                                                 | The inclusive timestamp for the start of the relevant period. <br /><br />Note that entries are scoped to day boundaries, but may start or end in the middle of the day if a plan change occurs.                                                    |
| timeframe\_end               | timestamp                                                                                                                                                                                 | The exclusive timestamp for the end of the relevant period. <br /><br />Note that entries are scoped to day boundaries, but may start or end in the middle of the day if a plan change occurs.                                                      |
| quantity                     | decimal                                                                                                                                                                                   | The price's quantity for the relevant timeframe.                                                                                                                                                                                                    |
| subtotal                     | decimal                                                                                                                                                                                   | The list price before any adjustments have been applied.                                                                                                                                                                                            |
| adjusted\_subtotal           | decimal                                                                                                                                                                                   | The list price after adjustments have been applied. <br /><br />Called the "total" in the subscription costs API. This has been renamed to avoid confusion.                                                                                         |
| amount                       | decimal                                                                                                                                                                                   | The list price after: adjustments have been applied, prepaid credits have been applied, license allocations and license overage write-offs have been applied, overage conversions have been applied, and partial invoice amounts have been applied. |
| rounded\_amount              | decimal                                                                                                                                                                                   | The amount after rounding occurs. If no rounding occurs, this value will be the same as `amount`. This value does not include tax.                                                                                                                  |
| tax\_amount                  | decimal                                                                                                                                                                                   | The tax amount calculated for this line item.                                                                                                                                                                                                       |
| credits\_applied             | decimal                                                                                                                                                                                   | The number of credits used.                                                                                                                                                                                                                         |
| license\_allocation\_applied | nullable decimal                                                                                                                                                                          | The amount of license allocation applied to this line item. Only populated for line items whose usage drew down from a license allocation.                                                                                                          |
| license\_allocation\_overage | nullable decimal                                                                                                                                                                          | The license allocation overage written off for this line item. Only non-zero when the license allocation is configured to write off overage.                                                                                                        |
| conversion\_rate             | decimal                                                                                                                                                                                   | The conversion rate between the price currency and the invoicing currency. <br /><br />If they are the same, this is 1.                                                                                                                             |
| adjustments                  | JSONB<br /><br />An array of dictionaries with: adjustment ID, adjustment type, amount, and price IDs.                                                                                    | The adjustments made to line items to account for maximums, minimums, and discounts.                                                                                                                                                                |
| sub\_line\_items             | nullable JSONB<br /><br />If this field is null, the number of sub-line items exceeds 500. This is differentiated from cases with no sub-line items, where the column will be empty JSON. | The serialized sub-line items from the invoice. <br /><br />This field can contain up to 500 sub-line items for a given line item. If the number of sub-line items exceeds 500, this field will not contain any sub-line items.                     |
| is\_partial\_invoice         | boolean                                                                                                                                                                                   | True if this line item was part of a [Threshold invoice](https://docs.withorb.com/reference/create-subscription#threshold-billing)                                                                                                                  |
| partially\_invoiced\_amount  | nullable decimal                                                                                                                                                                          | If this is from a threshold invoice, the amount that was partially invoiced.                                                                                                                                                                        |
| voided\_at                   | nullable timestamp                                                                                                                                                                        | When this entry was voided. <br /><br />Entries are very infrequently voided and usually correspond to manual actions that have taken place at the request of the customer.                                                                         |

### Invoice Line Item Billing Event

#### Overview

This resource represents the same data as [Invoice Line Item Billing](#invoice-line-item-billing), but also includes `timestamp`, `lock_adjusted_timestamp`, and `is_revert` fields, enabling revenue recognition with respect to the [accounting period lock posture at the time of original issuance](/data-exports/best-practices#lock-adjusted-timestamps).

#### Schema

| Field Name                   | Type                                                                                                                                                                                      | Description                                                                                                                                                                                                                                         |
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id                           | string                                                                                                                                                                                    | A composite ID of the form `{source_id}-{is_revert}`.                                                                                                                                                                                               |
| updated\_at                  | timestamp                                                                                                                                                                                 | The last updated date of the invoice line item billing object.                                                                                                                                                                                      |
| created\_at                  | nullable timestamp                                                                                                                                                                        | The timestamp when the invoice line item billing object was created.                                                                                                                                                                                |
| source\_id                   | string                                                                                                                                                                                    | The ID of the invoice line item billing entry.                                                                                                                                                                                                      |
| is\_revert                   | boolean                                                                                                                                                                                   | Whether this entry represents a creation or revert event.                                                                                                                                                                                           |
| timestamp                    | timestamp                                                                                                                                                                                 | The original time that this entry was created or reverted in Orb.                                                                                                                                                                                   |
| lock\_adjusted\_timestamp    | timestamp                                                                                                                                                                                 | The time that this entry should be recognized based on the accounting period lock posture.                                                                                                                                                          |
| customer\_id                 | string                                                                                                                                                                                    | The ID of the customer.                                                                                                                                                                                                                             |
| subscription\_id             | nullable string                                                                                                                                                                           | The ID of the subscription. <br /><br />Note that a subscription ID may not always be present due to things like one-off invoices.                                                                                                                  |
| pricing\_currency            | string                                                                                                                                                                                    | The currency of the underlying price.                                                                                                                                                                                                               |
| invoicing\_currency          | nullable string                                                                                                                                                                           | The currency used for invoicing if it differs from the price's currency. <br /><br />Today, this only occurs if you are using virtual pricing units.                                                                                                |
| item\_id                     | string                                                                                                                                                                                    | The ID of the item                                                                                                                                                                                                                                  |
| invoice\_id                  | string                                                                                                                                                                                    | The ID of the invoice                                                                                                                                                                                                                               |
| invoice\_line\_item\_id      | string                                                                                                                                                                                    | The ID of the invoice line item                                                                                                                                                                                                                     |
| price\_id                    | string                                                                                                                                                                                    | The ID of the price                                                                                                                                                                                                                                 |
| billable\_metric\_id         | nullable string                                                                                                                                                                           | The ID of the billable metric. <br /><br />Note that a billable metric ID may not be present if the associated price is not usage based.                                                                                                            |
| plan\_id                     | nullable string                                                                                                                                                                           | The ID of the plan. <br /><br />Note that it may not always be present due to things like one-off invoices.                                                                                                                                         |
| block\_id                    | nullable string                                                                                                                                                                           | If set, the associated credit block ID for this line item.                                                                                                                                                                                          |
| timeframe\_start             | timestamp                                                                                                                                                                                 | The inclusive timestamp for the start of the relevant period. <br /><br />Note that entries are scoped to day boundaries, but may start or end in the middle of the day if a plan change occurs.                                                    |
| timeframe\_end               | timestamp                                                                                                                                                                                 | The exclusive timestamp for the end of the relevant period. <br /><br />Note that entries are scoped to day boundaries, but may start or end in the middle of the day if a plan change occurs.                                                      |
| invoice\_date                | nullable timestamp                                                                                                                                                                        | The invoice date.                                                                                                                                                                                                                                   |
| quantity                     | decimal                                                                                                                                                                                   | The price's quantity for the relevant timeframe.                                                                                                                                                                                                    |
| subtotal                     | decimal                                                                                                                                                                                   | The list price before any adjustments have been applied.                                                                                                                                                                                            |
| adjusted\_subtotal           | decimal                                                                                                                                                                                   | The list price after adjustments have been applied. <br /><br />Called the "total" in the subscription costs API. This has been renamed to avoid confusion.                                                                                         |
| amount                       | decimal                                                                                                                                                                                   | The list price after: adjustments have been applied, prepaid credits have been applied, license allocations and license overage write-offs have been applied, overage conversions have been applied, and partial invoice amounts have been applied. |
| rounded\_amount              | decimal                                                                                                                                                                                   | The amount after rounding occurs. If no rounding occurs, this value will be the same as `amount`. This value does not include tax.                                                                                                                  |
| correction\_amount           | nullable decimal                                                                                                                                                                          | The amount of corrections applied to the line item, reflected in `rounded_amount`.                                                                                                                                                                  |
| tax\_amount                  | decimal                                                                                                                                                                                   | The tax amount calculated for this line item.                                                                                                                                                                                                       |
| credits\_applied             | decimal                                                                                                                                                                                   | The number of credits used.                                                                                                                                                                                                                         |
| license\_allocation\_applied | nullable decimal                                                                                                                                                                          | The amount of license allocation applied to this line item. Only populated for line items whose usage drew down from a license allocation.                                                                                                          |
| license\_allocation\_overage | nullable decimal                                                                                                                                                                          | The license allocation overage written off for this line item. Only non-zero when the license allocation is configured to write off overage.                                                                                                        |
| conversion\_rate             | decimal                                                                                                                                                                                   | The conversion rate between the price currency and the invoicing currency. <br /><br />If they are the same, this is 1.                                                                                                                             |
| adjustments                  | JSONB<br /><br />An array of dictionaries with: adjustment ID, adjustment type, amount, and price IDs.                                                                                    | The adjustments made to line items to account for maximums, minimums, and discounts.                                                                                                                                                                |
| sub\_line\_items             | nullable JSONB<br /><br />If this field is null, the number of sub-line items exceeds 500. This is differentiated from cases with no sub-line items, where the column will be empty JSON. | The serialized sub-line items from the invoice. <br /><br />This field can contain up to 500 sub-line items for a given line item. If the number of sub-line items exceeds 500, this field will not contain any sub-line items.                     |
| is\_partial\_invoice         | boolean                                                                                                                                                                                   | True if this line item was part of a [Threshold invoice](https://docs.withorb.com/reference/create-subscription#threshold-billing)                                                                                                                  |
| partially\_invoiced\_amount  | nullable decimal                                                                                                                                                                          | If this is from a threshold invoice, the amount that was partially invoiced.                                                                                                                                                                        |
| deleted\_at                  | nullable timestamp                                                                                                                                                                        | Deletion marker for this resource. If not null, then the resource has been deleted as of the time set.                                                                                                                                              |

### Invoice Metadata

#### Overview

The Invoice Metadata resource represents a subset of data from the invoice resource. This resource also exposes draft invoices within Orb, which can be deleted at any time.

#### Schema

| Field Name       | Type               | Description                                                                                                                                     |   |
| ---------------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | - |
| id               | string             | The ID of the invoice.                                                                                                                          |   |
| updated\_at      | timestamp          | The last updated date of the invoice.                                                                                                           |   |
| created\_at      | timestamp          | The timestamp when the invoice was created.                                                                                                     |   |
| currency         | string             | The currency of the invoice.                                                                                                                    |   |
| customer\_id     | string             | The ID of the customer.                                                                                                                         |   |
| due\_date        | nullable timestamp | The time the invoice must be paid by.                                                                                                           |   |
| invoice\_date    | timestamp          | An optional invoice date set on creation.                                                                                                       |   |
| invoice\_number  | nullable string    | The identifying invoice number.                                                                                                                 |   |
| invoice\_type    | string             | The type of invoice, either "one\_off" or "subscription".                                                                                       |   |
| issued\_at       | nullable timestamp | The time the invoice was sent out.                                                                                                              |   |
| memo             | nullable string    | The optional memo for the reason for the invoice.                                                                                               |   |
| paid\_at         | nullable timestamp | The time that the invoice was paid.                                                                                                             |   |
| plan\_id         | nullable string    | The ID of the plan. <br /><br />Note that it may not always be present due to things like one-off invoices.                                     |   |
| status           | string             | The current status indicator for the invoice.                                                                                                   |   |
| subscription\_id | nullable string    | The ID of the subscription.                                                                                                                     |   |
| total            | nullable decimal   | The total value for the invoice. Note that this represents a point-in-time amount for draft invoices and is subject to change.                  |   |
| total\_with\_tax | nullable decimal   | The total value for the invoice including tax. Note that this amount will be null for draft invoices.                                           |   |
| amount\_due      | nullable decimal   | The total amount due for the invoice after credit note and customer balance application. Note that this amount will be null for draft invoices. |   |
| voided\_at       | nullable timestamp | The time the invoice was voided.                                                                                                                |   |
| deleted\_at      | nullable timestamp | Deletion marker for this resource. If not null, then the resource has been deleted as of the time set.                                          |   |

### Payment Application

#### Overview

The Payment Application resource represents the application of a successful payment to an invoice. This resource tracks how payments are allocated to invoices, linking each application to the payment attempt that generated it.

#### Schema

| Field Name           | Type               | Description                                                                                            |
| -------------------- | ------------------ | ------------------------------------------------------------------------------------------------------ |
| id                   | string             | The ID of the payment application.                                                                     |
| updated\_at          | timestamp          | The last updated time of the payment application.                                                      |
| created\_at          | nullable timestamp | The timestamp when the payment application was created.                                                |
| deleted\_at          | nullable timestamp | Deletion marker for this resource. If not null, then the resource has been deleted as of the time set. |
| invoice\_id          | string             | The ID of the invoice this payment application is associated with.                                     |
| applied\_at          | timestamp          | The time when the payment was applied to the invoice.                                                  |
| currency             | string             | The currency of the payment application.                                                               |
| amount               | decimal            | The amount of the payment that was applied to the invoice.                                             |
| payment\_attempt\_id | string             | The ID of the payment attempt that resulted in this payment application.                               |

### Payment Attempt

#### Overview

The Payment Attempt resource represents each attempt to collect payment. This resource tracks the lifecycle of payment collection efforts, including automatic retries through Orb's dunning process. Each payment attempt captures information about when the attempt was made, the payment provider used, the result of the attempt, and any associated error information.

#### Schema

| Field Name            | Type               | Description                                                                                                                                                     |
| --------------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id                    | string             | The ID of the payment attempt.                                                                                                                                  |
| updated\_at           | timestamp          | The last updated time of the payment attempt.                                                                                                                   |
| created\_at           | nullable timestamp | The timestamp when the payment attempt was created.                                                                                                             |
| deleted\_at           | nullable timestamp | Deletion marker for this resource. If not null, then the resource has been deleted as of the time set.                                                          |
| customer\_id          | string             | The ID of the customer.                                                                                                                                         |
| attempted\_at         | timestamp          | The time when the payment attempt was made.                                                                                                                     |
| settled\_at           | nullable timestamp | The time when the payment was settled, if applicable.                                                                                                           |
| provider              | string             | The payment provider used for this attempt. Available options: `stripe`, `adyen`, `orb`.                                                                        |
| initiating\_action    | string             | The action that initiated this payment attempt. Available options: `auto_collection`, `dunning`, `stripe_user_payment` (for Stripe), `manual_action` (for Orb). |
| status                | string             | The status of the payment attempt. Available options: `started`, `processing`, `failed`, `success`, `canceled`.                                                 |
| currency              | string             | The currency of the payment attempt.                                                                                                                            |
| amount                | decimal            | The amount that was attempted to be collected.                                                                                                                  |
| amount\_captured      | nullable decimal   | The amount that was successfully captured.                                                                                                                      |
| reference\_id         | nullable string    | An external reference ID for the payment attempt. For Stripe, this is the PaymentIntent ID. For Orb, this can be a user-provided reference ID.                  |
| payment\_method\_type | nullable string    | The type of payment method used for this attempt. Available options: `card`, `us_bank_account`, `link`, `amazon_pay`.                                           |
| description           | nullable string    | A description of the payment attempt.                                                                                                                           |
| error\_details        | nullable JSON      | Error details returned by the payment processor, if the attempt failed. Contains structured error information including codes and messages.                     |

### Item

#### Overview

The Item resource type represents a sellable product or good. Items are associated with all line items, billable metrics, and prices and are used for defining external sync behavior for invoices and tax calculation purposes.

#### Schema

| Field Name            | Type                                                                                          | Description                                                                                                |
| --------------------- | --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| id                    | string                                                                                        | The ID of the item.                                                                                        |
| updated\_at           | timestamp                                                                                     | The last updated date of the item.                                                                         |
| created\_at           | nullable timestamp                                                                            | The timestamp when the item was created.                                                                   |
| name                  | string                                                                                        | The name of the item.                                                                                      |
| external\_connections | JSONB<br />An array of dictionaries with: external\_connection\_name and external\_entity\_id | A list of connections to external third-party providers, including provider names and external entity IDs. |
| deleted\_at           | nullable timestamp                                                                            | Deletion marker for this resource. If not null, then the resource has been deleted as of the time set.     |
| archived\_at          | nullable timestamp                                                                            | The time the item was archived. This field will be non-null for archived items.                            |

### License

#### Overview

The License resource represents an entitlement provisioned on a subscription. Use this resource with [License Type](#license-type) to reconstruct which entitlements were active on a subscription and when.

#### Schema

| Field Name                        | Type               | Description                                                                                                                                                 |
| --------------------------------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id                                | string             | The ID of the license.                                                                                                                                      |
| updated\_at                       | timestamp          | The last updated date of the license.                                                                                                                       |
| created\_at                       | timestamp          | The timestamp when the license was created.                                                                                                                 |
| deleted\_at                       | nullable timestamp | Deletion marker for this resource. If not null, then the resource has been deleted as of the time set.                                                      |
| subscription\_id                  | string             | The ID of the subscription associated with the license.                                                                                                     |
| license\_type\_id                 | string             | The ID of the license type associated with the license.                                                                                                     |
| external\_license\_id             | string             | The external identifier for the license. If the license has multiple external IDs, this is the sorted, pipe-joined string used by the License API resource. |
| start\_time\_inclusive            | timestamp          | The inclusive timestamp when the license becomes valid.                                                                                                     |
| end\_time\_exclusive              | nullable timestamp | The exclusive timestamp when the license is no longer valid, if defined.                                                                                    |
| effective\_start\_time\_inclusive | nullable timestamp | The inclusive timestamp when the license becomes effective for billing calculations.                                                                        |
| effective\_end\_time\_exclusive   | nullable timestamp | The exclusive timestamp when the license is no longer effective for billing calculations, if defined.                                                       |

### License Type

#### Overview

The License Type resource represents a named license configuration and the grouping key Orb uses to attribute usage to individual licenses.

#### Schema

| Field Name    | Type               | Description                                                                                            |
| ------------- | ------------------ | ------------------------------------------------------------------------------------------------------ |
| id            | string             | The ID of the license type.                                                                            |
| updated\_at   | timestamp          | The last updated date of the license type.                                                             |
| created\_at   | timestamp          | The timestamp when the license type was created.                                                       |
| deleted\_at   | nullable timestamp | Deletion marker for this resource. If not null, then the resource has been deleted as of the time set. |
| grouping\_key | string             | The event property Orb uses to attribute usage events to a license for this license type.              |
| name          | string             | The user provided name of this license type.                                                           |

### Price

#### Overview

The price resource represents a price that can be associated with a plan, subscription, or invoice. See the [Price configuration](/product-catalog/price-configuration) for more information. The price table is most useful when joining with other tables using the `price_id` field. For example,

* you can see `price_id` used in the Daily Line Item Revenue schema above to understand which price configuration generated specific revenue entries.
* you can see `price_id` used in the Invoice Line Item Billing schema above to understand which price configuration generated specific invoice line item values.

#### Schema

| Field Name                       | Type                             | Description                                                                                                                                                               |
| -------------------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id                               | string                           | The ID of the price.                                                                                                                                                      |
| updated\_at                      | timestamp                        | The last updated date of the price.                                                                                                                                       |
| created\_at                      | timestamp                        | The timestamp when the price was created.                                                                                                                                 |
| name                             | string                           | The name of the price.                                                                                                                                                    |
| external\_price\_id              | nullable string                  | The ID of the price in the external system.                                                                                                                               |
| price\_type                      | string                           | The type of price. Can be either "usage\_price" or "fixed\_price".                                                                                                        |
| cadence                          | string                           | The cadence of the price. Can be "one-time", "monthly", "quarterly", "semi-annual", "annual", or "custom".                                                                |
| billing\_mode                    | string                           | The billing mode of the price. Can be "in\_advance" or "in\_arrear".                                                                                                      |
| billing\_cycle\_duration         | nullable decimal                 | The duration of the billing cycle.                                                                                                                                        |
| billing\_cycle\_duration\_unit   | string                           | The unit of the billing cycle duration. Can be "day" or "month".                                                                                                          |
| invoicing\_cycle\_duration       | nullable decimal                 | The duration of the invoicing cycle.                                                                                                                                      |
| invoicing\_cycle\_duration\_unit | nullable string                  | The unit of the invoicing cycle duration. Can be "day" or "month".                                                                                                        |
| billable\_metric\_id             | nullable string                  | The ID of the billable metric. This is only present if the price is usage based.                                                                                          |
| fixed\_price\_quantity           | nullable decimal                 | The quantity of the price. This is only present if the price is fixed.                                                                                                    |
| currency                         | string                           | The currency of the price.                                                                                                                                                |
| conversion\_rate                 | nullable decimal                 | The conversion rate of the price.                                                                                                                                         |
| item\_id                         | string                           | The ID of the item.                                                                                                                                                       |
| credit\_allocation               | nullable JSON                    | The credit allocation of the price.                                                                                                                                       |
| license\_allocations             | nullable JSON                    | The license allocations configured on the price, as an array of objects with `id`, `amount`, `currency`, and `write_off_overage`.                                         |
| model\_type                      | string                           | The model type of the price. Can be "tiered", "volume", "matrix", "tier\_volume", etc. See [Price configuration](/product-catalog/price-configuration) for the full list. |
| rating\_config                   | JSON                             | The rating configuration of the price.                                                                                                                                    |
| plan\_id                         | nullable string                  | The ID of the plan, if the price is associated with a plan.                                                                                                               |
| plan\_phase\_order               | nullable int                     | The order of the plan phase, if the price is associated with a plan and phase.                                                                                            |
| dimensional\_price\_group\_id    | nullable string                  | The ID of the dimensional price group this price represents a partition of, if the price is associated with a dimensional price group.                                    |
| dimension\_values                | nullable JSON (array of strings) | The dimension values this price partitions the metric by, if the price is associated with a dimensional price group.                                                      |
| composite\_price\_filters        | nullable JSON                    | The set of filters used to scope eligible prices if this is a composite price.                                                                                            |
| deleted\_at                      | nullable timestamp               | Deletion marker for this resource. If not null, then the resource has been deleted as of the time set.                                                                    |

### Price Interval

#### Overview

The price interval resource represents a time frame during which a price applies to a subscription. [See editing subscriptions](/product-catalog/editing-subscriptions) and [add or edit price intervals](/api-reference/price-interval/add-or-edit-price-intervals) for more information.

#### Schema

| Field Name             | Type               | Description                                                                                            |
| ---------------------- | ------------------ | ------------------------------------------------------------------------------------------------------ |
| id                     | string             | The ID of the price interval.                                                                          |
| updated\_at            | timestamp          | The last updated date of the price interval.                                                           |
| created\_at            | nullable timestamp | The timestamp when the price interval was created.                                                     |
| subscription\_id       | string             | The ID of the subscription.                                                                            |
| customer\_id           | string             | The ID of the customer.                                                                                |
| price\_id              | string             | The ID of the price.                                                                                   |
| start\_date\_inclusive | timestamp          | The start date of the price interval.                                                                  |
| end\_date\_exclusive   | nullable timestamp | The end date of the price interval, if defined.                                                        |
| billing\_cycle\_day    | number             | The day of the billing cycle.                                                                          |
| deleted\_at            | nullable timestamp | Deletion marker for this resource. If not null, then the resource has been deleted as of the time set. |

### Subscription version

#### Overview

The subscription version resource represents the subscription schedule for a given subscription, allowing for an understanding of underlying plan transitions. A given subscription may have multiple subscription versions mapped to it to track plan version changes and more.

#### Schema

| Field Name                | Type               | Description                                                                                            |
| ------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------ |
| id                        | string             | The ID of the subscription version.                                                                    |
| updated\_at               | timestamp          | The last updated date of the subscription version.                                                     |
| created\_at               | nullable timestamp | The timestamp when the subscription version was created.                                               |
| subscription\_id          | string             | The ID of the subscription.                                                                            |
| customer\_id              | string             | The ID of the customer.                                                                                |
| plan                      | JSON               | The plan information associated with this subscription version.                                        |
| start\_date               | timestamp          | The time when this subscription version started.                                                       |
| ended\_at                 | nullable timestamp | If set, the time when this subscription version ended.                                                 |
| subscription\_start\_date | timestamp          | the timestamp when this subscription started.                                                          |
| subscription\_ended\_at   | nullable timestamp | If set, the time when this subscription ended.                                                         |
| modified\_at              | timestamp          | The time when this resource was last modified in Orb's system.                                         |
| deleted\_at               | nullable timestamp | Deletion marker for this resource. If not null, then the resource has been deleted as of the time set. |

## Legacy resources (deprecated)

Orb periodically deprecates older data export resources that no longer meet the product and infrastructure standards we require to support accurate reporting, scalable workloads, or new functionality.

What you can expect from end of service:

* **This resource will no longer appear in the in-app UI**, including the configuration table in settings.
* **It will no longer be configurable for new connections**—customers cannot create or enable new exports using the deprecated resource.
* **Existing connections will stop syncing**, meaning no new or updated data will flow to destinations after the deprecation date. Previously synced data will remain in your data warehouse.

| Resource type                                                           | Deprecation date | Alternative resources                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ----------------------------------------------------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [Invoice](https://docs.withorb.com/api-reference/invoice/fetch-invoice) | Nov 26, 2025     | [Invoice metadata](https://docs.withorb.com/data-exports/resource-types#invoice-metadata), [Payment attempt](https://docs.withorb.com/data-exports/resource-types#payment-attempt), [Payment application](https://docs.withorb.com/data-exports/resource-types#payment-application)<br /><br />Note: the [Invoice API endpoint](https://docs.withorb.com/api-reference/invoice/fetch-invoice) remains fully servicable for non-reporting applications. |
