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

# Reissue Invoice

> Voids an open send-invoice Stripe invoice and issues a replacement with the same line items. An invoice template can supply the replacement's footer (e.g. bank details) and memo. The replacement keeps the original due date unless net_terms_days is passed, which is required once the original is past due. Pass update_customer_email to change the customer's billing email first so the replacement is sent there. The replacement stays linked to the same subscription and fulfils the same pending plan when paid.

### Body Parameters

The Autumn invoice ID to void and replace.

ID of an invoice template (configured in billing settings) whose footer and memo are applied to the replacement invoice.

Number of days the customer has to pay the replacement invoice. Defaults to the original invoice's due date; required when that date has already passed. A card-charged invoice has no due date and its replacement is charged immediately; setting this makes the replacement a send-invoice one instead.

If true, returns the replacement invoice's lines and totals without voiding anything or issuing it.

How far the replacement advances: draft, finalize (opened without emails, reminders or charges) or send. Defaults to send. The original is retired either way.

Where a paid original's money goes. customer\_balance (the default) credits the customer's balance, which then covers the replacement. refund and out\_of\_band credit the replacement's cost for it to draw on and return only the difference, to the original payment method (refund) or as money returned outside Stripe (out\_of\_band); they are rejected when the replacement costs more than the original, when nothing is left to return, or when the original was paid from customer credit. Ignored when the original is open or a draft, since it is voided instead.

Updates the customer's billing email before the replacement is issued, so Stripe sends the new invoice to this address.

Changes that apply to the replacement invoice only.

**properties**

Enable or disable Stripe automatic tax on the replacement. Omit to inherit. Enabling clears inherited manual tax rates; use tax\_rate\_id: null to remove all tax.

Fields shown on this invoice only, such as a PO number. Up to four; pass an empty array to clear them.

**properties**

Stripe tax rate applied to every line. Omit to keep the original's tax, or pass null to issue the replacement with no tax.

Your own Stripe tax registrations (atx\_...) shown as the seller's tax numbers. Not the customer's.

Footer text, overriding the original's and any template's.

Memo shown near the top of the invoice.

Payment method types the customer can pay the replacement with, e.g. card and customer\_balance (bank transfer). Overrides the org's allowed payment methods. A method other than card on a card-charged invoice sends the replacement for payment instead, on net\_terms\_days or the default terms.

Changes written to the customer, which the replacement snapshots and later invoices inherit.

**properties**

Billing email. Same as update\_customer\_email; passing both with different values is rejected.

Customer name shown on this and every later invoice.

Billing address. Drives tax when the org uses Stripe Tax, and is snapshotted onto the replacement.

**properties**

The customer's own tax registrations, e.g. \{ type: 'eu\_vat', value: 'FR123...' }. Replaces the existing set; pass an empty array to remove them.

**properties**

Custom fields shown on this and every future invoice. Use invoice.custom\_fields for this invoice alone.

**properties**

Add, change or drop lines relative to the original.

**properties**

**properties**

Amount in dollars for this line item (e.g. 10.50). Can be negative for credits.

Description for the line item.

The catalog plan (or variant) whose pricing to use.

Plan version. Defaults to the active version.

The entity this plan's lines are billed to. Omit to inherit the request's entity\_id, or pass null for customer-level.

Pricing overrides applied to this invoice only. The catalog and the customer's plan are not changed.

**properties**

Override the plan's base price for this invoice. Pass null or an amount of 0 to omit the base price line.

**properties**

Base price amount for the plan, in major currency units (e.g. dollars).

Billing interval (e.g. 'month', 'year').

Number of intervals per billing cycle. Defaults to 1.

Bill this line under an existing Stripe price instead of an inline one.

**properties**

**properties**

Stripe price ID. For prepaid with included > 0 this is the V2 price.

Override feature pricing for this invoice. Only pricing fields are accepted; grants, resets and rollovers are not part of an invoice.

**properties**

The feature whose pricing is overridden on this invoice.

Pricing to use for this feature on this invoice.

**properties**

Price per billing\_units after included usage. Either 'amount' or 'tiers' is required.

Tiered pricing. Either 'amount' or 'tiers' is required.

**properties**

Per-currency amounts for this tier. Tier boundaries ('to') are shared across all currencies.

**properties**

Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').

Per-unit amount for this tier in this currency.

Flat amount for this tier in this currency, if the tier uses one.

How tiers price usage. 'graduated' (default) charges each unit at the rate of the tier it falls in. 'volume' picks one tier from total usage. On usage-based items it bills only usage past the included amount, at the rate of the tier total usage reaches, plus its flat\_amount. On prepaid items it charges every unit, the included ones too, at that tier's rate plus its flat\_amount.

Billing interval. For usage-based features, should match reset.interval, unless the price has graduated tiers and reset.interval is a whole multiple of it: each invoice then bills only the newly owed usage, at the tier the reset period has reached.

Number of intervals per billing cycle. Defaults to 1.

Units per price increment. Usage is rounded UP when billed (e.g. billing\_units=100 means 101 rounds to 200).

'prepaid' for upfront payment (seats), 'usage\_based' for pay-as-you-go.

Bill this line under an existing Stripe price instead of an inline one.

**properties**

**properties**

Stripe price ID. For prepaid with included > 0 this is the V2 price.

For credit-system features: a credit rate card to use when converting `usage` on this invoice.

**properties**

Replaces the feature's credit\_schema entirely for this invoice.

**properties**

ID of the metered feature that draws from this credit system.

Number of metered-feature units priced together. Defaults to one when omitted.

Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.

Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.

**properties**

Event properties this entry applies to. Every key must equal the tracked property, compared as strings.

Multiplies the matched rate. All matching multipliers stack.

Added to the rate after every factor is applied, in credits per billing-unit group.

**properties**

Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.

Credits consumed per billing-unit group within this tier.

Credits consumed per billing-unit group.

**properties**

The feature to bill.

Which of the feature's prices to use: 'prepaid' or 'usage\_based'.

Billable feature units in total, exclusive of any included usage. Not per seat or per entity. For a credit-system feature this is the number of credits.

For credit-system features: billable units of the source features, converted through the credit rate card. Mutually exclusive with quantity.

**properties**

The metered feature whose units are being converted.

Billable units of the metered feature. Converted to the credit-system feature through its rate card.

Event properties used to pick the rate card dimension and multipliers.

Whether to prorate this line against its period. Defaults to true for prepaid and false for usage-based.

Start of the period this line covers, in milliseconds. Defaults to the parent's period, then the invoice's period\_start / period\_end when sent.

End of the period this line covers, in milliseconds. Given together with period\_start.

**properties**

The license plan linked to the parent plan.

Billable seats, exclusive of any included seats.

Pricing overrides for this license on this invoice only. The catalog and the customer's plan are not changed.

**properties**

Override the license's per-seat price on this invoice.

**properties**

Base price amount for the plan, in major currency units (e.g. dollars).

Billing interval (e.g. 'month', 'year').

Number of intervals per billing cycle. Defaults to 1.

Bill this line under an existing Stripe price instead of an inline one.

**properties**

**properties**

Stripe price ID. For prepaid with included > 0 this is the V2 price.

Override the license plan's feature pricing for this license's feature\_quantities on this invoice. The parent plan's customize.items never apply to license features.

**properties**

The feature whose pricing is overridden on this invoice.

Pricing to use for this feature on this invoice.

**properties**

Price per billing\_units after included usage. Either 'amount' or 'tiers' is required.

Tiered pricing. Either 'amount' or 'tiers' is required.

**properties**

Per-currency amounts for this tier. Tier boundaries ('to') are shared across all currencies.

**properties**

Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').

Per-unit amount for this tier in this currency.

Flat amount for this tier in this currency, if the tier uses one.

