---
title: "Get an invoice"
method: GET
path: "/api/v1/billing/invoices/{invoiceId}"
tags: ["Billing"]
---

# Get an invoice

`GET /api/v1/billing/invoices/{invoiceId}`

Get an invoice by ID.

Gathering invoices will always show the current usage calculated on the fly.

## Path parameters

- `invoiceId` string, required

## Query parameters

- `expand` InvoiceExpand[]
- `includeDeletedLines` boolean

## Response `200`

The request has succeeded.

- Invoice — Invoice represents an invoice in the system.
  - `id` string, required — A unique identifier for the resource.
  - `description` string — Optional description of the resource. Maximum 1024 characters.
  - `metadata` Metadata — Set of key-value pairs. Metadata can be used to store additional information about a resource.
  - `createdAt` string, date-time, required — Timestamp of when the resource was created.
  - `updatedAt` string, date-time, required — Timestamp of when the resource was last updated.
  - `deletedAt` string, date-time — Timestamp of when the resource was permanently deleted.
  - `type` 'standard' | 'credit_note', required — InvoiceType represents the type of invoice. The type of invoice determines the purpose of the invoice and how it should be handled.
  - `supplier` BillingParty, required — Party represents a person or business entity.
    - `id` string — Unique identifier for the party (if available)
    - `key` string — An optional unique key of the party (if available)
    - `name` string — Legal name or representation of the organization.
    - `taxId` BillingPartyTaxIdentity — Identity stores the details required to identify an entity for tax purposes in a specific country.
      - `code` string — TaxIdentificationCode is a normalized tax code shown on the original identity document.
    - `addresses` Address[] — Regular post addresses for where information should be sent if needed.
      - `country` string — [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) alpha-2 country code. Custom two-letter country codes are also supported for convenience.
      - `postalCode` string — Postal code.
      - `state` string — State or province.
      - `city` string — City.
      - `line1` string — First line of the address.
      - `line2` string — Second line of the address.
      - `phoneNumber` string — Phone number.
  - `customer` BillingInvoiceCustomerExtendedDetails, required — BillingInvoiceCustomerExtendedDetails is a collection of fields that are used to extend the billing party details for invoices. These fields contain the OpenMeter specific details for the customer, that are not strictly required for the invoice itself.
    - `id` string — Unique identifier for the party (if available)
    - `key` string — An optional unique key of the party (if available)
    - `name` string — Legal name or representation of the organization.
    - `taxId` BillingPartyTaxIdentity — Identity stores the details required to identify an entity for tax purposes in a specific country.
      - `code` string — TaxIdentificationCode is a normalized tax code shown on the original identity document.
    - `addresses` Address[] — Regular post addresses for where information should be sent if needed.
      - `country` string — [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) alpha-2 country code. Custom two-letter country codes are also supported for convenience.
      - `postalCode` string — Postal code.
      - `state` string — State or province.
      - `city` string — City.
      - `line1` string — First line of the address.
      - `line2` string — Second line of the address.
      - `phoneNumber` string — Phone number.
    - `usageAttribution` CustomerUsageAttribution, required — Mapping to attribute metered usage to the customer. One customer can have zero or more subjects, but one subject can only belong to one customer.
      - `subjectKeys` string[], required — The subjects that are attributed to the customer. Can be empty when no subjects are associated with the customer.
  - `number` string, required — InvoiceNumber is a unique identifier for the invoice, generated by the invoicing app. The uniqueness depends on a lot of factors: - app setting (unique per app or unique per customer) - multiple app scenarios (multiple apps generating invoices with the same prefix)
  - `currency` string, required — Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code. Custom three-letter currency codes are also supported for convenience.
  - `preceding` InvoiceDocumentRef[] — Key information regarding previous invoices and potentially details as to why they were corrected.
    - `type` 'credit_note_original_invoice', required — InvoiceDocumentRefType defines the type of document that is being referenced.
    - `reason` string — Human readable description on why this reference is here or needs to be used.
    - `description` string — Additional details about the document.
  - `totals` InvoiceTotals, required — Totals contains the summaries of all calculations for the invoice.
    - `amount` string, required — Numeric represents an arbitrary precision number.
    - `chargesTotal` string, required — Numeric represents an arbitrary precision number.
    - `discountsTotal` string, required — Numeric represents an arbitrary precision number.
    - `creditsTotal` string, required — Numeric represents an arbitrary precision number.
    - `taxesInclusiveTotal` string, required — Numeric represents an arbitrary precision number.
    - `taxesExclusiveTotal` string, required — Numeric represents an arbitrary precision number.
    - `taxesTotal` string, required — Numeric represents an arbitrary precision number.
    - `total` string, required — Numeric represents an arbitrary precision number.
  - `status` 'gathering' | 'draft' | 'issuing' | 'issued' | 'payment_processing' | 'overdue' | 'paid' | 'uncollectible' | 'voided', required — InvoiceStatus describes the status of an invoice.
  - `statusDetails` InvoiceStatusDetails, required — InvoiceStatusDetails represents the details of the invoice status. API users are encouraged to rely on the immutable/failed/avaliableActions fields to determine the next steps of the invoice instead of the extendedStatus field.
    - `immutable` boolean, required — Is the invoice editable?
    - `failed` boolean, required — Is the invoice in a failed state?
    - `extendedStatus` string, required — Extended status information for the invoice.
    - `availableActions` InvoiceAvailableActions, required — InvoiceAvailableActions represents the actions that can be performed on the invoice.
      - `advance` InvoiceAvailableActionDetails — InvoiceAvailableActionInvoiceDetails represents the details of the invoice action for non-gathering invoices.
        - `resultingState` string, required — The state the invoice will reach if the action is activated and all intermediate steps are successful. For example advancing a draft_created invoice will result in a draft_manual_approval_needed invoice.
      - `approve` InvoiceAvailableActionDetails — InvoiceAvailableActionInvoiceDetails represents the details of the invoice action for non-gathering invoices.
        - `resultingState` string, required — The state the invoice will reach if the action is activated and all intermediate steps are successful. For example advancing a draft_created invoice will result in a draft_manual_approval_needed invoice.
      - `delete` InvoiceAvailableActionDetails — InvoiceAvailableActionInvoiceDetails represents the details of the invoice action for non-gathering invoices.
        - `resultingState` string, required — The state the invoice will reach if the action is activated and all intermediate steps are successful. For example advancing a draft_created invoice will result in a draft_manual_approval_needed invoice.
      - `retry` InvoiceAvailableActionDetails — InvoiceAvailableActionInvoiceDetails represents the details of the invoice action for non-gathering invoices.
        - `resultingState` string, required — The state the invoice will reach if the action is activated and all intermediate steps are successful. For example advancing a draft_created invoice will result in a draft_manual_approval_needed invoice.
      - `snapshotQuantities` InvoiceAvailableActionDetails — InvoiceAvailableActionInvoiceDetails represents the details of the invoice action for non-gathering invoices.
        - `resultingState` string, required — The state the invoice will reach if the action is activated and all intermediate steps are successful. For example advancing a draft_created invoice will result in a draft_manual_approval_needed invoice.
      - `void` InvoiceAvailableActionDetails — InvoiceAvailableActionInvoiceDetails represents the details of the invoice action for non-gathering invoices.
        - `resultingState` string, required — The state the invoice will reach if the action is activated and all intermediate steps are successful. For example advancing a draft_created invoice will result in a draft_manual_approval_needed invoice.
      - `invoice` InvoiceAvailableActionInvoiceDetails — InvoiceAvailableActionInvoiceDetails represents the details of the invoice action for gathering invoices.
  - `issuedAt` string, date-time — The time the invoice was issued. Depending on the status of the invoice this can mean multiple things: - draft, gathering: The time the invoice will be issued based on the workflow settings. - issued: The time the invoice was issued.
  - `draftUntil` string, date-time — The time until the invoice is in draft status. On draft invoice creation it is calculated from the workflow settings. If manual approval is required, the draftUntil time is set.
  - `quantitySnapshotedAt` string, date-time — The time when the quantity snapshots on the invoice lines were taken.
  - `collectionAt` string, date-time — The time when the invoice will be/has been collected.
  - `dueAt` string, date-time — Due time of the fulfillment of the invoice (if available).
  - `period` Period — A period with a start and end time.
    - `from` string, date-time, required — Period start time.
    - `to` string, date-time, required — Period end time.
  - `voidedAt` string, date-time — The time the invoice was voided. If the invoice was voided, this field will be set to the time the invoice was voided.
  - `sentToCustomerAt` string, date-time — The time the invoice was sent to customer.
  - `workflow` InvoiceWorkflowSettings, required — InvoiceWorkflowSettings represents the workflow settings used by the invoice. This is a clone of the billing profile's workflow settings at the time of invoice creation with customer overrides considered.
    - `apps` union — ProfileAppsOrReference represents the union of ProfileApps and ProfileAppReferences for a billing profile.
      - BillingProfileApps — BillingProfileApps represents the applications used by a billing profile
        - `tax` union, required — App. One of: stripe
          - object — A installed Stripe app object.
            - `id` string, required — A unique identifier for the resource.
            - `name` string, required — Human-readable name for the resource. Between 1 and 256 characters.
            - `description` string — Optional description of the resource. Maximum 1024 characters.
            - `metadata` Metadata — Set of key-value pairs. Metadata can be used to store additional information about a resource.
            - `createdAt` string, date-time, required — Timestamp of when the resource was created.
            - `updatedAt` string, date-time, required — Timestamp of when the resource was last updated.
            - `deletedAt` string, date-time — Timestamp of when the resource was permanently deleted.
            - `listing` MarketplaceListing, required — A marketplace listing. Represent an available app in the app marketplace that can be installed to the organization. Marketplace apps only exist in config so they don't extend the Resource model.
              - …
            - `status` 'ready' | 'unauthorized', required — App installed status.
            - `type` 'stripe', required — The app's type is Stripe.
            - `stripeAccountId` string, required — The Stripe account ID.
            - `livemode` boolean, required — Livemode, true if the app is in production mode.
            - `maskedAPIKey` string, required — The masked API key. Only shows the first 8 and last 3 characters.
          - object — Sandbox app can be used for testing OpenMeter features. The app is not creating anything in external systems, thus it is safe to use for verifying OpenMeter features.
            - `id` string, required — A unique identifier for the resource.
            - `name` string, required — Human-readable name for the resource. Between 1 and 256 characters.
            - `description` string — Optional description of the resource. Maximum 1024 characters.
            - `metadata` Metadata — Set of key-value pairs. Metadata can be used to store additional information about a resource.
            - `createdAt` string, date-time, required — Timestamp of when the resource was created.
            - `updatedAt` string, date-time, required — Timestamp of when the resource was last updated.
            - `deletedAt` string, date-time — Timestamp of when the resource was permanently deleted.
            - `listing` MarketplaceListing, required — A marketplace listing. Represent an available app in the app marketplace that can be installed to the organization. Marketplace apps only exist in config so they don't extend the Resource model.
              - …
            - `status` 'ready' | 'unauthorized', required — App installed status.
            - `type` 'sandbox', required — The app's type is Sandbox.
          - object — Custom Invoicing app can be used for interface with any invoicing or payment system. This app provides ways to manipulate invoices and payments, however the integration must rely on Notifications API to get notified about invoice changes.
            - `id` string, required — A unique identifier for the resource.
            - `name` string, required — Human-readable name for the resource. Between 1 and 256 characters.
            - `description` string — Optional description of the resource. Maximum 1024 characters.
            - `metadata` Metadata — Set of key-value pairs. Metadata can be used to store additional information about a resource.
            - `createdAt` string, date-time, required — Timestamp of when the resource was created.
            - `updatedAt` string, date-time, required — Timestamp of when the resource was last updated.
            - `deletedAt` string, date-time — Timestamp of when the resource was permanently deleted.
            - `listing` MarketplaceListing, required — A marketplace listing. Represent an available app in the app marketplace that can be installed to the organization. Marketplace apps only exist in config so they don't extend the Resource model.
              - …
            - `status` 'ready' | 'unauthorized', required — App installed status.
            - `type` 'custom_invoicing', required — The app's type is CustomInvoicing.
            - `enableDraftSyncHook` boolean, required — Enable draft.sync hook. If the hook is not enabled, the invoice will be progressed to the next state automatically.
            - `enableIssuingSyncHook` boolean, required — Enable issuing.sync hook. If the hook is not enabled, the invoice will be progressed to the next state automatically.
        - `invoicing` union, required — App. One of: stripe
          - object — A installed Stripe app object.
            - `id` string, required — A unique identifier for the resource.
            - `name` string, required — Human-readable name for the resource. Between 1 and 256 characters.
            - `description` string — Optional description of the resource. Maximum 1024 characters.
            - `metadata` Metadata — Set of key-value pairs. Metadata can be used to store additional information about a resource.
            - `createdAt` string, date-time, required — Timestamp of when the resource was created.
            - `updatedAt` string, date-time, required — Timestamp of when the resource was last updated.
            - `deletedAt` string, date-time — Timestamp of when the resource was permanently deleted.
            - `listing` MarketplaceListing, required — A marketplace listing. Represent an available app in the app marketplace that can be installed to the organization. Marketplace apps only exist in config so they don't extend the Resource model.
              - …
            - `status` 'ready' | 'unauthorized', required — App installed status.
            - `type` 'stripe', required — The app's type is Stripe.
            - `stripeAccountId` string, required — The Stripe account ID.
            - `livemode` boolean, required — Livemode, true if the app is in production mode.
            - `maskedAPIKey` string, required — The masked API key. Only shows the first 8 and last 3 characters.
          - object — Sandbox app can be used for testing OpenMeter features. The app is not creating anything in external systems, thus it is safe to use for verifying OpenMeter features.
            - `id` string, required — A unique identifier for the resource.
            - `name` string, required — Human-readable name for the resource. Between 1 and 256 characters.
            - `description` string — Optional description of the resource. Maximum 1024 characters.
            - `metadata` Metadata — Set of key-value pairs. Metadata can be used to store additional information about a resource.
            - `createdAt` string, date-time, required — Timestamp of when the resource was created.
            - `updatedAt` string, date-time, required — Timestamp of when the resource was last updated.
            - `deletedAt` string, date-time — Timestamp of when the resource was permanently deleted.
            - `listing` MarketplaceListing, required — A marketplace listing. Represent an available app in the app marketplace that can be installed to the organization. Marketplace apps only exist in config so they don't extend the Resource model.
              - …
            - `status` 'ready' | 'unauthorized', required — App installed status.
            - `type` 'sandbox', required — The app's type is Sandbox.
          - object — Custom Invoicing app can be used for interface with any invoicing or payment system. This app provides ways to manipulate invoices and payments, however the integration must rely on Notifications API to get notified about invoice changes.
            - `id` string, required — A unique identifier for the resource.
            - `name` string, required — Human-readable name for the resource. Between 1 and 256 characters.
            - `description` string — Optional description of the resource. Maximum 1024 characters.
            - `metadata` Metadata — Set of key-value pairs. Metadata can be used to store additional information about a resource.
            - `createdAt` string, date-time, required — Timestamp of when the resource was created.
            - `updatedAt` string, date-time, required — Timestamp of when the resource was last updated.
            - `deletedAt` string, date-time — Timestamp of when the resource was permanently deleted.
            - `listing` MarketplaceListing, required — A marketplace listing. Represent an available app in the app marketplace that can be installed to the organization. Marketplace apps only exist in config so they don't extend the Resource model.
              - …
            - `status` 'ready' | 'unauthorized', required — App installed status.
            - `type` 'custom_invoicing', required — The app's type is CustomInvoicing.
            - `enableDraftSyncHook` boolean, required — Enable draft.sync hook. If the hook is not enabled, the invoice will be progressed to the next state automatically.
            - `enableIssuingSyncHook` boolean, required — Enable issuing.sync hook. If the hook is not enabled, the invoice will be progressed to the next state automatically.
        - `payment` union, required — App. One of: stripe
          - object — A installed Stripe app object.
            - `id` string, required — A unique identifier for the resource.
            - `name` string, required — Human-readable name for the resource. Between 1 and 256 characters.
            - `description` string — Optional description of the resource. Maximum 1024 characters.
            - `metadata` Metadata — Set of key-value pairs. Metadata can be used to store additional information about a resource.
            - `createdAt` string, date-time, required — Timestamp of when the resource was created.
            - `updatedAt` string, date-time, required — Timestamp of when the resource was last updated.
            - `deletedAt` string, date-time — Timestamp of when the resource was permanently deleted.
            - `listing` MarketplaceListing, required — A marketplace listing. Represent an available app in the app marketplace that can be installed to the organization. Marketplace apps only exist in config so they don't extend the Resource model.
              - …
            - `status` 'ready' | 'unauthorized', required — App installed status.
            - `type` 'stripe', required — The app's type is Stripe.
            - `stripeAccountId` string, required — The Stripe account ID.
            - `livemode` boolean, required — Livemode, true if the app is in production mode.
            - `maskedAPIKey` string, required — The masked API key. Only shows the first 8 and last 3 characters.
          - object — Sandbox app can be used for testing OpenMeter features. The app is not creating anything in external systems, thus it is safe to use for verifying OpenMeter features.
            - `id` string, required — A unique identifier for the resource.
            - `name` string, required — Human-readable name for the resource. Between 1 and 256 characters.
            - `description` string — Optional description of the resource. Maximum 1024 characters.
            - `metadata` Metadata — Set of key-value pairs. Metadata can be used to store additional information about a resource.
            - `createdAt` string, date-time, required — Timestamp of when the resource was created.
            - `updatedAt` string, date-time, required — Timestamp of when the resource was last updated.
            - `deletedAt` string, date-time — Timestamp of when the resource was permanently deleted.
            - `listing` MarketplaceListing, required — A marketplace listing. Represent an available app in the app marketplace that can be installed to the organization. Marketplace apps only exist in config so they don't extend the Resource model.
              - …
            - `status` 'ready' | 'unauthorized', required — App installed status.
            - `type` 'sandbox', required — The app's type is Sandbox.
          - object — Custom Invoicing app can be used for interface with any invoicing or payment system. This app provides ways to manipulate invoices and payments, however the integration must rely on Notifications API to get notified about invoice changes.
            - `id` string, required — A unique identifier for the resource.
            - `name` string, required — Human-readable name for the resource. Between 1 and 256 characters.
            - `description` string — Optional description of the resource. Maximum 1024 characters.
            - `metadata` Metadata — Set of key-value pairs. Metadata can be used to store additional information about a resource.
            - `createdAt` string, date-time, required — Timestamp of when the resource was created.
            - `updatedAt` string, date-time, required — Timestamp of when the resource was last updated.
            - `deletedAt` string, date-time — Timestamp of when the resource was permanently deleted.
            - `listing` MarketplaceListing, required — A marketplace listing. Represent an available app in the app marketplace that can be installed to the organization. Marketplace apps only exist in config so they don't extend the Resource model.
              - …
            - `status` 'ready' | 'unauthorized', required — App installed status.
            - `type` 'custom_invoicing', required — The app's type is CustomInvoicing.
            - `enableDraftSyncHook` boolean, required — Enable draft.sync hook. If the hook is not enabled, the invoice will be progressed to the next state automatically.
            - `enableIssuingSyncHook` boolean, required — Enable issuing.sync hook. If the hook is not enabled, the invoice will be progressed to the next state automatically.
      - BillingProfileAppReferences — BillingProfileAppReferences represents the references (id, type) to the apps used by a billing profile
        - `tax` AppReference, required — App reference Can be used as a short reference to an app if the full app object is not needed.
          - `id` string, required — The ID of the app.
        - `invoicing` AppReference, required — App reference Can be used as a short reference to an app if the full app object is not needed.
          - `id` string, required — The ID of the app.
        - `payment` AppReference, required — App reference Can be used as a short reference to an app if the full app object is not needed.
          - `id` string, required — The ID of the app.
    - `sourceBillingProfileId` string, required — sourceBillingProfileID is the billing profile on which the workflow was based on. The profile is snapshotted on invoice creation, after which it can be altered independently of the profile itself.
    - `workflow` BillingWorkflow, required — BillingWorkflow represents the settings for a billing workflow.
      - `collection` BillingWorkflowCollectionSettings — Workflow collection specifies how to collect the pending line items for an invoice
        - `alignment` union — The alignment for collecting the pending line items into an invoice. Defaults to subscription, which means that we are to create a new invoice every time the a subscription period starts (for in advance items) or ends (for in arrears items).
          - object — BillingWorkflowCollectionAlignmentSubscription specifies the alignment for collecting the pending line items into an invoice.
            - `type` 'subscription', required — The type of alignment.
          - object — BillingWorkflowCollectionAlignmentAnchored specifies the alignment for collecting the pending line items into an invoice.
            - `type` 'anchored', required — The type of alignment.
            - `recurringPeriod` RecurringPeriodV2, required — Recurring period with an interval and an anchor.
              - …
        - `interval` string, ISO8601 — This grace period can be used to delay the collection of the pending line items specified in alignment. This is useful, in case of multiple subscriptions having slightly different billing periods.
      - `invoicing` BillingWorkflowInvoicingSettings — BillingWorkflowInvoicingSettings represents the invoice settings for a billing workflow
        - `autoAdvance` boolean — Whether to automatically issue the invoice after the draftPeriod has passed.
        - `draftPeriod` string, ISO8601 — The period for the invoice to be kept in draft status for manual reviews.
        - `dueAfter` string, ISO8601 — The period after which the invoice is due. With some payment solutions it's only applicable for manual collection method.
        - `progressiveBilling` boolean — Should progressive billing be allowed for this workflow?
        - `subscriptionEndProrationMode` 'bill_full_period' | 'bill_actual_period' — Billing workflow subscription end proration mode.
        - `defaultTaxConfig` TaxConfig — Set of provider specific tax configs.
          - `behavior` 'inclusive' | 'exclusive' — Tax behavior. This enum is used to specify whether tax is included in the price or excluded from the price.
          - `stripe` StripeTaxConfig — The tax config for Stripe.
            - `code` string, required — Product tax code. See: https://docs.stripe.com/tax/tax-codes
          - `customInvoicing` CustomInvoicingTaxConfig — Custom invoicing tax config.
            - `code` string, required — Tax code. The tax code should be interpreted by the custom invoicing provider.
          - `taxCodeId` string — Tax code reference. When both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence: the referenced tax code entity is used and `stripe.code` is ignored.
      - `payment` BillingWorkflowPaymentSettings — BillingWorkflowPaymentSettings represents the payment settings for a billing workflow
        - `collectionMethod` 'charge_automatically' | 'send_invoice' — CollectionMethod specifies how the invoice should be collected (automatic vs manual)
      - `tax` BillingWorkflowTaxSettings — BillingWorkflowTaxSettings represents the tax settings for a billing workflow
        - `enabled` boolean — Enable automatic tax calculation when tax is supported by the app. For example, with Stripe Invoicing when enabled, tax is calculated via Stripe Tax.
        - `enforced` boolean — Enforce tax calculation when tax is supported by the app. When enabled, OpenMeter will not allow to create an invoice without tax calculation. Enforcement is different per apps, for example, Stripe app requires customer to have a tax location when starting a paid subscription.
  - `lines` InvoiceLine[] — List of invoice lines representing each of the items sold to the customer.
    - `name` string, required — Human-readable name for the resource. Between 1 and 256 characters.
    - `description` string — Optional description of the resource. Maximum 1024 characters.
    - `metadata` Metadata — Set of key-value pairs. Metadata can be used to store additional information about a resource.
    - `createdAt` string, date-time, required — Timestamp of when the resource was created.
    - `updatedAt` string, date-time, required — Timestamp of when the resource was last updated.
    - `deletedAt` string, date-time — Timestamp of when the resource was permanently deleted.
    - `id` string, required — ID of the line.
    - `managedBy` 'subscription' | 'system' | 'manual', required — InvoiceLineManagedBy specifies who manages the line.
    - `status` 'valid' | 'detailed' | 'split', required — Line status specifies the status of the line.
    - `discounts` InvoiceLineDiscounts — InvoiceLineDiscounts represents the discounts applied to the invoice line by type.
      - `amount` InvoiceLineAmountDiscount[] — Amount based discounts applied to the line. Amount based discounts are deduced from the total price of the line.
        - `createdAt` string, date-time, required — Timestamp of when the resource was created.
        - `updatedAt` string, date-time, required — Timestamp of when the resource was last updated.
        - `deletedAt` string, date-time — Timestamp of when the resource was permanently deleted.
        - `id` string, required — ID of the charge or discount.
        - `reason` union, required — The reason for the discount.
          - object — The reason for the discount is a maximum spend.
            - `type` 'maximum_spend', required
          - object — The reason for the discount is a ratecard percentage.
            - `type` 'ratecard_percentage', required
            - `percentage` number, double, required — Numeric representation of a percentage 50% is represented as 50
            - `correlationId` string — Correlation ID for the discount. This is used to link discounts across different invoices (progressive billing use case). If not provided, the invoicing engine will auto-generate one. When editing an invoice line, please make sure to keep the same correlation ID of the discount or in progressive billing setups the discount amounts might be incorrect.
          - object — The reason for the discount is a ratecard usage.
            - `type` 'ratecard_usage', required
            - `quantity` string, required — Numeric represents an arbitrary precision number.
            - `correlationId` string — Correlation ID for the discount. This is used to link discounts across different invoices (progressive billing use case). If not provided, the invoicing engine will auto-generate one. When editing an invoice line, please make sure to keep the same correlation ID of the discount or in progressive billing setups the discount amounts might be incorrect.
        - `description` string — Text description as to why the discount was applied.
        - `externalIds` InvoiceLineAppExternalIds — InvoiceLineAppExternalIds contains the external IDs of the invoice in other apps such as Stripe.
          - `invoicing` string — The external ID of the invoice in the invoicing app if available.
          - `tax` string — The external ID of the invoice in the tax app if available.
        - `amount` string, required — Numeric represents an arbitrary precision number.
      - `usage` InvoiceLineUsageDiscount[] — Usage based discounts applied to the line. Usage based discounts are deduced from the usage of the line before price calculations are applied.
        - `createdAt` string, date-time, required — Timestamp of when the resource was created.
        - `updatedAt` string, date-time, required — Timestamp of when the resource was last updated.
        - `deletedAt` string, date-time — Timestamp of when the resource was permanently deleted.
        - `id` string, required — ID of the charge or discount.
        - `reason` union, required — The reason for the discount.
          - object — The reason for the discount is a maximum spend.
            - `type` 'maximum_spend', required
          - object — The reason for the discount is a ratecard percentage.
            - `type` 'ratecard_percentage', required
            - `percentage` number, double, required — Numeric representation of a percentage 50% is represented as 50
            - `correlationId` string — Correlation ID for the discount. This is used to link discounts across different invoices (progressive billing use case). If not provided, the invoicing engine will auto-generate one. When editing an invoice line, please make sure to keep the same correlation ID of the discount or in progressive billing setups the discount amounts might be incorrect.
          - object — The reason for the discount is a ratecard usage.
            - `type` 'ratecard_usage', required
            - `quantity` string, required — Numeric represents an arbitrary precision number.
            - `correlationId` string — Correlation ID for the discount. This is used to link discounts across different invoices (progressive billing use case). If not provided, the invoicing engine will auto-generate one. When editing an invoice line, please make sure to keep the same correlation ID of the discount or in progressive billing setups the discount amounts might be incorrect.
        - `description` string — Text description as to why the discount was applied.
        - `externalIds` InvoiceLineAppExternalIds — InvoiceLineAppExternalIds contains the external IDs of the invoice in other apps such as Stripe.
          - `invoicing` string — The external ID of the invoice in the invoicing app if available.
          - `tax` string — The external ID of the invoice in the tax app if available.
        - `quantity` string, required — Numeric represents an arbitrary precision number.
        - `preLinePeriodQuantity` string — Numeric represents an arbitrary precision number.
    - `creditAllocations` InvoiceLineCreditAllocation[] — Credit allocations applied to this line. Credits are deducted from the line total before taxes are applied.
      - `amount` string, required — Numeric represents an arbitrary precision number.
      - `description` string — Text description as to why the credit was allocated.
    - `invoice` InvoiceReference — Reference to an invoice.
      - `id` string, required — The ID of the invoice.
      - `number` string — InvoiceNumber is a unique identifier for the invoice, generated by the invoicing app. The uniqueness depends on a lot of factors: - app setting (unique per app or unique per customer) - multiple app scenarios (multiple apps generating invoices with the same prefix)
    - `currency` string, required — Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code. Custom three-letter currency codes are also supported for convenience.
    - `taxes` InvoiceLineTaxItem[] — Taxes applied to the invoice totals.
      - `config` TaxConfig — Set of provider specific tax configs.
        - `behavior` 'inclusive' | 'exclusive' — Tax behavior. This enum is used to specify whether tax is included in the price or excluded from the price.
        - `stripe` StripeTaxConfig — The tax config for Stripe.
          - `code` string, required — Product tax code. See: https://docs.stripe.com/tax/tax-codes
        - `customInvoicing` CustomInvoicingTaxConfig — Custom invoicing tax config.
          - `code` string, required — Tax code. The tax code should be interpreted by the custom invoicing provider.
        - `taxCodeId` string — Tax code reference. When both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence: the referenced tax code entity is used and `stripe.code` is ignored.
      - `percent` number, double — Numeric representation of a percentage 50% is represented as 50
      - `surcharge` string — Numeric represents an arbitrary precision number.
      - `behavior` 'inclusive' | 'exclusive' — InvoiceLineTaxBehavior details how the tax item is applied to the base amount. Inclusive means the tax is included in the base amount. Exclusive means the tax is added to the base amount.
    - `taxConfig` TaxConfig — Set of provider specific tax configs.
      - `behavior` 'inclusive' | 'exclusive' — Tax behavior. This enum is used to specify whether tax is included in the price or excluded from the price.
      - `stripe` StripeTaxConfig — The tax config for Stripe.
        - `code` string, required — Product tax code. See: https://docs.stripe.com/tax/tax-codes
      - `customInvoicing` CustomInvoicingTaxConfig — Custom invoicing tax config.
        - `code` string, required — Tax code. The tax code should be interpreted by the custom invoicing provider.
      - `taxCodeId` string — Tax code reference. When both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence: the referenced tax code entity is used and `stripe.code` is ignored.
    - `totals` InvoiceTotals, required — Totals contains the summaries of all calculations for the invoice.
      - `amount` string, required — Numeric represents an arbitrary precision number.
      - `chargesTotal` string, required — Numeric represents an arbitrary precision number.
      - `discountsTotal` string, required — Numeric represents an arbitrary precision number.
      - `creditsTotal` string, required — Numeric represents an arbitrary precision number.
      - `taxesInclusiveTotal` string, required — Numeric represents an arbitrary precision number.
      - `taxesExclusiveTotal` string, required — Numeric represents an arbitrary precision number.
      - `taxesTotal` string, required — Numeric represents an arbitrary precision number.
      - `total` string, required — Numeric represents an arbitrary precision number.
    - `period` Period, required — A period with a start and end time.
      - `from` string, date-time, required — Period start time.
      - `to` string, date-time, required — Period end time.
    - `invoiceAt` string, date-time, required — The time this line item should be invoiced.
    - `externalIds` InvoiceLineAppExternalIds — InvoiceLineAppExternalIds contains the external IDs of the invoice in other apps such as Stripe.
      - `invoicing` string — The external ID of the invoice in the invoicing app if available.
      - `tax` string — The external ID of the invoice in the tax app if available.
    - `subscription` InvoiceLineSubscriptionReference — InvoiceLineSubscriptionReference contains the references to the subscription that this line is related to.
      - `subscription` IDResource, required — IDResource is a resouce with an ID.
        - `id` string, required — A unique identifier for the resource.
      - `phase` IDResource, required — IDResource is a resouce with an ID.
        - `id` string, required — A unique identifier for the resource.
      - `item` IDResource, required — IDResource is a resouce with an ID.
        - `id` string, required — A unique identifier for the resource.
      - `billingPeriod` Period, required — A period with a start and end time.
        - `from` string, date-time, required — Period start time.
        - `to` string, date-time, required — Period end time.
    - `type` 'usage_based', required — Type of the line.
    - `price` union — The price of the usage based rate card.
      - object — Flat price with payment term.
        - `type` 'flat', required — The type of the price.
        - `amount` string, required — Numeric represents an arbitrary precision number.
        - `paymentTerm` 'in_advance' | 'in_arrears' — The payment term of a flat price. One of: in_advance or in_arrears.
      - object — Unit price with spend commitments.
        - `type` 'unit', required — The type of the price.
        - `amount` string, required — Numeric represents an arbitrary precision number.
        - `minimumAmount` string — Numeric represents an arbitrary precision number.
        - `maximumAmount` string — Numeric represents an arbitrary precision number.
      - object — Tiered price with spend commitments.
        - `type` 'tiered', required — The type of the price. One of: flat, unit, or tiered.
        - `mode` 'volume' | 'graduated', required — The mode of the tiered price.
        - `tiers` PriceTier[], required — The tiers of the tiered price. At least one price component is required in each tier.
          - `upToAmount` string — Numeric represents an arbitrary precision number.
          - `flatPrice` FlatPrice, required — Flat price.
            - `type` 'flat', required — The type of the price.
            - `amount` string, required — Numeric represents an arbitrary precision number.
          - `unitPrice` UnitPrice, required — Unit price.
            - `type` 'unit', required — The type of the price.
            - `amount` string, required — Numeric represents an arbitrary precision number.
        - `minimumAmount` string — Numeric represents an arbitrary precision number.
        - `maximumAmount` string — Numeric represents an arbitrary precision number.
      - object — Dynamic price with spend commitments.
        - `type` 'dynamic', required — The type of the price.
        - `multiplier` string — Numeric represents an arbitrary precision number.
        - `minimumAmount` string — Numeric represents an arbitrary precision number.
        - `maximumAmount` string — Numeric represents an arbitrary precision number.
      - object — Package price with spend commitments.
        - `type` 'package', required — The type of the price.
        - `amount` string, required — Numeric represents an arbitrary precision number.
        - `quantityPerPackage` string, required — Numeric represents an arbitrary precision number.
        - `minimumAmount` string — Numeric represents an arbitrary precision number.
        - `maximumAmount` string — Numeric represents an arbitrary precision number.
    - `featureKey` string — The feature that the usage is based on.
    - `children` InvoiceDetailedLine[] — The lines detailing the item or service sold.
      - `name` string, required — Human-readable name for the resource. Between 1 and 256 characters.
      - `description` string — Optional description of the resource. Maximum 1024 characters.
      - `metadata` Metadata — Set of key-value pairs. Metadata can be used to store additional information about a resource.
      - `createdAt` string, date-time, required — Timestamp of when the resource was created.
      - `updatedAt` string, date-time, required — Timestamp of when the resource was last updated.
      - `deletedAt` string, date-time — Timestamp of when the resource was permanently deleted.
      - `id` string, required — ID of the line.
      - `managedBy` 'subscription' | 'system' | 'manual', required — InvoiceLineManagedBy specifies who manages the line.
      - `status` 'valid' | 'detailed' | 'split', required — Line status specifies the status of the line.
      - `discounts` InvoiceLineDiscounts — InvoiceLineDiscounts represents the discounts applied to the invoice line by type.
        - `amount` InvoiceLineAmountDiscount[] — Amount based discounts applied to the line. Amount based discounts are deduced from the total price of the line.
          - `createdAt` string, date-time, required — Timestamp of when the resource was created.
          - `updatedAt` string, date-time, required — Timestamp of when the resource was last updated.
          - `deletedAt` string, date-time — Timestamp of when the resource was permanently deleted.
          - `id` string, required — ID of the charge or discount.
          - `reason` union, required — The reason for the discount.
            - object — The reason for the discount is a maximum spend.
              - …
            - object — The reason for the discount is a ratecard percentage.
              - …
            - object — The reason for the discount is a ratecard usage.
              - …
          - `description` string — Text description as to why the discount was applied.
          - `externalIds` InvoiceLineAppExternalIds — InvoiceLineAppExternalIds contains the external IDs of the invoice in other apps such as Stripe.
            - `invoicing` string — The external ID of the invoice in the invoicing app if available.
            - `tax` string — The external ID of the invoice in the tax app if available.
          - `amount` string, required — Numeric represents an arbitrary precision number.
        - `usage` InvoiceLineUsageDiscount[] — Usage based discounts applied to the line. Usage based discounts are deduced from the usage of the line before price calculations are applied.
          - `createdAt` string, date-time, required — Timestamp of when the resource was created.
          - `updatedAt` string, date-time, required — Timestamp of when the resource was last updated.
          - `deletedAt` string, date-time — Timestamp of when the resource was permanently deleted.
          - `id` string, required — ID of the charge or discount.
          - `reason` union, required — The reason for the discount.
            - object — The reason for the discount is a maximum spend.
              - …
            - object — The reason for the discount is a ratecard percentage.
              - …
            - object — The reason for the discount is a ratecard usage.
              - …
          - `description` string — Text description as to why the discount was applied.
          - `externalIds` InvoiceLineAppExternalIds — InvoiceLineAppExternalIds contains the external IDs of the invoice in other apps such as Stripe.
            - `invoicing` string — The external ID of the invoice in the invoicing app if available.
            - `tax` string — The external ID of the invoice in the tax app if available.
          - `quantity` string, required — Numeric represents an arbitrary precision number.
          - `preLinePeriodQuantity` string — Numeric represents an arbitrary precision number.
      - `creditAllocations` InvoiceLineCreditAllocation[] — Credit allocations applied to this line. Credits are deducted from the line total before taxes are applied.
        - `amount` string, required — Numeric represents an arbitrary precision number.
        - `description` string — Text description as to why the credit was allocated.
      - `invoice` InvoiceReference — Reference to an invoice.
        - `id` string, required — The ID of the invoice.
        - `number` string — InvoiceNumber is a unique identifier for the invoice, generated by the invoicing app. The uniqueness depends on a lot of factors: - app setting (unique per app or unique per customer) - multiple app scenarios (multiple apps generating invoices with the same prefix)
      - `currency` string, required — Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code. Custom three-letter currency codes are also supported for convenience.
      - `taxes` InvoiceLineTaxItem[] — Taxes applied to the invoice totals.
        - `config` TaxConfig — Set of provider specific tax configs.
          - `behavior` 'inclusive' | 'exclusive' — Tax behavior. This enum is used to specify whether tax is included in the price or excluded from the price.
          - `stripe` StripeTaxConfig — The tax config for Stripe.
            - `code` string, required — Product tax code. See: https://docs.stripe.com/tax/tax-codes
          - `customInvoicing` CustomInvoicingTaxConfig — Custom invoicing tax config.
            - `code` string, required — Tax code. The tax code should be interpreted by the custom invoicing provider.
          - `taxCodeId` string — Tax code reference. When both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence: the referenced tax code entity is used and `stripe.code` is ignored.
        - `percent` number, double — Numeric representation of a percentage 50% is represented as 50
        - `surcharge` string — Numeric represents an arbitrary precision number.
        - `behavior` 'inclusive' | 'exclusive' — InvoiceLineTaxBehavior details how the tax item is applied to the base amount. Inclusive means the tax is included in the base amount. Exclusive means the tax is added to the base amount.
      - `taxConfig` TaxConfig — Set of provider specific tax configs.
        - `behavior` 'inclusive' | 'exclusive' — Tax behavior. This enum is used to specify whether tax is included in the price or excluded from the price.
        - `stripe` StripeTaxConfig — The tax config for Stripe.
          - `code` string, required — Product tax code. See: https://docs.stripe.com/tax/tax-codes
        - `customInvoicing` CustomInvoicingTaxConfig — Custom invoicing tax config.
          - `code` string, required — Tax code. The tax code should be interpreted by the custom invoicing provider.
        - `taxCodeId` string — Tax code reference. When both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence: the referenced tax code entity is used and `stripe.code` is ignored.
      - `totals` InvoiceTotals, required — Totals contains the summaries of all calculations for the invoice.
        - `amount` string, required — Numeric represents an arbitrary precision number.
        - `chargesTotal` string, required — Numeric represents an arbitrary precision number.
        - `discountsTotal` string, required — Numeric represents an arbitrary precision number.
        - `creditsTotal` string, required — Numeric represents an arbitrary precision number.
        - `taxesInclusiveTotal` string, required — Numeric represents an arbitrary precision number.
        - `taxesExclusiveTotal` string, required — Numeric represents an arbitrary precision number.
        - `taxesTotal` string, required — Numeric represents an arbitrary precision number.
        - `total` string, required — Numeric represents an arbitrary precision number.
      - `period` Period, required — A period with a start and end time.
        - `from` string, date-time, required — Period start time.
        - `to` string, date-time, required — Period end time.
      - `externalIds` InvoiceLineAppExternalIds — InvoiceLineAppExternalIds contains the external IDs of the invoice in other apps such as Stripe.
        - `invoicing` string — The external ID of the invoice in the invoicing app if available.
        - `tax` string — The external ID of the invoice in the tax app if available.
      - `subscription` InvoiceLineSubscriptionReference — InvoiceLineSubscriptionReference contains the references to the subscription that this line is related to.
        - `subscription` IDResource, required — IDResource is a resouce with an ID.
          - `id` string, required — A unique identifier for the resource.
        - `phase` IDResource, required — IDResource is a resouce with an ID.
          - `id` string, required — A unique identifier for the resource.
        - `item` IDResource, required — IDResource is a resouce with an ID.
          - `id` string, required — A unique identifier for the resource.
        - `billingPeriod` Period, required — A period with a start and end time.
          - `from` string, date-time, required — Period start time.
          - `to` string, date-time, required — Period end time.
      - `invoiceAt` string, date-time, required — The time this line item should be invoiced.
      - `type` 'flat_fee', required — Type of the line.
      - `perUnitAmount` string — Numeric represents an arbitrary precision number.
      - `paymentTerm` 'in_advance' | 'in_arrears' — The payment term of a flat price. One of: in_advance or in_arrears.
      - `quantity` string — Numeric represents an arbitrary precision number.
      - `rateCard` InvoiceDetailedLineRateCard — InvoiceDetailedLineRateCard represents the rate card (intent) for a flat fee line.
        - `taxConfig` TaxConfig — Set of provider specific tax configs.
          - `behavior` 'inclusive' | 'exclusive' — Tax behavior. This enum is used to specify whether tax is included in the price or excluded from the price.
          - `stripe` StripeTaxConfig — The tax config for Stripe.
            - `code` string, required — Product tax code. See: https://docs.stripe.com/tax/tax-codes
          - `customInvoicing` CustomInvoicingTaxConfig — Custom invoicing tax config.
            - `code` string, required — Tax code. The tax code should be interpreted by the custom invoicing provider.
          - `taxCodeId` string — Tax code reference. When both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence: the referenced tax code entity is used and `stripe.code` is ignored.
        - `price` FlatPriceWithPaymentTerm, required — Flat price with payment term.
          - `type` 'flat', required — The type of the price.
          - `amount` string, required — Numeric represents an arbitrary precision number.
          - `paymentTerm` 'in_advance' | 'in_arrears' — The payment term of a flat price. One of: in_advance or in_arrears.
        - `quantity` string — Numeric represents an arbitrary precision number.
        - `discounts` BillingDiscounts — A discount by type.
          - `percentage` BillingDiscountPercentage — A percentage discount.
            - `percentage` number, double, required — Numeric representation of a percentage 50% is represented as 50
            - `correlationId` string — Correlation ID for the discount. This is used to link discounts across different invoices (progressive billing use case). If not provided, the invoicing engine will auto-generate one. When editing an invoice line, please make sure to keep the same correlation ID of the discount or in progressive billing setups the discount amounts might be incorrect.
          - `usage` BillingDiscountUsage — A usage discount.
            - `quantity` string, required — Numeric represents an arbitrary precision number.
            - `correlationId` string — Correlation ID for the discount. This is used to link discounts across different invoices (progressive billing use case). If not provided, the invoicing engine will auto-generate one. When editing an invoice line, please make sure to keep the same correlation ID of the discount or in progressive billing setups the discount amounts might be incorrect.
      - `category` 'regular' | 'commitment' — InvoiceDetailedLineCostCategory determines if the flat fee is a regular fee due to use due to a commitment.
    - `rateCard` InvoiceUsageBasedRateCard — InvoiceUsageBasedRateCard represents the rate card (intent) for an usage-based line.
      - `featureKey` string — The feature the customer is entitled to use.
      - `taxConfig` TaxConfig — Set of provider specific tax configs.
        - `behavior` 'inclusive' | 'exclusive' — Tax behavior. This enum is used to specify whether tax is included in the price or excluded from the price.
        - `stripe` StripeTaxConfig — The tax config for Stripe.
          - `code` string, required — Product tax code. See: https://docs.stripe.com/tax/tax-codes
        - `customInvoicing` CustomInvoicingTaxConfig — Custom invoicing tax config.
          - `code` string, required — Tax code. The tax code should be interpreted by the custom invoicing provider.
        - `taxCodeId` string — Tax code reference. When both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence: the referenced tax code entity is used and `stripe.code` is ignored.
      - `price` union, required — The price of the usage based rate card.
        - object — Flat price with payment term.
          - `type` 'flat', required — The type of the price.
          - `amount` string, required — Numeric represents an arbitrary precision number.
          - `paymentTerm` 'in_advance' | 'in_arrears' — The payment term of a flat price. One of: in_advance or in_arrears.
        - object — Unit price with spend commitments.
          - `type` 'unit', required — The type of the price.
          - `amount` string, required — Numeric represents an arbitrary precision number.
          - `minimumAmount` string — Numeric represents an arbitrary precision number.
          - `maximumAmount` string — Numeric represents an arbitrary precision number.
        - object — Tiered price with spend commitments.
          - `type` 'tiered', required — The type of the price. One of: flat, unit, or tiered.
          - `mode` 'volume' | 'graduated', required — The mode of the tiered price.
          - `tiers` PriceTier[], required — The tiers of the tiered price. At least one price component is required in each tier.
            - `upToAmount` string — Numeric represents an arbitrary precision number.
            - `flatPrice` FlatPrice, required — Flat price.
              - …
            - `unitPrice` UnitPrice, required — Unit price.
              - …
          - `minimumAmount` string — Numeric represents an arbitrary precision number.
          - `maximumAmount` string — Numeric represents an arbitrary precision number.
        - object — Dynamic price with spend commitments.
          - `type` 'dynamic', required — The type of the price.
          - `multiplier` string — Numeric represents an arbitrary precision number.
          - `minimumAmount` string — Numeric represents an arbitrary precision number.
          - `maximumAmount` string — Numeric represents an arbitrary precision number.
        - object — Package price with spend commitments.
          - `type` 'package', required — The type of the price.
          - `amount` string, required — Numeric represents an arbitrary precision number.
          - `quantityPerPackage` string, required — Numeric represents an arbitrary precision number.
          - `minimumAmount` string — Numeric represents an arbitrary precision number.
          - `maximumAmount` string — Numeric represents an arbitrary precision number.
      - `discounts` BillingDiscounts — A discount by type.
        - `percentage` BillingDiscountPercentage — A percentage discount.
          - `percentage` number, double, required — Numeric representation of a percentage 50% is represented as 50
          - `correlationId` string — Correlation ID for the discount. This is used to link discounts across different invoices (progressive billing use case). If not provided, the invoicing engine will auto-generate one. When editing an invoice line, please make sure to keep the same correlation ID of the discount or in progressive billing setups the discount amounts might be incorrect.
        - `usage` BillingDiscountUsage — A usage discount.
          - `quantity` string, required — Numeric represents an arbitrary precision number.
          - `correlationId` string — Correlation ID for the discount. This is used to link discounts across different invoices (progressive billing use case). If not provided, the invoicing engine will auto-generate one. When editing an invoice line, please make sure to keep the same correlation ID of the discount or in progressive billing setups the discount amounts might be incorrect.
    - `quantity` string — Numeric represents an arbitrary precision number.
    - `meteredQuantity` string — Numeric represents an arbitrary precision number.
    - `preLinePeriodQuantity` string — Numeric represents an arbitrary precision number.
    - `meteredPreLinePeriodQuantity` string — Numeric represents an arbitrary precision number.
  - `payment` InvoicePaymentTerms — Payment contains details as to how the invoice should be paid.
    - `terms` union — PaymentTerms defines the terms for payment.
      - PaymentTermInstant — PaymentTermInstant defines the terms for payment on receipt of invoice.
        - `type` 'instant', required — Type of terms to be applied.
        - `detail` string — Text detail of the chosen payment terms.
        - `notes` string — Description of the conditions for payment.
      - PaymentTermDueDate — PaymentTermDueDate defines the terms for payment on a specific date.
        - `type` 'due_date', required — Type of terms to be applied.
        - `detail` string — Text detail of the chosen payment terms.
        - `notes` string — Description of the conditions for payment.
        - `dueAt` PaymentDueDate[], required — When the payment is due.
          - `dueAt` string, date-time, required — When the payment is due.
          - `notes` string — Other details to take into account for the due date.
          - `amount` string, required — Numeric represents an arbitrary precision number.
          - `percent` number, double — Numeric representation of a percentage 50% is represented as 50
          - `currency` string — Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code. Custom three-letter currency codes are also supported for convenience.
  - `validationIssues` ValidationIssue[] — Validation issues reported by the invoice workflow.
    - `createdAt` string, date-time, required — Timestamp of when the resource was created.
    - `updatedAt` string, date-time, required — Timestamp of when the resource was last updated.
    - `deletedAt` string, date-time — Timestamp of when the resource was permanently deleted.
    - `id` string, required — ID of the charge or discount.
    - `severity` 'critical' | 'warning', required — ValidationIssueSeverity describes the severity of a validation issue. Issues with severity "critical" will prevent the invoice from being issued.
    - `field` string — The field that the issue is related to, if available in JSON path format.
    - `code` string — Machine indentifiable code for the issue, if available.
    - `component` string, required — Component reporting the issue.
    - `message` string, required — A human-readable description of the issue.
    - `metadata` Metadata — Set of key-value pairs. Metadata can be used to store additional information about a resource.
  - `externalIds` InvoiceAppExternalIds — InvoiceAppExternalIds contains the external IDs of the invoice in other apps such as Stripe.
    - `invoicing` string — The external ID of the invoice in the invoicing app if available.
    - `tax` string — The external ID of the invoice in the tax app if available.
    - `payment` string — The external ID of the invoice in the payment app if available.

## Other responses

- `400` — The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
- `401` — The request has not been applied because it lacks valid authentication credentials for the target resource.
- `403` — The server understood the request but refuses to authorize it.
- `404` — The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
- `412` — One or more conditions given in the request header fields evaluated to false when tested on the server.
- `500` — The server encountered an unexpected condition that prevented it from fulfilling the request.
- `503` — The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.
- `default` — An unexpected error response.

---

[API](https://skmtc.net/openmeterio/apis/openmeter-api.md) · [All operations](https://skmtc.net/openmeterio/apis/openmeter-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openmeterio/openmeter-api/versions/927d82ffe647/schema)