How tiers price usage. 'graduated' (default) charges each unit at the rate of the tier it falls in. 'volume' picks one tier from total usage. On usage-based items it bills only usage past the included amount, at the rate of the tier total usage reaches, plus its flat\_amount. On prepaid items it charges every unit, the included ones too, at that tier's rate plus its flat\_amount.

Billing interval. For usage-based features, should match reset.interval, unless the price has graduated tiers and reset.interval is a whole multiple of it: each invoice then bills only the newly owed usage, at the tier the reset period has reached.

Number of intervals per billing cycle. Defaults to 1.

Units per price increment. Usage is rounded UP when billed (e.g. billing\_units=100 means 101 rounds to 200).

'prepaid' for upfront payment (seats), 'usage\_based' for pay-as-you-go.

Bill this line under an existing Stripe price instead of an inline one.

**properties**

**properties**

Stripe price ID. For prepaid with included > 0 this is the V2 price.

For credit-system features: a credit rate card to use when converting `usage` on this invoice.

**properties**

Replaces the feature's credit\_schema entirely for this invoice.

**properties**

ID of the metered feature that draws from this credit system.

Number of metered-feature units priced together. Defaults to one when omitted.

Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.

Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.

**properties**

Event properties this entry applies to. Every key must equal the tracked property, compared as strings.

Multiplies the matched rate. All matching multipliers stack.

Added to the rate after every factor is applied, in credits per billing-unit group.

**properties**

Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.

Credits consumed per billing-unit group within this tier.

Credits consumed per billing-unit group.

Feature charges priced through the license plan.

**properties**

The feature to bill.

Which of the feature's prices to use: 'prepaid' or 'usage\_based'.

Billable feature units in total, exclusive of any included usage. Not per seat or per entity. For a credit-system feature this is the number of credits.

For credit-system features: billable units of the source features, converted through the credit rate card. Mutually exclusive with quantity.

**properties**

The metered feature whose units are being converted.

Billable units of the metered feature. Converted to the credit-system feature through its rate card.

Event properties used to pick the rate card dimension and multipliers.

Whether to prorate this line against its period. Defaults to true for prepaid and false for usage-based.

Start of the period this line covers, in milliseconds. Defaults to the parent's period, then the invoice's period\_start / period\_end when sent.

End of the period this line covers, in milliseconds. Given together with period\_start.

Whether to prorate seat charges against the license's period. Defaults to true.

Start of the period this line covers, in milliseconds. Defaults to the parent's period, then the invoice's period\_start / period\_end when sent.

End of the period this line covers, in milliseconds. Given together with period\_start.

Discounts applied only to this plan's lines.

**properties**

The ID of the reward to apply as a discount.

The promotion code to apply as a discount.

Whether to prorate the base price against the plan's period. Defaults to true.

Start of the period this line covers, in milliseconds. Defaults to the parent's period, then the invoice's period\_start / period\_end when sent.

End of the period this line covers, in milliseconds. Given together with period\_start.

**properties**

The invoice line item ID from invoices.list items.

Invoice line item IDs to leave off the replacement.

### Response

The replacement invoice. Null when preview is true.

**properties**

The Autumn invoice ID

Array of plan IDs included in this invoice

The Stripe invoice ID

The billing processor that owns this invoice.

The status of the invoice

The total amount of the invoice

The amount paid on the invoice, in major currency units. Null on invoices recorded before amounts paid were tracked.

The total amount refunded on the invoice, in major currency units

The currency code for the invoice

Timestamp when the invoice was created

URL to the Stripe-hosted invoice page

The ID of the customer this invoice belongs to. Null for customers created without an ID.

The ID of the entity this invoice belongs to, if entity-scoped

Line items on the invoice, one per line as shown in Stripe. Capped at 100. Empty for invoices recorded before line item storage.

**properties**

The Autumn invoice line item ID. Stable across reads, and can be used to reference this line in later calls.

Description of the invoice line item

Timestamp when the billing period starts

Timestamp when the billing period ends

The plan this line item came from. Null for lines with no Autumn plan behind them.

The ID of the feature associated with this line item

The name of the feature associated with this line item

Quantity actually charged on this line. Null on fixed-price lines.

Amount charged on this line, pre-discount and pre-tax. Negative for credits.

How this line splits by entity. Empty for customer-level lines. Only populated for invoices finalized after entity attribution shipped.

**properties**

The entity this share of the line item is attributed to

Quantity charged to this entity. Null on fixed-price lines.

Amount attributed to this entity, pre-discount and pre-tax

The Autumn ID of the original invoice, now void. Null when previewing, and when the original was paid and got a credit note instead.

The Stripe credit note issued against a paid original, which returns its amount as destination says. Null when the original was open and voided instead.

The replacement's lines and totals.

**properties**

**properties**

The entity this line is billed to. Null for customer-level lines.

**properties**

The customer's Stripe credit balance and how much of it this invoice consumes.

**properties**

Stripe customer credit balance available, expressed as a positive number in major currency units.

How much of that balance this invoice consumes, capped at its total. The rest stays on the customer.

Three-letter currency code.

What the customer pays: the total less any credit applied.

How the invoice is issued on approval: draft, finalize (opened without emails, reminders or charges) or send.

```json 200 theme={null}
{
  "invoice": {
    "id": "inv_3c4d5e6f7g8h9i",
    "customer_id": "cus_123",
    "entity_id": null,
    "plan_ids": [
      "pro_plan"
    ],
    "stripe_id": "in_1A2B3C4D5E6F7G8H",
    "processor_type": "stripe",
    "status": "open",
    "total": 29.99,
    "amount_paid": 29.99,
    "refunded_amount": 0,
    "currency": "usd",
    "created_at": 1759247877000,
    "hosted_invoice_url": "https://invoice.stripe.com/i/acct_123/test_456",
    "items": [
      {
        "id": "invoice_li_2b3c4d5e6f7g8h",
        "description": "Pro plan",
        "plan_id": "pro_plan",
        "feature_id": null,
        "feature_name": null,
        "quantity": null,
        "amount": 20,
        "period_start": 1759247877000,
        "period_end": 1761839877000,
        "entities": []
      },
      {
        "id": "invoice_li_3c4d5e6f7g8h9i",
        "description": "AI credits",
        "plan_id": "pro_plan",
        "feature_id": "ai_credits",
        "feature_name": "AI Credits",
        "quantity": 4995,
        "amount": 9.99,
        "period_start": 1759247877000,
        "period_end": 1761839877000,
        "entities": [
          {
            "entity_id": "acme-docs-prod",
            "quantity": 4995,
            "amount": 9.99
          }
        ]
      }
    ]
  },
  "voided_invoice_id": "inv_2b3c4d5e6f7g8h",
  "preview": {
    "currency": "usd",
    "lines": [],
    "subtotal": 29.99,
    "discount_total": 0,
    "tax": null,
    "total": 29.99,
    "amount_due": 29.99,
    "due_date": 1761839877000
  }
}
```


## OpenAPI

````yaml openapi POST /v1/invoices.reissue
openapi: 3.1.0
info:
  title: Autumn API
  version: 2.6.0
servers:
  - url: https://api.useautumn.com
    description: Production server
security:
  - secretKey: []
paths:
  /v1/invoices.reissue:
    post:
      tags:
        - invoices
      description: >-
        Voids an open send-invoice Stripe invoice and issues a replacement with
        the same line items. An invoice template can supply the replacement's
        footer (e.g. bank details) and memo. The replacement keeps the original
        due date unless net_terms_days is passed, which is required once the
        original is past due. Pass update_customer_email to change the
        customer's billing email first so the replacement is sent there. The
        replacement stays linked to the same subscription and fulfils the same
        pending plan when paid.
      operationId: reissueInvoice
      parameters:
        - name: x-api-version
          in: header
          required: true
          schema:
            type: string
            default: 2.6.0
          x-speakeasy-globals-hidden: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                invoice_id:
                  type: string
                  description: The Autumn invoice ID to void and replace.
                invoice_template_id:
                  type: string
                  description: >-
                    ID of an invoice template (configured in billing settings)
                    whose footer and memo are applied to the replacement
                    invoice.
                net_terms_days:
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                  exclusiveMinimum: 0
                  description: >-
                    Number of days the customer has to pay the replacement
                    invoice. Defaults to the original invoice's due date;
                    required when that date has already passed. A card-charged
                    invoice has no due date and its replacement is charged
                    immediately; setting this makes the replacement a
                    send-invoice one instead.
                preview:
                  type: boolean
                  description: >-
                    If true, returns the replacement invoice's lines and totals
                    without voiding anything or issuing it.
                issue_method:
                  enum:
                    - draft
                    - finalize
                    - send
                  type: string
                  description: >-
                    How far the replacement advances: draft, finalize (opened
                    without emails, reminders or charges) or send. Defaults to
                    send. The original is retired either way.
                destination:
                  enum:
                    - customer_balance
                    - refund
                    - out_of_band
                  type: string
                  description: >-
                    Where a paid original's money goes. customer_balance (the
                    default) credits the customer's balance, which then covers
                    the replacement. refund and out_of_band credit the
                    replacement's cost for it to draw on and return only the
                    difference, to the original payment method (refund) or as
                    money returned outside Stripe (out_of_band); they are
                    rejected when the replacement costs more than the original,
                    when nothing is left to return, or when the original was
                    paid from customer credit. Ignored when the original is open
                    or a draft, since it is voided instead.
                update_customer_email:
                  type: string
                  format: email
                  description: >-
                    Updates the customer's billing email before the replacement
                    is issued, so Stripe sends the new invoice to this address.
                invoice:
                  type: object
                  properties:
                    automatic_tax:
                      type: boolean
                      description: >-
                        Enable or disable Stripe automatic tax on the
                        replacement. Omit to inherit. Enabling clears inherited
                        manual tax rates; use tax_rate_id: null to remove all
                        tax.
                    custom_fields:
                      type: array
                      maxItems: 4
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                            maxLength: 30
                          value:
                            type: string
                            maxLength: 30
                        required:
                          - name
                          - value
                        additionalProperties: false
                      description: >-
                        Fields shown on this invoice only, such as a PO number.
                        Up to four; pass an empty array to clear them.
                    tax_rate_id:
                      anyOf:
                        - type: string
                        - type: 'null'
                      description: >-
                        Stripe tax rate applied to every line. Omit to keep the
                        original's tax, or pass null to issue the replacement
                        with no tax.
                    account_tax_ids:
                      anyOf:
                        - type: array
                          items:
                            type: string
                        - type: 'null'
                      description: >-
                        Your own Stripe tax registrations (atx_...) shown as the
                        seller's tax numbers. Not the customer's.
                    footer:
                      anyOf:
                        - type: string
                        - type: 'null'
                      description: >-
                        Footer text, overriding the original's and any
                        template's.
                    memo:
                      anyOf:
                        - type: string
                        - type: 'null'
                      description: Memo shown near the top of the invoice.
                    payment_method_types:
                      type: array
                      minItems: 1
                      items:
                        enum:
                          - card
                          - customer_balance
                          - us_bank_account
                          - sepa_debit
                          - bacs_debit
                          - acss_debit
                          - link
                        type: string
                      description: >-
                        Payment method types the customer can pay the
                        replacement with, e.g. card and customer_balance (bank
                        transfer). Overrides the org's allowed payment methods.
                        A method other than card on a card-charged invoice sends
                        the replacement for payment instead, on net_terms_days
                        or the default terms.
                  additionalProperties: false
                  description: Changes that apply to the replacement invoice only.
                customer:
                  type: object
                  properties:
                    email:
                      type: string
                      format: email
                      description: >-
                        Billing email. Same as update_customer_email; passing
                        both with different values is rejected.
                    name:
                      type: string
                      description: Customer name shown on this and every later invoice.
                    address:
                      type: object
                      properties:
                        line1:
                          type: string
                        line2:
                          type: string
                        city:
                          type: string
                        state:
                          type: string
                        postal_code:
                          type: string
                        country:
                          type: string
                      additionalProperties: false
                      description: >-
                        Billing address. Drives tax when the org uses Stripe
                        Tax, and is snapshotted onto the replacement.
                    tax_ids:
                      type: array
                      items:
                        type: object
                        properties:
                          type:
                            type: string
                          value:
                            type: string
                        required:
                          - type
                          - value
                        additionalProperties: false
                      description: >-
                        The customer's own tax registrations, e.g. { type:
                        'eu_vat', value: 'FR123...' }. Replaces the existing
                        set; pass an empty array to remove them.
                    invoice_settings_custom_fields:
                      anyOf:
                        - type: array
                          maxItems: 4
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                                maxLength: 30
                              value:
                                type: string
                                maxLength: 30
                            required:
                              - name
                              - value
                            additionalProperties: false
                        - type: 'null'
                      description: >-
                        Custom fields shown on this and every future invoice.
                        Use invoice.custom_fields for this invoice alone.
                  additionalProperties: false
                  description: >-
                    Changes written to the customer, which the replacement
                    snapshots and later invoices inherit.
                lines:
                  type: object
                  properties:
                    add:
                      type: array
                      items:
                        anyOf:
                          - type: object
                            properties:
                              amount:
                                type: number
                                description: >-
                                  Amount in dollars for this line item (e.g.
                                  10.50). Can be negative for credits.
                              description:
                                type: string
                                description: Description for the line item.
                            required:
                              - amount
                              - description
                          - type: object
                            properties:
                              plan_id:
                                type: string
                                description: >-
                                  The catalog plan (or variant) whose pricing to
                                  use.
                              version:
                                type: number
                                description: Plan version. Defaults to the active version.
                              entity_id:
                                anyOf:
                                  - type: string
                                    minLength: 1
                                  - type: 'null'
                                description: >-
                                  The entity this plan's lines are billed to.
                                  Omit to inherit the request's entity_id, or
                                  pass null for customer-level.
                              customize:
                                type: object
                                properties:
                                  price:
                                    anyOf:
                                      - type: object
                                        properties:
                                          amount:
                                            type: number
                                            description: >-
                                              Base price amount for the plan, in major
                                              currency units (e.g. dollars).
                                          interval:
                                            enum:
                                              - one_off
                                              - week
                                              - month
                                              - quarter
                                              - semi_annual
                                              - year
                                            type: string
                                            description: Billing interval (e.g. 'month', 'year').
                                          interval_count:
                                            type: number
                                            description: >-
                                              Number of intervals per billing cycle.
                                              Defaults to 1.
                                            default: 1
                                          processors:
                                            type: object
                                            properties:
                                              stripe:
                                                anyOf:
                                                  - type: object
                                                    properties:
                                                      price_id:
                                                        type: string
                                                        description: >-
                                                          Stripe price ID. For prepaid with
                                                          included > 0 this is the V2 price.
                                                    required:
                                                      - price_id
                                                  - type: 'null'
                                            x-atmn-mapping: true
                                            description: >-
                                              Bill this line under an existing Stripe
                                              price instead of an inline one.
                                        required:
                                          - amount
                                          - interval
                                        additionalProperties: false
                                      - type: 'null'
                                    description: >-
                                      Override the plan's base price for this
                                      invoice. Pass null or an amount of 0 to
                                      omit the base price line.
                                  items:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        feature_id:
                                          type: string
                                          description: >-
                                            The feature whose pricing is overridden
                                            on this invoice.
                                        price:
                                          type: object
                                          properties:
                                            amount:
                                              type: number
                                              description: >-
                                                Price per billing_units after included
                                                usage. Either 'amount' or 'tiers' is
                                                required.
                                            tiers:
                                              type: array
                                              items:
                                                type: object
                                                properties:
                                                  to:
                                                    anyOf:
                                                      - type: number
                                                      - const: inf
                                                  amount:
                                                    type: number
                                                  flat_amount:
                                                    type: number
                                                  additional_currencies:
                                                    type: array
                                                    items:
                                                      type: object
                                                      properties:
                                                        currency:
                                                          type: string
                                                          description: >-
                                                            Three-letter Stripe-supported currency
                                                            code (e.g. 'eur', 'gbp').
                                                        amount:
                                                          type: number
                                                          description: >-
                                                            Per-unit amount for this tier in this
                                                            currency.
                                                        flat_amount:
                                                          type: number
                                                          description: >-
                                                            Flat amount for this tier in this
                                                            currency, if the tier uses one.
                                                      required:
                                                        - currency
                                                    description: >-
                                                      Per-currency amounts for this tier. Tier
                                                      boundaries ('to') are shared across all
                                                      currencies.
                                                required:
                                                  - to
                                              description: >-
                                                Tiered pricing.  Either 'amount' or
                                                'tiers' is required.
                                            tier_behavior:
                                              enum:
                                                - graduated
                                                - volume
                                              type: string
                                              description: >-
                                                How tiers price usage. 'graduated'
                                                (default) charges each unit at the rate
                                                of the tier it falls in. 'volume' picks
                                                one tier from total usage. On
                                                usage-based items it bills only usage
                                                past the included amount, at the rate of
                                                the tier total usage reaches, plus its
                                                flat_amount. On prepaid items it charges
                                                every unit, the included ones too, at
                                                that tier's rate plus its flat_amount.
                                            interval:
                                              enum:
                                                - one_off
                                                - week
                                                - month
                                                - quarter
                                                - semi_annual
                                                - year
                                              type: string
                                              description: >-
                                                Billing interval. For usage-based
                                                features, should match reset.interval,
                                                unless the price has graduated tiers and
                                                reset.interval is a whole multiple of
                                                it: each invoice then bills only the
                                                newly owed usage, at the tier the reset
                                                period has reached.
                                            interval_count:
                                              type: number
                                              description: >-
                                                Number of intervals per billing cycle.
                                                Defaults to 1.
                                              default: 1
                                            billing_units:
                                              type: number
                                              default: 1
                                              description: >-
                                                Units per price increment. Usage is
                                                rounded UP when billed (e.g.
                                                billing_units=100 means 101 rounds to
                                                200).
                                            billing_method:
                                              enum:
                                                - prepaid
                                                - usage_based
                                              type: string
                                              description: >-
                                                'prepaid' for upfront payment (seats),
                                                'usage_based' for pay-as-you-go.
                                            processors:
                                              type: object
                                              properties:
                                                stripe:
                                                  anyOf:
                                                    - type: object
                                                      properties:
                                                        price_id:
                                                          type: string
                                                          description: >-
                                                            Stripe price ID. For prepaid with
                                                            included > 0 this is the V2 price.
                                                      required:
                                                        - price_id
                                                    - type: 'null'
                                              x-atmn-mapping: true
                                              description: >-
                                                Bill this line under an existing Stripe
                                                price instead of an inline one.
                                          required:
                                            - interval
                                            - billing_method
                                          additionalProperties: false
                                          description: >-
                                            Pricing to use for this feature on this
                                            invoice.
                                        feature_override:
                                          type: object
                                          properties:
                                            credit_schema:
                                              type: array
                                              items:
                                                anyOf:
                                                  - type: object
                                                    properties:
                                                      metered_feature_id:
                                                        type: string
                                                        minLength: 1
                                                        description: >-
                                                          ID of the metered feature that draws
                                                          from this credit system.
                                                      billing_units:
                                                        type: number
                                                        exclusiveMinimum: 0
                                                        description: >-
                                                          Number of metered-feature units priced
                                                          together. Defaults to one when omitted.
                                                      dimensions:
                                                        type: object
                                                        propertyNames:
                                                          type: string
                                                          minLength: 1
                                                          maxLength: 64
                                                        additionalProperties:
                                                          $ref: >-
                                                            #/components/schemas/CreditDimensionInput
                                                        description: >-
                                                          Named rates chosen by event properties.
                                                          The most specific match sets the rate;
                                                          with no match the item's own rate
                                                          applies.
                                                      multipliers:
                                                        type: object
                                                        propertyNames:
                                                          type: string
                                                          minLength: 1
                                                          maxLength: 64
                                                        additionalProperties:
                                                          type: object
                                                          properties:
                                                            match:
                                                              type: object
                                                              propertyNames:
                                                                type: string
                                                              additionalProperties:
                                                                anyOf:
                                                                  - type: string
                                                                  - type: number
                                                                  - type: boolean
                                                              description: >-
                                                                Event properties this entry applies to.
                                                                Every key must equal the tracked
                                                                property, compared as strings.
                                                            factor:
                                                              type: number
                                                              exclusiveMinimum: 0
                                                              description: >-
                                                                Multiplies the matched rate. All
                                                                matching multipliers stack.
                                                            add:
                                                              type: number
                                                              description: >-
                                                                Added to the rate after every factor is
                                                                applied, in credits per billing-unit
                                                                group.
                                                          required:
                                                            - match
                                                          additionalProperties: false
                                                        description: >-
                                                          Named adjustments chosen by event
                                                          properties. Every match applies: factors
                                                          multiply, then adds are summed.
                                                      tier_behavior:
                                                        const: graduated
                                                      tiers:
                                                        type: array
                                                        minItems: 1
                                                        items:
                                                          type: object
                                                          properties:
                                                            to:
                                                              anyOf:
                                                                - type: number
                                                                  exclusiveMinimum: 0
                                                                - enum:
                                                                    - inf
                                                                  type: string
                                                              description: >-
                                                                Inclusive upper usage boundary for this
                                                                graduated tier. The final tier must be
                                                                'inf'.
                                                            credit_cost:
                                                              type: number
                                                              minimum: 0
                                                              description: >-
                                                                Credits consumed per billing-unit group
                                                                within this tier.
                                                          required:
                                                            - to
                                                            - credit_cost
                                                    required:
                                                      - metered_feature_id
                                                      - tier_behavior
                                                      - tiers
                                                    additionalProperties: false
                                                  - type: object
                                                    properties:
                                                      metered_feature_id:
                                                        type: string
                                                        minLength: 1
                                                        description: >-
                                                          ID of the metered feature that draws
                                                          from this credit system.
                                                      billing_units:
                                                        type: number
                                                        exclusiveMinimum: 0
                                                        description: >-
                                                          Number of metered-feature units priced
                                                          together. Defaults to one when omitted.
                                                      dimensions:
                                                        type: object
                                                        propertyNames:
                                                          type: string
                                                          minLength: 1
                                                          maxLength: 64
                                                        additionalProperties:
                                                          $ref: >-
                                                            #/components/schemas/CreditDimensionInput
                                                        description: >-
                                                          Named rates chosen by event properties.
                                                          The most specific match sets the rate;
                                                          with no match the item's own rate
                                                          applies.
                                                      multipliers:
                                                        type: object
                                                        propertyNames:
                                                          type: string
                                                          minLength: 1
                                                          maxLength: 64
                                                        additionalProperties:
                                                          type: object
                                                          properties:
                                                            match:
                                                              type: object
                                                              propertyNames:
                                                                type: string
                                                              additionalProperties:
                                                                anyOf:
                                                                  - type: string
                                                                  - type: number
                                                                  - type: boolean
                                                              description: >-
                                                                Event properties this entry applies to.
                                                                Every key must equal the tracked
                                                                property, compared as strings.
                                                            factor:
                                                              type: number
                                                              exclusiveMinimum: 0
                                                              description: >-
                                                                Multiplies the matched rate. All
                                                                matching multipliers stack.
                                                            add:
                                                              type: number
                                                              description: >-
                                                                Added to the rate after every factor is
                                                                applied, in credits per billing-unit
                                                                group.
                                                          required:
                                                            - match
                                                          additionalProperties: false
                                                        description: >-
                                                          Named adjustments chosen by event
                                                          properties. Every match applies: factors
                                                          multiply, then adds are summed.
                                                      credit_cost:
                                                        type: number
                                                        minimum: 0
                                                        description: Credits consumed per billing-unit group.
                                                    required:
                                                      - metered_feature_id
                                                      - credit_cost
                                                    additionalProperties: false
                                              description: >-
                                                Replaces the feature's credit_schema
                                                entirely for this invoice.
                                          additionalProperties: false
                                          description: >-
                                            For credit-system features: a credit
                                            rate card to use when converting `usage`
                                            on this invoice.
                                      required:
                                        - feature_id
                                      additionalProperties: false
                                    description: >-
                                      Override feature pricing for this invoice.
                                      Only pricing fields are accepted; grants,
                                      resets and rollovers are not part of an
                                      invoice.
                                additionalProperties: false
                                title: InvoiceCustomize
                                description: >-
                                  Pricing overrides applied to this invoice
                                  only. The catalog and the customer's plan are
                                  not changed.
                              feature_quantities:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    feature_id:
                                      type: string
                                      description: The feature to bill.
                                    billing_behavior:
                                      enum:
                                        - prepaid
                                        - usage_based
                                      type: string
                                      description: >-
                                        Which of the feature's prices to use:
                                        'prepaid' or 'usage_based'.
                                    quantity:
                                      type: number
                                      minimum: 0
                                      description: >-
                                        Billable feature units in total,
                                        exclusive of any included usage. Not per
                                        seat or per entity. For a credit-system
                                        feature this is the number of credits.
                                    usage:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          feature_id:
                                            type: string
                                            description: >-
                                              The metered feature whose units are
                                              being converted.
                                          quantity:
                                            type: number
                                            minimum: 0
                                            description: >-
                                              Billable units of the metered feature.
                                              Converted to the credit-system feature
                                              through its rate card.
                                          properties:
                                            type: object
                                            propertyNames:
                                              type: string
                                            additionalProperties: {}
                                            description: >-
                                              Event properties used to pick the rate
                                              card dimension and multipliers.
                                        required:
                                          - feature_id
                                          - quantity
                                        additionalProperties: false
                                      description: >-
                                        For credit-system features: billable
                                        units of the source features, converted
                                        through the credit rate card. Mutually
                                        exclusive with quantity.
                                    prorate:
                                      type: boolean
                                      description: >-
                                        Whether to prorate this line against its
                                        period. Defaults to true for prepaid and
                                        false for usage-based.
                                    period_start:
                                      type: integer
                                      minimum: 0
                                      maximum: 9007199254740991
                                      description: >-
                                        Start of the period this line covers, in
                                        milliseconds. Defaults to the parent's
                                        period, then the invoice's period_start
                                        / period_end when sent.
                                    period_end:
                                      type: integer
                                      minimum: 0
                                      maximum: 9007199254740991
                                      description: >-
                                        End of the period this line covers, in
                                        milliseconds. Given together with
                                        period_start.
                                  required:
                                    - feature_id
                                    - billing_behavior
                                  additionalProperties: false
                              license_quantities:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    license_plan_id:
                                      type: string
                                      description: >-
                                        The license plan linked to the parent
                                        plan.
                                    quantity:
                                      type: integer
                                      minimum: 0
                                      maximum: 9007199254740991
                                      description: >-
                                        Billable seats, exclusive of any
                                        included seats.
                                    customize:
                                      type: object
                                      properties:
                                        price:
                                          anyOf:
                                            - type: object
                                              properties:
                                                amount:
                                                  type: number
                                                  description: >-
                                                    Base price amount for the plan, in major
                                                    currency units (e.g. dollars).
                                                interval:
                                                  enum:
                                                    - one_off
                                                    - week
                                                    - month
                                                    - quarter
                                                    - semi_annual
                                                    - year
                                                  type: string
                                                  description: Billing interval (e.g. 'month', 'year').
                                                interval_count:
                                                  type: number
                                                  description: >-
                                                    Number of intervals per billing cycle.
                                                    Defaults to 1.
                                                  default: 1
                                                processors:
                                                  type: object
                                                  properties:
                                                    stripe:
                                                      anyOf:
                                                        - type: object
                                                          properties:
                                                            price_id:
                                                              type: string
                                                              description: >-
                                                                Stripe price ID. For prepaid with
                                                                included > 0 this is the V2 price.
                                                          required:
                                                            - price_id
                                                        - type: 'null'
                                                  x-atmn-mapping: true
                                                  description: >-
                                                    Bill this line under an existing Stripe
                                                    price instead of an inline one.
                                              required:
                                                - amount
                                                - interval
                                              additionalProperties: false
                                            - type: 'null'
                                          description: >-
                                            Override the license's per-seat price on
                                            this invoice.
                                        items:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              feature_id:
                                                type: string
                                                description: >-
                                                  The feature whose pricing is overridden
                                                  on this invoice.
                                              price:
                                                type: object
                                                properties:
                                                  amount:
                                                    type: number
                                                    description: >-
                                                      Price per billing_units after included
                                                      usage. Either 'amount' or 'tiers' is
                                                      required.
                                                  tiers:
                                                    type: array
                                                    items:
                                                      type: object
                                                      properties:
                                                        to:
                                                          anyOf:
                                                            - type: number
                                                            - const: inf
                                                        amount:
                                                          type: number
                                                        flat_amount:
                                                          type: number
                                                        additional_currencies:
                                                          type: array
                                                          items:
                                                            type: object
                                                            properties:
                                                              currency:
                                                                type: string
                                                                description: >-
                                                                  Three-letter Stripe-supported currency
                                                                  code (e.g. 'eur', 'gbp').
                                                              amount:
                                                                type: number
                                                                description: >-
                                                                  Per-unit amount for this tier in this
                                                                  currency.
                                                              flat_amount:
                                                                type: number
                                                                description: >-
                                                                  Flat amount for this tier in this
                                                                  currency, if the tier uses one.
                                                            required:
                                                              - currency
                                                          description: >-
                                                            Per-currency amounts for this tier. Tier
                                                            boundaries ('to') are shared across all
                                                            currencies.
                                                      required:
                                                        - to
                                                    description: >-
                                                      Tiered pricing.  Either 'amount' or
                                                      'tiers' is required.
                                                  tier_behavior:
                                                    enum:
                                                      - graduated
                                                      - volume
                                                    type: string
                                                    description: >-
                                                      How tiers price usage. 'graduated'
                                                      (default) charges each unit at the rate
                                                      of the tier it falls in. 'volume' picks
                                                      one tier from total usage. On
                                                      usage-based items it bills only usage
                                                      past the included amount, at the rate of
                                                      the tier total usage reaches, plus its
                                                      flat_amount. On prepaid items it charges
                                                      every unit, the included ones too, at
                                                      that tier's rate plus its flat_amount.
                                                  interval:
                                                    enum:
                                                      - one_off
                                                      - week
                                                      - month
                                                      - quarter
                                                      - semi_annual
                                                      - year
                                                    type: string
                                                    description: >-
                                                      Billing interval. For usage-based
                                                      features, should match reset.interval,
                                                      unless the price has graduated tiers and
                                                      reset.interval is a whole multiple of
                                                      it: each invoice then bills only the
                                                      newly owed usage, at the tier the reset
                                                      period has reached.
                                                  interval_count:
                                                    type: number
                                                    description: >-
                                                      Number of intervals per billing cycle.
                                                      Defaults to 1.
                                                    default: 1
                                                  billing_units:
                                                    type: number
                                                    default: 1
                                                    description: >-
                                                      Units per price increment. Usage is
                                                      rounded UP when billed (e.g.
                                                      billing_units=100 means 101 rounds to
                                                      200).
                                                  billing_method:
                                                    enum:
                                                      - prepaid
                                                      - usage_based
                                                    type: string
                                                    description: >-
                                                      'prepaid' for upfront payment (seats),
                                                      'usage_based' for pay-as-you-go.
                                                  processors:
                                                    type: object
                                                    properties:
                                                      stripe:
                                                        anyOf:
                                                          - type: object
                                                            properties:
                                                              price_id:
                                                                type: string
                                                                description: >-
                                                                  Stripe price ID. For prepaid with
                                                                  included > 0 this is the V2 price.
                                                            required:
                                                              - price_id
                                                          - type: 'null'
                                                    x-atmn-mapping: true
                                                    description: >-
                                                      Bill this line under an existing Stripe
                                                      price instead of an inline one.
                                                required:
                                                  - interval
                                                  - billing_method
                                                additionalProperties: false
                                                description: >-
                                                  Pricing to use for this feature on this
                                                  invoice.
                                              feature_override:
                                                type: object
                                                properties:
                                                  credit_schema:
                                                    type: array
                                                    items:
                                                      anyOf:
                                                        - type: object
                                                          properties:
                                                            metered_feature_id:
                                                              type: string
                                                              minLength: 1
                                                              description: >-
                                                                ID of the metered feature that draws
                                                                from this credit system.
                                                            billing_units:
                                                              type: number
                                                              exclusiveMinimum: 0
                                                              description: >-
                                                                Number of metered-feature units priced
                                                                together. Defaults to one when omitted.
                                                            dimensions:
                                                              type: object
                                                              propertyNames:
                                                                type: string
                                                                minLength: 1
                                                                maxLength: 64
                                                              additionalProperties:
                                                                $ref: >-
                                                                  #/components/schemas/CreditDimensionInput
                                                              description: >-
                                                                Named rates chosen by event properties.
                                                                The most specific match sets the rate;
                                                                with no match the item's own rate
                                                                applies.
                                                            multipliers:
                                                              type: object
                                                              propertyNames:
                                                                type: string
                                                                minLength: 1
                                                                maxLength: 64
                                                              additionalProperties:
                                                                type: object
                                                                properties:
                                                                  match:
                                                                    type: object
                                                                    propertyNames:
                                                                      type: {}
                                                                    additionalProperties: {}
                                                                    description: >-
                                                                      Event properties this entry applies to.
                                                                      Every key must equal the tracked
                                                                      property, compared as strings.
                                                                  factor:
                                                                    type: number
                                                                    exclusiveMinimum: 0
                                                                    description: >-
                                                                      Multiplies the matched rate. All
                                                                      matching multipliers stack.
                                                                  add:
                                                                    type: number
                                                                    description: >-
                                                                      Added to the rate after every factor is
                                                                      applied, in credits per billing-unit
                                                                      group.
                                                                required:
                                                                  - match
                                                                additionalProperties: false
                                                              description: >-
                                                                Named adjustments chosen by event
                                                                properties. Every match applies: factors
                                                                multiply, then adds are summed.
                                                            tier_behavior:
                                                              const: graduated
                                                            tiers:
                                                              type: array
                                                              minItems: 1
                                                              items:
                                                                type: object
                                                                properties:
                                                                  to:
                                                                    anyOf:
                                                                      - {}
                                                                      - {}
                                                                    description: >-
                                                                      Inclusive upper usage boundary for this
                                                                      graduated tier. The final tier must be
                                                                      'inf'.
                                                                  credit_cost:
                                                                    type: number
                                                                    minimum: 0
                                                                    description: >-
                                                                      Credits consumed per billing-unit group
                                                                      within this tier.
                                                                required:
                                                                  - to
                                                                  - credit_cost
                                                          required:
                                                            - metered_feature_id
                                                            - tier_behavior
                                                            - tiers
                                                          additionalProperties: false
                                                        - type: object
                                                          properties:
                                                            metered_feature_id:
                                                              type: string
                                                              minLength: 1
                                                              description: >-
                                                                ID of the metered feature that draws
                                                                from this credit system.
                                                            billing_units:
                                                              type: number
                                                              exclusiveMinimum: 0
                                                              description: >-
                                                                Number of metered-feature units priced
                                                                together. Defaults to one when omitted.
                                                            dimensions:
                                                              type: object
                                                              propertyNames:
                                                                type: string
                                                                minLength: 1
                                                                maxLength: 64
                                                              additionalProperties:
                                                                $ref: >-
                                                                  #/components/schemas/CreditDimensionInput
                                                              description: >-
                                                                Named rates chosen by event properties.
                                                                The most specific match sets the rate;
                                                                with no match the item's own rate
                                                                applies.
                                                            multipliers:
                                                              type: object
                                                              propertyNames:
                                                                type: string
                                                                minLength: 1
                                                                maxLength: 64
                                                              additionalProperties:
                                                                type: object
                                                                properties:
                                                                  match:
                                                                    type: object
                                                                    propertyNames:
                                                                      type: {}
                                                                    additionalProperties: {}
                                                                    description: >-
                                                                      Event properties this entry applies to.
                                                                      Every key must equal the tracked
                                                                      property, compared as strings.
                                                                  factor:
                                                                    type: number
                                                                    exclusiveMinimum: 0
                                                                    description: >-
                                                                      Multiplies the matched rate. All
                                                                      matching multipliers stack.
                                                                  add:
                                                                    type: number
                                                                    description: >-
                                                                      Added to the rate after every factor is
                                                                      applied, in credits per billing-unit
                                                                      group.
                                                                required:
                                                                  - match
                                                                additionalProperties: false
                                                              description: >-
                                                                Named adjustments chosen by event
                                                                properties. Every match applies: factors
                                                                multiply, then adds are summed.
                                                            credit_cost:
                                                              type: number
                                                              minimum: 0
                                                              description: Credits consumed per billing-unit group.
                                                          required:
                                                            - metered_feature_id
                                                            - credit_cost
                                                          additionalProperties: false
                                                    description: >-
                                                      Replaces the feature's credit_schema
                                                      entirely for this invoice.
                                                additionalProperties: false
                                                description: >-
                                                  For credit-system features: a credit
                                                  rate card to use when converting `usage`
                                                  on this invoice.
                                            required:
                                              - feature_id
                                            additionalProperties: false
                                          description: >-
                                            Override the license plan's feature
                                            pricing for this license's
                                            feature_quantities on this invoice. The
                                            parent plan's customize.items never
                                            apply to license features.
                                      additionalProperties: false
                                      description: >-
                                        Pricing overrides for this license on
                                        this invoice only. The catalog and the
                                        customer's plan are not changed.
                                    feature_quantities:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          feature_id:
                                            type: string
                                            description: The feature to bill.
                                          billing_behavior:
                                            enum:
                                              - prepaid
                                              - usage_based
                                            type: string
                                            description: >-
                                              Which of the feature's prices to use:
                                              'prepaid' or 'usage_based'.
                                          quantity:
                                            type: number
                                            minimum: 0
                                            description: >-
                                              Billable feature units in total,
                                              exclusive of any included usage. Not per
                                              seat or per entity. For a credit-system
                                              feature this is the number of credits.
                                          usage:
                                            type: array
                                            items:
                                              type: object
                                              properties:
                                                feature_id:
                                                  type: string
                                                  description: >-
                                                    The metered feature whose units are
                                                    being converted.
                                                quantity:
                                                  type: number
                                                  minimum: 0
                                                  description: >-
                                                    Billable units of the metered feature.
                                                    Converted to the credit-system feature
                                                    through its rate card.
                                                properties:
                                                  type: object
                                                  propertyNames:
                                                    type: string
                                                  additionalProperties: {}
                                                  description: >-
                                                    Event properties used to pick the rate
                                                    card dimension and multipliers.
                                              required:
                                                - feature_id
                                                - quantity
                                              additionalProperties: false
                                            description: >-
                                              For credit-system features: billable
                                              units of the source features, converted
                                              through the credit rate card. Mutually
                                              exclusive with quantity.
                                          prorate:
                                            type: boolean
                                            description: >-
                                              Whether to prorate this line against its
                                              period. Defaults to true for prepaid and
                                              false for usage-based.
                                          period_start:
                                            type: integer
                                            minimum: 0
                                            maximum: 9007199254740991
                                            description: >-
                                              Start of the period this line covers, in
                                              milliseconds. Defaults to the parent's
                                              period, then the invoice's period_start
                                              / period_end when sent.
                                          period_end:
                                            type: integer
                                            minimum: 0
                                            maximum: 9007199254740991
                                            description: >-
                                              End of the period this line covers, in
                                              milliseconds. Given together with
                                              period_start.
                                        required:
                                          - feature_id
                                          - billing_behavior
                                        additionalProperties: false
                                      description: >-
                                        Feature charges priced through the
                                        license plan.
                                    prorate:
                                      type: boolean
                                      description: >-
                                        Whether to prorate seat charges against
                                        the license's period. Defaults to true.
                                    period_start:
                                      type: integer
                                      minimum: 0
                                      maximum: 9007199254740991
                                      description: >-
                                        Start of the period this line covers, in
                                        milliseconds. Defaults to the parent's
                                        period, then the invoice's period_start
                                        / period_end when sent.
                                    period_end:
                                      type: integer
                                      minimum: 0
                                      maximum: 9007199254740991
                                      description: >-
                                        End of the period this line covers, in
                                        milliseconds. Given together with
                                        period_start.
                                  required:
                                    - license_plan_id
                                    - quantity
                                  additionalProperties: false
                              discounts:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    reward_id:
                                      type: string
                                      description: >-
                                        The ID of the reward to apply as a
                                        discount.
                                    promotion_code:
                                      type: string
                                      description: >-
                                        The promotion code to apply as a
                                        discount.
                                  title: AttachDiscount
                                  description: >-
                                    A discount to apply. Can be either a reward
                                    ID or a promotion code.
                                description: Discounts applied only to this plan's lines.
                              prorate:
                                type: boolean
                                description: >-
                                  Whether to prorate the base price against the
                                  plan's period. Defaults to true.
                              period_start:
                                type: integer
                                minimum: 0
                                maximum: 9007199254740991
                                description: >-
                                  Start of the period this line covers, in
                                  milliseconds. Defaults to the parent's period,
                                  then the invoice's period_start / period_end
                                  when sent.
                              period_end:
                                type: integer
                                minimum: 0
                                maximum: 9007199254740991
                                description: >-
                                  End of the period this line covers, in
                                  milliseconds. Given together with
                                  period_start.
                            required:
                              - plan_id
                            additionalProperties: false
                        description: >-
                          Either a custom charge (description + amount) or a
                          catalog plan priced like invoices.create.
                    update:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            description: The invoice line item ID from invoices.list items.
                          amount:
                            type: number
                          description:
                            type: string
                        required:
                          - id
                        additionalProperties: false
                    remove:
                      type: array
                      items:
                        type: string
                      description: Invoice line item IDs to leave off the replacement.
                  additionalProperties: false
                  description: Add, change or drop lines relative to the original.
              required:
                - invoice_id
              title: ReissueInvoiceParams
              examples:
                - invoice_id: inv_2b3c4d5e6f7g8h
                  invoice_template_id: inv_tmpl_bank_transfer
            example:
              invoice_id: inv_2b3c4d5e6f7g8h
              invoice_template_id: inv_tmpl_bank_transfer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  invoice:
                    anyOf:
                      - type: object
                        properties:
                          id:
                            type: string
                            description: The Autumn invoice ID
                          plan_ids:
                            type: array
                            items:
                              type: string
                            description: Array of plan IDs included in this invoice
                          stripe_id:
                            type: string
                            description: The Stripe invoice ID
                          processor_type:
                            enum:
                              - stripe
                              - revenuecat
                            type: string
                            default: stripe
                            description: The billing processor that owns this invoice.
                          status:
                            type: string
                            description: The status of the invoice
                          total:
                            type: number
                            description: The total amount of the invoice
                          amount_paid:
                            anyOf:
                              - type: number
                              - type: 'null'
                            description: >-
                              The amount paid on the invoice, in major currency
                              units. Null on invoices recorded before amounts
                              paid were tracked.
                          refunded_amount:
                            type: number
                            description: >-
                              The total amount refunded on the invoice, in major
                              currency units
                          currency:
                            type: string
                            description: The currency code for the invoice
                          created_at:
                            type: number
                            description: Timestamp when the invoice was created
                          hosted_invoice_url:
                            anyOf:
                              - type: string
                              - type: 'null'
                            description: URL to the Stripe-hosted invoice page
                          customer_id:
                            anyOf:
                              - type: string
                              - type: 'null'
                            description: >-
                              The ID of the customer this invoice belongs to.
                              Null for customers created without an ID.
                          entity_id:
                            anyOf:
                              - type: string
                              - type: 'null'
                            description: >-
                              The ID of the entity this invoice belongs to, if
                              entity-scoped
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  description: >-
                                    The Autumn invoice line item ID. Stable
                                    across reads, and can be used to reference
                                    this line in later calls.
                                description:
                                  type: string
                                  description: Description of the invoice line item
                                period_start:
                                  anyOf:
                                    - type: number
                                    - type: 'null'
                                  description: Timestamp when the billing period starts
                                period_end:
                                  anyOf:
                                    - type: number
                                    - type: 'null'
                                  description: Timestamp when the billing period ends
                                plan_id:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                  description: >-
                                    The plan this line item came from. Null for
                                    lines with no Autumn plan behind them.
                                feature_id:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                  description: >-
                                    The ID of the feature associated with this
                                    line item
                                feature_name:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                  description: >-
                                    The name of the feature associated with this
                                    line item
                                quantity:
                                  anyOf:
                                    - type: number
                                    - type: 'null'
                                  description: >-
                                    Quantity actually charged on this line. Null
                                    on fixed-price lines.
                                amount:
                                  type: number
                                  description: >-
                                    Amount charged on this line, pre-discount
                                    and pre-tax. Negative for credits.
                                entities:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      entity_id:
                                        type: string
                                        description: >-
                                          The entity this share of the line item
                                          is attributed to
                                      quantity:
                                        anyOf:
                                          - type: number
                                          - type: 'null'
                                        description: >-
                                          Quantity charged to this entity. Null on
                                          fixed-price lines.
                                      amount:
                                        type: number
                                        description: >-
                                          Amount attributed to this entity,
                                          pre-discount and pre-tax
                                    required:
                                      - entity_id
                                      - quantity
                                      - amount
                                  description: >-
                                    How this line splits by entity. Empty for
                                    customer-level lines. Only populated for
                                    invoices finalized after entity attribution
                                    shipped.
                              required:
                                - id
                                - description
                                - period_start
                                - period_end
                                - plan_id
                                - feature_id
                                - feature_name
                                - quantity
                                - amount
                                - entities
                            description: >-
                              Line items on the invoice, one per line as shown
                              in Stripe. Capped at 100. Empty for invoices
                              recorded before line item storage.
                        required:
                          - id
                          - plan_ids
                          - stripe_id
                          - status
                          - total
                          - amount_paid
                          - refunded_amount
                          - currency
                          - created_at
                          - customer_id
                          - entity_id
                      - type: 'null'
                    description: The replacement invoice. Null when preview is true.
                  voided_invoice_id:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: >-
                      The Autumn ID of the original invoice, now void. Null when
                      previewing, and when the original was paid and got a
                      credit note instead.
                  credit_note_id:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: >-
                      The Stripe credit note issued against a paid original,
                      which returns its amount as destination says. Null when
                      the original was open and voided instead.
                  preview:
                    type: object
                    properties:
                      currency:
                        type: string
                      lines:
                        type: array
                        items:
                          type: object
                          properties:
                            plan_id:
                              anyOf:
                                - type: string
                                - type: 'null'
                            feature_id:
                              anyOf:
                                - type: string
                                - type: 'null'
                            entity_id:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: >-
                                The entity this line is billed to. Null for
                                customer-level lines.
                            description:
                              type: string
                            amount:
                              type: number
                            amount_after_discounts:
                              type: number
                            quantity:
                              anyOf:
                                - type: number
                                - type: 'null'
                            prorated:
                              type: boolean
                            period_start:
                              anyOf:
                                - type: number
                                - type: 'null'
                            period_end:
                              anyOf:
                                - type: number
                                - type: 'null'
                          required:
                            - plan_id
                            - feature_id
                            - entity_id
                            - description
                            - amount
                            - amount_after_discounts
                            - quantity
                            - prorated
                            - period_start
                            - period_end
                      subtotal:
                        type: number
                      discount_total:
                        type: number
                      tax:
                        anyOf:
                          - type: object
                            properties:
                              total:
                                type: number
                              amount_inclusive:
                                type: number
                              amount_exclusive:
                                type: number
                              status:
                                enum:
                                  - complete
                                  - incomplete
                                  - requires_location
                                type: string
                            required:
                              - total
                              - amount_inclusive
                              - amount_exclusive
                              - status
                          - type: 'null'
                      total:
                        type: number
                      invoice_credits:
                        type: object
                        properties:
                          balance:
                            type: number
                            description: >-
                              Stripe customer credit balance available,
                              expressed as a positive number in major currency
                              units.
                          applied:
                            type: number
                            description: >-
                              How much of that balance this invoice consumes,
                              capped at its total. The rest stays on the
                              customer.
                          currency:
                            type: string
                            description: Three-letter currency code.
                        required:
                          - balance
                          - currency
                        description: >-
                          The customer's Stripe credit balance and how much of
                          it this invoice consumes.
                      amount_due:
                        type: number
                        description: >-
                          What the customer pays: the total less any credit
                          applied.
                      issue_date:
                        type: number
                      due_date:
                        anyOf:
                          - type: number
                          - type: 'null'
                      issue_method:
                        enum:
                          - draft
                          - finalize
                          - send
                        type: string
                        description: >-
                          How the invoice is issued on approval: draft, finalize
                          (opened without emails, reminders or charges) or send.
                    required:
                      - currency
                      - lines
                      - subtotal
                      - discount_total
                      - tax
                      - total
                      - amount_due
                      - issue_date
                      - due_date
                      - issue_method
                    description: The replacement's lines and totals.
                required:
                  - invoice
                  - voided_invoice_id
                  - credit_note_id
                  - preview
                examples:
                  - invoice:
                      id: inv_3c4d5e6f7g8h9i
                      customer_id: cus_123
                      entity_id: null
                      plan_ids:
                        - pro_plan
                      stripe_id: in_1A2B3C4D5E6F7G8H
                      processor_type: stripe
                      status: open
                      total: 29.99
                      amount_paid: 29.99
                      refunded_amount: 0
                      currency: usd
                      created_at: 1759247877000
                      hosted_invoice_url: https://invoice.stripe.com/i/acct_123/test_456
                      items:
                        - id: invoice_li_2b3c4d5e6f7g8h
                          description: Pro plan
                          plan_id: pro_plan
                          feature_id: null
                          feature_name: null
                          quantity: null
                          amount: 20
                          period_start: 1759247877000
                          period_end: 1761839877000
                          entities: []
                        - id: invoice_li_3c4d5e6f7g8h9i
                          description: AI credits
                          plan_id: pro_plan
                          feature_id: ai_credits
                          feature_name: AI Credits
                          quantity: 4995
                          amount: 9.99
                          period_start: 1759247877000
                          period_end: 1761839877000
                          entities:
                            - entity_id: acme-docs-prod
                              quantity: 4995
                              amount: 9.99
                    voided_invoice_id: inv_2b3c4d5e6f7g8h
                    preview:
                      currency: usd
                      lines: []
                      subtotal: 29.99
                      discount_total: 0
                      tax: null
                      total: 29.99
                      amount_due: 29.99
                      due_date: 1761839877000
              example:
                invoice:
                  id: inv_3c4d5e6f7g8h9i
                  customer_id: cus_123
                  entity_id: null
                  plan_ids:
                    - pro_plan
                  stripe_id: in_1A2B3C4D5E6F7G8H
                  processor_type: stripe
                  status: open
                  total: 29.99
                  amount_paid: 29.99
                  refunded_amount: 0
                  currency: usd
                  created_at: 1759247877000
                  hosted_invoice_url: https://invoice.stripe.com/i/acct_123/test_456
                  items:
                    - id: invoice_li_2b3c4d5e6f7g8h
                      description: Pro plan
                      plan_id: pro_plan
                      feature_id: null
                      feature_name: null
                      quantity: null
                      amount: 20
                      period_start: 1759247877000
                      period_end: 1761839877000
                      entities: []
                    - id: invoice_li_3c4d5e6f7g8h9i
                      description: AI credits
                      plan_id: pro_plan
                      feature_id: ai_credits
                      feature_name: AI Credits
                      quantity: 4995
                      amount: 9.99
                      period_start: 1759247877000
                      period_end: 1761839877000
                      entities:
                        - entity_id: acme-docs-prod
                          quantity: 4995
                          amount: 9.99
                voided_invoice_id: inv_2b3c4d5e6f7g8h
                preview:
                  currency: usd
                  lines: []
                  subtotal: 29.99
                  discount_total: 0
                  tax: null
                  total: 29.99
                  amount_due: 29.99
                  due_date: 1761839877000
      x-codeSamples:
        - lang: typescript
          label: Typescript (SDK)
          source: |-
            import { Autumn } from 'autumn-js'

            const autumn = new Autumn()

            const result = await autumn.invoices.reissue({
              invoiceId: "inv_2b3c4d5e6f7g8h",
              invoiceTemplateId: "inv_tmpl_bank_transfer",
            });
        - lang: python
          label: Python (SDK)
          source: |-
            from autumn_sdk import Autumn

            autumn = Autumn(secret_key="am_sk_test...")

            res = autumn.invoices.reissue(
                invoice_id="inv_2b3c4d5e6f7g8h",
                invoice_template_id="inv_tmpl_bank_transfer",
            )
components:
  schemas:
    CreditDimensionInput:
      anyOf:
        - type: object
          properties:
            match:
              type: object
              propertyNames:
                type: string
              additionalProperties:
                anyOf:
                  - type: string
                  - type: number
                  - type: boolean
              description: >-
                Event properties this entry applies to. Every key must equal the
                tracked property, compared as strings.
            priority:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
              description: >-
                Breaks ties between dimensions that match the same number of
                keys. Higher wins.
            tier_behavior:
              const: graduated
            tiers:
              type: array
              minItems: 1
              items:
                type: object
                properties:
                  to:
                    anyOf:
                      - type: number
                        exclusiveMinimum: 0
                      - enum:
                          - inf
                        type: string
                    description: >-
                      Inclusive upper usage boundary for this graduated tier.
                      The final tier must be 'inf'.
                  credit_cost:
                    type: number
                    minimum: 0
                    description: Credits consumed per billing-unit group within this tier.
                required:
                  - to
                  - credit_cost
          required:
            - match
            - tier_behavior
            - tiers
          additionalProperties: false
        - type: object
          properties:
            match:
              type: object
              propertyNames:
                type: string
              additionalProperties:
                anyOf:
                  - type: string
                  - type: number
                  - type: boolean
              description: >-
                Event properties this entry applies to. Every key must equal the
                tracked property, compared as strings.
            priority:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
              description: >-
                Breaks ties between dimensions that match the same number of
                keys. Higher wins.
            credit_cost:
              type: number
              minimum: 0
              description: >-
                Credits consumed per billing-unit group when this dimension
                matches.
          required:
            - match
            - credit_cost
          additionalProperties: false
  securitySchemes:
    secretKey:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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