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

export const DynamicResponseExample = ({json, statusCode = "200"}) => {
  const toCamelCase = str => {
    return str.replace(/_([a-z])/g, (_, c) => c.toUpperCase());
  };
  const convertKeysToCamelCase = obj => {
    if (Array.isArray(obj)) {
      return obj.map(item => convertKeysToCamelCase(item));
    }
    if (obj !== null && typeof obj === "object") {
      return Object.keys(obj).reduce((acc, key) => {
        const camelKey = toCamelCase(key);
        acc[camelKey] = convertKeysToCamelCase(obj[key]);
        return acc;
      }, {});
    }
    return obj;
  };
  const [isTypeScript, setIsTypeScript] = useState(() => {
    if (typeof window !== "undefined") {
      try {
        const lang = localStorage.getItem("code");
        return JSON.parse(lang) === "typescript";
      } catch {
        return true;
      }
    }
    return true;
  });
  useEffect(() => {
    const onMintlifyStorage = event => {
      if (event.detail?.key === "code") {
        try {
          const value = JSON.parse(event.detail.value);
          setIsTypeScript(value === "typescript");
        } catch {}
      }
    };
    const pollInterval = setInterval(() => {
      try {
        const lang = localStorage.getItem("code");
        const value = JSON.parse(lang);
        setIsTypeScript(value === "typescript");
      } catch {}
    }, 300);
    document.addEventListener("mintlify-localstorage", onMintlifyStorage);
    return () => {
      document.removeEventListener("mintlify-localstorage", onMintlifyStorage);
      clearInterval(pollInterval);
    };
  }, []);
  const camelCaseJson = useMemo(() => convertKeysToCamelCase(json), [json]);
  const snakeCaseString = JSON.stringify(json, null, 2);
  const camelCaseString = JSON.stringify(camelCaseJson, null, 2);
  return <ResponseExample>
			{isTypeScript ? <CodeBlock language="json" filename={statusCode}>
					{camelCaseString}
				</CodeBlock> : <CodeBlock language="json" filename={statusCode}>
					{snakeCaseString}
				</CodeBlock>}
		</ResponseExample>;
};

export const DynamicResponseField = ({children, name, ...props}) => {
  const convertToCamelCase = str => {
    if (typeof str !== "string") return str;
    return str.replace(/[_-](\w)/g, (_, c) => c.toUpperCase());
  };
  const [lang, setLang] = useState(() => {
    if (typeof window !== "undefined") {
      const stored = localStorage.getItem("code");
      return stored || '"typescript"';
    }
    return '"typescript"';
  });
  useEffect(() => {
    const onMintlifyStorage = event => {
      const key = event.detail?.key;
      if (key === "code") {
        setLang(event.detail.value);
      }
    };
    const pollInterval = setInterval(() => {
      const current = localStorage.getItem("code");
      if (current && current !== lang) {
        setLang(current);
      }
    }, 500);
    document.addEventListener("mintlify-localstorage", onMintlifyStorage);
    return () => {
      document.removeEventListener("mintlify-localstorage", onMintlifyStorage);
      clearInterval(pollInterval);
    };
  }, [lang]);
  const resolvedName = useMemo(() => {
    try {
      const value = JSON.parse(lang);
      const useCamelCase = value === "typescript";
      return useCamelCase ? convertToCamelCase(name) : name;
    } catch {
      return name;
    }
  }, [name, lang]);
  return <ResponseField name={resolvedName} {...props}>
			{children}
		</ResponseField>;
};

export const DynamicParamField = ({children, body, path, ...props}) => {
  const convertToCamelCase = str => {
    if (typeof str !== "string") return str;
    return str.replace(/[_-](\w)/g, (_, c) => c.toUpperCase());
  };
  const [lang, setLang] = useState(() => {
    if (typeof window !== "undefined") {
      const stored = localStorage.getItem("code");
      return stored || '"typescript"';
    }
    return '"typescript"';
  });
  useEffect(() => {
    const onMintlifyStorage = event => {
      const key = event.detail?.key;
      if (key === "code") {
        setLang(event.detail.value);
      }
    };
    const pollInterval = setInterval(() => {
      const current = localStorage.getItem("code");
      if (current && current !== lang) {
        setLang(current);
      }
    }, 500);
    document.addEventListener("mintlify-localstorage", onMintlifyStorage);
    return () => {
      document.removeEventListener("mintlify-localstorage", onMintlifyStorage);
      clearInterval(pollInterval);
    };
  }, [lang]);
  const resolvedBody = useMemo(() => {
    try {
      const value = JSON.parse(lang);
      const useCamelCase = value === "typescript";
      return useCamelCase ? convertToCamelCase(body) : body;
    } catch {
      return body;
    }
  }, [body, lang]);
  const resolvedPath = useMemo(() => {
    try {
      const value = JSON.parse(lang);
      const useCamelCase = value === "typescript";
      return useCamelCase ? convertToCamelCase(path) : path;
    } catch {
      return path;
    }
  }, [path, lang]);
  return <ParamField body={resolvedBody} path={resolvedPath} {...props}>
			{children}
		</ParamField>;
};

### Body Parameters

<DynamicParamField body="invoice_id" type="string" required>
  The Autumn invoice ID to void and replace.
</DynamicParamField>

<DynamicParamField body="invoice_template_id" type="string">
  ID of an invoice template (configured in billing settings) whose footer and memo are applied to the replacement invoice.
</DynamicParamField>

<DynamicParamField body="net_terms_days" type="integer">
  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.
</DynamicParamField>

<DynamicParamField body="preview" type="boolean">
  If true, returns the replacement invoice's lines and totals without voiding anything or issuing it.
</DynamicParamField>

<DynamicParamField body="update_customer_email" type="string">
  Updates the customer's billing email before the replacement is issued, so Stripe sends the new invoice to this address.
</DynamicParamField>

<DynamicParamField body="invoice" type="object">
  Changes that apply to the replacement invoice only.

  <Expandable title="properties">
    <DynamicParamField body="automatic_tax" type="boolean">
      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.
    </DynamicParamField>

    <DynamicParamField body="custom_fields" type="object[]">
      Fields shown on this invoice only, such as a PO number. Up to four; pass an empty array to clear them.

      <Expandable title="properties">
        <DynamicParamField body="name" type="string" required />

        <DynamicParamField body="value" type="string" required />
      </Expandable>
    </DynamicParamField>

    <DynamicParamField body="tax_rate_id" type="string | null">
      Stripe tax rate applied to every line. Omit to keep the original's tax, or pass null to issue the replacement with no tax.
    </DynamicParamField>

    <DynamicParamField body="account_tax_ids" type="string[] | null">
      Your own Stripe tax registrations (atx\_...) shown as the seller's tax numbers. Not the customer's.
    </DynamicParamField>

    <DynamicParamField body="footer" type="string | null">
      Footer text, overriding the original's and any template's.
    </DynamicParamField>

    <DynamicParamField body="memo" type="string | null">
      Memo shown near the top of the invoice.
    </DynamicParamField>

    <DynamicParamField body="payment_method_types" type="('card' | 'customer_balance' | 'us_bank_account' | 'sepa_debit' | 'bacs_debit' | 'acss_debit' | 'link')[]">
      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. Only applies to send-invoice replacements.
    </DynamicParamField>
  </Expandable>
</DynamicParamField>

<DynamicParamField body="customer" type="object">
  Changes written to the customer, which the replacement snapshots and later invoices inherit.

  <Expandable title="properties">
    <DynamicParamField body="email" type="string">
      Billing email. Same as update\_customer\_email; passing both with different values is rejected.
    </DynamicParamField>

    <DynamicParamField body="name" type="string">
      Customer name shown on this and every later invoice.
    </DynamicParamField>

    <DynamicParamField body="address" type="object">
      Billing address. Drives tax when the org uses Stripe Tax, and is snapshotted onto the replacement.

      <Expandable title="properties">
        <DynamicParamField body="line1" type="string" />

        <DynamicParamField body="line2" type="string" />

        <DynamicParamField body="city" type="string" />

        <DynamicParamField body="state" type="string" />

        <DynamicParamField body="postal_code" type="string" />

        <DynamicParamField body="country" type="string" />
      </Expandable>
    </DynamicParamField>

    <DynamicParamField body="tax_ids" type="object[]">
      The customer's own tax registrations, e.g. \{ type: 'eu\_vat', value: 'FR123...' }. Replaces the existing set; pass an empty array to remove them.

      <Expandable title="properties">
        <DynamicParamField body="type" type="string" required />

        <DynamicParamField body="value" type="string" required />
      </Expandable>
    </DynamicParamField>

    <DynamicParamField body="invoice_settings_custom_fields" type="object[] | null">
      Custom fields shown on this and every future invoice. Use invoice.custom\_fields for this invoice alone.

      <Expandable title="properties">
        <DynamicParamField body="name" type="string" required />

        <DynamicParamField body="value" type="string" required />
      </Expandable>
    </DynamicParamField>
  </Expandable>
</DynamicParamField>

<DynamicParamField body="lines" type="object">
  Add, change or drop lines relative to the original.

  <Expandable title="properties">
    <DynamicParamField body="add" type="object | object[]">
      <Expandable title="properties">
        <DynamicParamField body="amount" type="number">
          Amount in dollars for this line item (e.g. 10.50). Can be negative for credits.
        </DynamicParamField>

        <DynamicParamField body="description" type="string">
          Description for the line item.
        </DynamicParamField>

        <DynamicParamField body="plan_id" type="string">
          The catalog plan (or variant) whose pricing to use.
        </DynamicParamField>

        <DynamicParamField body="version" type="number">
          Plan version. Defaults to the active version.
        </DynamicParamField>

        <DynamicParamField body="customize" type="object">
          Pricing overrides applied to this invoice only. The catalog and the customer's plan are not changed.

          <Expandable title="properties">
            <DynamicParamField body="price" type="object | null">
              Override the plan's base price for this invoice. Pass null or an amount of 0 to omit the base price line.

              <Expandable title="properties">
                <DynamicParamField body="amount" type="number" required>
                  Base price amount for the plan, in major currency units (e.g. dollars).
                </DynamicParamField>

                <DynamicParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                  Billing interval (e.g. 'month', 'year').
                </DynamicParamField>

                <DynamicParamField body="interval_count" type="number">
                  Number of intervals per billing cycle. Defaults to 1.
                </DynamicParamField>

                <DynamicParamField body="processors" type="object">
                  Bill this line under an existing Stripe price instead of an inline one.

                  <Expandable title="properties">
                    <DynamicParamField body="stripe" type="object | null">
                      <Expandable title="properties">
                        <DynamicParamField body="price_id" type="string" required>
                          Stripe price ID. For prepaid with included > 0 this is the V2 price.
                        </DynamicParamField>
                      </Expandable>
                    </DynamicParamField>
                  </Expandable>
                </DynamicParamField>
              </Expandable>
            </DynamicParamField>

            <DynamicParamField body="items" type="object[]">
              Override feature pricing for this invoice. Only pricing fields are accepted; grants, resets and rollovers are not part of an invoice.

              <Expandable title="properties">
                <DynamicParamField body="feature_id" type="string" required>
                  The feature whose pricing is overridden on this invoice.
                </DynamicParamField>

                <DynamicParamField body="price" type="object">
                  Pricing to use for this feature on this invoice.

                  <Expandable title="properties">
                    <DynamicParamField body="amount" type="number">
                      Price per billing\_units after included usage. Either 'amount' or 'tiers' is required.
                    </DynamicParamField>

                    <DynamicParamField body="tiers" type="object[]">
                      Tiered pricing. Either 'amount' or 'tiers' is required.

                      <Expandable title="properties">
                        <DynamicParamField body="to" type="number" required />

                        <DynamicParamField body="amount" type="number" />

                        <DynamicParamField body="flat_amount" type="number" />

                        <DynamicParamField body="additional_currencies" type="object[]">
                          Per-currency amounts for this tier. Tier boundaries ('to') are shared across all currencies.

                          <Expandable title="properties">
                            <DynamicParamField body="currency" type="string" required>
                              Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                            </DynamicParamField>

                            <DynamicParamField body="amount" type="number">
                              Per-unit amount for this tier in this currency.
                            </DynamicParamField>

                            <DynamicParamField body="flat_amount" type="number">
                              Flat amount for this tier in this currency, if the tier uses one.
                            </DynamicParamField>
                          </Expandable>
                        </DynamicParamField>
                      </Expandable>
                    </DynamicParamField>

                    <DynamicParamField body="tier_behavior" type="'graduated' | 'volume'" />

                    <DynamicParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                      Billing interval. For consumable features, should match reset.interval.
                    </DynamicParamField>

                    <DynamicParamField body="interval_count" type="number">
                      Number of intervals per billing cycle. Defaults to 1.
                    </DynamicParamField>

                    <DynamicParamField body="billing_units" type="number">
                      Units per price increment. Usage is rounded UP when billed (e.g. billing\_units=100 means 101 rounds to 200).
                    </DynamicParamField>

                    <DynamicParamField body="billing_method" type="'prepaid' | 'usage_based'" required>
                      'prepaid' for upfront payment (seats), 'usage\_based' for pay-as-you-go.
                    </DynamicParamField>

                    <DynamicParamField body="processors" type="object">
                      Bill this line under an existing Stripe price instead of an inline one.

                      <Expandable title="properties">
                        <DynamicParamField body="stripe" type="object | null">
                          <Expandable title="properties">
                            <DynamicParamField body="price_id" type="string" required>
                              Stripe price ID. For prepaid with included > 0 this is the V2 price.
                            </DynamicParamField>
                          </Expandable>
                        </DynamicParamField>
                      </Expandable>
                    </DynamicParamField>
                  </Expandable>
                </DynamicParamField>

                <DynamicParamField body="feature_override" type="object">
                  For credit-system features: a credit rate card to use when converting `usage` on this invoice.

                  <Expandable title="properties">
                    <DynamicParamField body="credit_schema" type="object | object[]">
                      For credit system features: replaces the feature's credit\_schema entirely for customers on this plan.

                      <Expandable title="properties">
                        <DynamicParamField body="metered_feature_id" type="string">
                          ID of the metered feature that draws from this credit system.
                        </DynamicParamField>

                        <DynamicParamField body="billing_units" type="number">
                          Number of metered-feature units priced together. Defaults to one when omitted.
                        </DynamicParamField>

                        <DynamicParamField body="dimensions.{key}" type="object">
                          Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.

                          <Expandable title="properties">
                            <DynamicParamField body="match.{key}" type="string" required>
                              Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                            </DynamicParamField>

                            <DynamicParamField body="priority" type="integer">
                              Breaks ties between dimensions that match the same number of keys. Higher wins.
                            </DynamicParamField>

                            <DynamicParamField body="tier_behavior" type="any" required />

                            <DynamicParamField body="tiers" type="object[]" required>
                              <Expandable title="properties">
                                <DynamicParamField body="to" type="number" required>
                                  Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                                </DynamicParamField>

                                <DynamicParamField body="credit_cost" type="number" required>
                                  Credits consumed per billing-unit group within this tier.
                                </DynamicParamField>
                              </Expandable>
                            </DynamicParamField>
                          </Expandable>
                        </DynamicParamField>

                        <DynamicParamField body="multipliers.{key}" type="object">
                          Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.

                          <Expandable title="properties">
                            <DynamicParamField body="match.{key}" type="string" required>
                              Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                            </DynamicParamField>

                            <DynamicParamField body="factor" type="number">
                              Multiplies the matched rate. All matching multipliers stack.
                            </DynamicParamField>

                            <DynamicParamField body="add" type="number">
                              Added to the rate after every factor is applied, in credits per billing-unit group.
                            </DynamicParamField>
                          </Expandable>
                        </DynamicParamField>

                        <DynamicParamField body="tier_behavior" type="any" />

                        <DynamicParamField body="tiers" type="object[]">
                          <Expandable title="properties">
                            <DynamicParamField body="to" type="number" required>
                              Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                            </DynamicParamField>

                            <DynamicParamField body="credit_cost" type="number" required>
                              Credits consumed per billing-unit group within this tier.
                            </DynamicParamField>
                          </Expandable>
                        </DynamicParamField>

                        <DynamicParamField body="credit_cost" type="number">
                          Credits consumed per billing-unit group.
                        </DynamicParamField>
                      </Expandable>
                    </DynamicParamField>
                  </Expandable>
                </DynamicParamField>
              </Expandable>
            </DynamicParamField>
          </Expandable>
        </DynamicParamField>

        <DynamicParamField body="feature_quantities" type="object[]">
          <Expandable title="properties">
            <DynamicParamField body="feature_id" type="string" required>
              The feature to bill.
            </DynamicParamField>

            <DynamicParamField body="billing_behavior" type="'prepaid' | 'usage_based'" required>
              Which of the feature's prices to use: 'prepaid' or 'usage\_based'.
            </DynamicParamField>

            <DynamicParamField body="quantity" type="number">
              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.
            </DynamicParamField>

            <DynamicParamField body="usage" type="object[]">
              For credit-system features: billable units of the source features, converted through the credit rate card. Mutually exclusive with quantity.

              <Expandable title="properties">
                <DynamicParamField body="feature_id" type="string" required>
                  The metered feature whose units are being converted.
                </DynamicParamField>

                <DynamicParamField body="quantity" type="number" required>
                  Billable units of the metered feature. Converted to the credit-system feature through its rate card.
                </DynamicParamField>

                <DynamicParamField body="properties" type="object">
                  Event properties used to pick the rate card dimension and multipliers.
                </DynamicParamField>
              </Expandable>
            </DynamicParamField>

            <DynamicParamField body="prorate" type="boolean">
              Whether to prorate this line against period\_start / period\_end. Defaults to true for prepaid and false for usage-based.
            </DynamicParamField>
          </Expandable>
        </DynamicParamField>

        <DynamicParamField body="license_quantities" type="object[]">
          <Expandable title="properties">
            <DynamicParamField body="license_plan_id" type="string" required>
              The license plan linked to the parent plan.
            </DynamicParamField>

            <DynamicParamField body="quantity" type="integer" required>
              Billable seats, exclusive of any included seats.
            </DynamicParamField>

            <DynamicParamField body="customize" type="object">
              Override the license's per-seat price on this invoice.

              <Expandable title="properties">
                <DynamicParamField body="price" type="object | null">
                  <Expandable title="properties">
                    <DynamicParamField body="amount" type="number" required>
                      Base price amount for the plan, in major currency units (e.g. dollars).
                    </DynamicParamField>

                    <DynamicParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                      Billing interval (e.g. 'month', 'year').
                    </DynamicParamField>

                    <DynamicParamField body="interval_count" type="number">
                      Number of intervals per billing cycle. Defaults to 1.
                    </DynamicParamField>

                    <DynamicParamField body="processors" type="object">
                      Bill this line under an existing Stripe price instead of an inline one.

                      <Expandable title="properties">
                        <DynamicParamField body="stripe" type="object | null">
                          <Expandable title="properties">
                            <DynamicParamField body="price_id" type="string" required>
                              Stripe price ID. For prepaid with included > 0 this is the V2 price.
                            </DynamicParamField>
                          </Expandable>
                        </DynamicParamField>
                      </Expandable>
                    </DynamicParamField>
                  </Expandable>
                </DynamicParamField>
              </Expandable>
            </DynamicParamField>

            <DynamicParamField body="feature_quantities" type="object[]">
              Feature charges priced through the license plan.

              <Expandable title="properties">
                <DynamicParamField body="feature_id" type="string" required>
                  The feature to bill.
                </DynamicParamField>

                <DynamicParamField body="billing_behavior" type="'prepaid' | 'usage_based'" required>
                  Which of the feature's prices to use: 'prepaid' or 'usage\_based'.
                </DynamicParamField>

                <DynamicParamField body="quantity" type="number">
                  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.
                </DynamicParamField>

                <DynamicParamField body="usage" type="object[]">
                  For credit-system features: billable units of the source features, converted through the credit rate card. Mutually exclusive with quantity.

                  <Expandable title="properties">
                    <DynamicParamField body="feature_id" type="string" required>
                      The metered feature whose units are being converted.
                    </DynamicParamField>

                    <DynamicParamField body="quantity" type="number" required>
                      Billable units of the metered feature. Converted to the credit-system feature through its rate card.
                    </DynamicParamField>

                    <DynamicParamField body="properties" type="object">
                      Event properties used to pick the rate card dimension and multipliers.
                    </DynamicParamField>
                  </Expandable>
                </DynamicParamField>

                <DynamicParamField body="prorate" type="boolean">
                  Whether to prorate this line against period\_start / period\_end. Defaults to true for prepaid and false for usage-based.
                </DynamicParamField>
              </Expandable>
            </DynamicParamField>

            <DynamicParamField body="prorate" type="boolean">
              Whether to prorate seat charges against period\_start / period\_end. Defaults to true.
            </DynamicParamField>
          </Expandable>
        </DynamicParamField>

        <DynamicParamField body="discounts" type="object[]">
          Discounts applied only to this plan's lines.

          <Expandable title="properties">
            <DynamicParamField body="reward_id" type="string">
              The ID of the reward to apply as a discount.
            </DynamicParamField>

            <DynamicParamField body="promotion_code" type="string">
              The promotion code to apply as a discount.
            </DynamicParamField>
          </Expandable>
        </DynamicParamField>

        <DynamicParamField body="prorate" type="boolean">
          Whether to prorate the base price against period\_start / period\_end. Defaults to true.
        </DynamicParamField>
      </Expandable>
    </DynamicParamField>

    <DynamicParamField body="update" type="object[]">
      <Expandable title="properties">
        <DynamicParamField body="id" type="string" required>
          The invoice line item ID from invoices.list items.
        </DynamicParamField>

        <DynamicParamField body="amount" type="number" />

        <DynamicParamField body="description" type="string" />
      </Expandable>
    </DynamicParamField>

    <DynamicParamField body="remove" type="string[]">
      Invoice line item IDs to leave off the replacement.
    </DynamicParamField>
  </Expandable>
</DynamicParamField>

### Response

<DynamicResponseField name="invoice" type="object | null">
  The replacement invoice. Null when preview is true.

  <Expandable title="properties">
    <DynamicResponseField name="plan_ids" type="string[]">
      Array of plan IDs included in this invoice
    </DynamicResponseField>

    <DynamicResponseField name="stripe_id" type="string">
      The Stripe invoice ID
    </DynamicResponseField>

    <DynamicResponseField name="processor_type" type="'stripe' | 'revenuecat'">
      The billing processor that owns this invoice.
    </DynamicResponseField>

    <DynamicResponseField name="status" type="string">
      The status of the invoice
    </DynamicResponseField>

    <DynamicResponseField name="total" type="number">
      The total amount of the invoice
    </DynamicResponseField>

    <DynamicResponseField name="currency" type="string">
      The currency code for the invoice
    </DynamicResponseField>

    <DynamicResponseField name="created_at" type="number">
      Timestamp when the invoice was created
    </DynamicResponseField>

    <DynamicResponseField name="hosted_invoice_url" type="string | null">
      URL to the Stripe-hosted invoice page
    </DynamicResponseField>

    <DynamicResponseField name="id" type="string">
      The Autumn invoice ID
    </DynamicResponseField>

    <DynamicResponseField name="customer_id" type="string | null">
      The ID of the customer this invoice belongs to. Null for customers created without an ID.
    </DynamicResponseField>

    <DynamicResponseField name="entity_id" type="string | null">
      The ID of the entity this invoice belongs to, if entity-scoped
    </DynamicResponseField>

    <DynamicResponseField name="amount_paid" type="number | null">
      The amount paid on the invoice. Null on invoices recorded before amounts paid were tracked.
    </DynamicResponseField>

    <DynamicResponseField name="refunded_amount" type="number">
      The total amount refunded on the invoice
    </DynamicResponseField>

    <DynamicResponseField name="items" type="object[]">
      Line items on the invoice, one per line as shown in Stripe. Capped at 100. Empty for invoices recorded before line item storage.

      <Expandable title="properties">
        <DynamicResponseField name="id" type="string">
          The Autumn invoice line item ID. Stable across reads, and can be used to reference this line in later calls.
        </DynamicResponseField>

        <DynamicResponseField name="description" type="string">
          Description of the invoice line item
        </DynamicResponseField>

        <DynamicResponseField name="period_start" type="number | null">
          Timestamp when the billing period starts
        </DynamicResponseField>

        <DynamicResponseField name="period_end" type="number | null">
          Timestamp when the billing period ends
        </DynamicResponseField>

        <DynamicResponseField name="plan_id" type="string | null">
          The plan this line item came from. Null for lines with no Autumn plan behind them.
        </DynamicResponseField>

        <DynamicResponseField name="feature_id" type="string | null">
          The ID of the feature associated with this line item
        </DynamicResponseField>

        <DynamicResponseField name="feature_name" type="string | null">
          The name of the feature associated with this line item
        </DynamicResponseField>

        <DynamicResponseField name="quantity" type="number | null">
          Quantity actually charged on this line. Null on fixed-price lines.
        </DynamicResponseField>

        <DynamicResponseField name="amount" type="number">
          Amount charged on this line, pre-discount and pre-tax. Negative for credits.
        </DynamicResponseField>

        <DynamicResponseField name="entities" type="object[]">
          How this line splits by entity. Empty for customer-level lines. Only populated for invoices finalized after entity attribution shipped.

          <Expandable title="properties">
            <DynamicResponseField name="entity_id" type="string">
              The entity this share of the line item is attributed to
            </DynamicResponseField>

            <DynamicResponseField name="quantity" type="number | null">
              Quantity charged to this entity. Null on fixed-price lines.
            </DynamicResponseField>

            <DynamicResponseField name="amount" type="number">
              Amount attributed to this entity, pre-discount and pre-tax
            </DynamicResponseField>
          </Expandable>
        </DynamicResponseField>
      </Expandable>
    </DynamicResponseField>
  </Expandable>
</DynamicResponseField>

<DynamicResponseField name="voided_invoice_id" type="string | null">
  The Autumn ID of the original invoice, now void. Null when previewing, and when the original was paid and got a credit note instead.
</DynamicResponseField>

<DynamicResponseField name="credit_note_id" type="string | null">
  The Stripe credit note issued against a paid original, whose amount lands on the customer's balance and covers the replacement. Null when the original was open and voided instead.
</DynamicResponseField>

<DynamicResponseField name="preview" type="object">
  The replacement's lines and totals.

  <Expandable title="properties">
    <DynamicResponseField name="currency" type="string" />

    <DynamicResponseField name="lines" type="object[]">
      <Expandable title="properties">
        <DynamicResponseField name="plan_id" type="string | null" />

        <DynamicResponseField name="feature_id" type="string | null" />

        <DynamicResponseField name="description" type="string" />

        <DynamicResponseField name="amount" type="number" />

        <DynamicResponseField name="amount_after_discounts" type="number" />

        <DynamicResponseField name="quantity" type="number | null" />

        <DynamicResponseField name="prorated" type="boolean" />

        <DynamicResponseField name="period_start" type="number | null" />

        <DynamicResponseField name="period_end" type="number | null" />
      </Expandable>
    </DynamicResponseField>

    <DynamicResponseField name="subtotal" type="number" />

    <DynamicResponseField name="discount_total" type="number" />

    <DynamicResponseField name="tax" type="object | null">
      <Expandable title="properties">
        <DynamicResponseField name="total" type="number" />

        <DynamicResponseField name="amount_inclusive" type="number" />

        <DynamicResponseField name="amount_exclusive" type="number" />

        <DynamicResponseField name="status" type="'complete' | 'incomplete'" />
      </Expandable>
    </DynamicResponseField>

    <DynamicResponseField name="total" type="number" />

    <DynamicResponseField name="invoice_credits" type="object">
      The customer's Stripe credit balance and how much of it this invoice consumes.

      <Expandable title="properties">
        <DynamicResponseField name="balance" type="number">
          Stripe customer credit balance available, expressed as a positive number in major currency units.
        </DynamicResponseField>

        <DynamicResponseField name="applied" type="number">
          How much of that balance this invoice consumes, capped at its total. The rest stays on the customer.
        </DynamicResponseField>

        <DynamicResponseField name="currency" type="string">
          Three-letter currency code.
        </DynamicResponseField>
      </Expandable>
    </DynamicResponseField>

    <DynamicResponseField name="amount_due" type="number">
      What the customer pays: the total less any credit applied.
    </DynamicResponseField>

    <DynamicResponseField name="issue_date" type="number" />

    <DynamicResponseField name="due_date" type="number | null" />
  </Expandable>
</DynamicResponseField>

<ResponseExample>
  ```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
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml openapi POST /v1/invoices.reissue
openapi: 3.1.0
info:
  title: Autumn API
  version: 2.4.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.4.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.
                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.
                        Only applies to send-invoice replacements.
                  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.
                              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
                                            interval:
                                              enum:
                                                - one_off
                                                - week
                                                - month
                                                - quarter
                                                - semi_annual
                                                - year
                                              type: string
                                              description: >-
                                                Billing interval. For consumable
                                                features, should match reset.interval.
                                            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:
                                                          anyOf:
                                                            - type: object
                                                              properties:
                                                                match:
                                                                  type: object
                                                                  propertyNames:
                                                                    type: string
                                                                  additionalProperties:
                                                                    anyOf:
                                                                      - {}
                                                                      - {}
                                                                      - {}
                                                                  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: {}
                                                                      credit_cost: {}
                                                                    required:
                                                                      - {}
                                                                      - {}
                                                              required:
                                                                - match
                                                                - tier_behavior
                                                                - tiers
                                                              additionalProperties: false
                                                            - type: object
                                                              properties:
                                                                match:
                                                                  type: object
                                                                  propertyNames:
                                                                    type: string
                                                                  additionalProperties:
                                                                    anyOf:
                                                                      - {}
                                                                      - {}
                                                                      - {}
                                                                  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
                                                        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:
                                                          anyOf:
                                                            - type: object
                                                              properties:
                                                                match:
                                                                  type: object
                                                                  propertyNames:
                                                                    type: string
                                                                  additionalProperties:
                                                                    anyOf:
                                                                      - {}
                                                                      - {}
                                                                      - {}
                                                                  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: {}
                                                                      credit_cost: {}
                                                                    required:
                                                                      - {}
                                                                      - {}
                                                              required:
                                                                - match
                                                                - tier_behavior
                                                                - tiers
                                                              additionalProperties: false
                                                            - type: object
                                                              properties:
                                                                match:
                                                                  type: object
                                                                  propertyNames:
                                                                    type: string
                                                                  additionalProperties:
                                                                    anyOf:
                                                                      - {}
                                                                      - {}
                                                                      - {}
                                                                  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
                                                        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: >-
                                                For credit system features: replaces the
                                                feature's credit_schema entirely for
                                                customers on this plan.
                                          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
                                        period_start / period_end. Defaults to
                                        true for prepaid and false for
                                        usage-based.
                                  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'
                                      additionalProperties: false
                                      description: >-
                                        Override the license's per-seat price on
                                        this invoice.
                                    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
                                              period_start / period_end. Defaults to
                                              true for prepaid and false for
                                              usage-based.
                                        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
                                        period_start / period_end. Defaults to
                                        true.
                                  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
                                  period_start / period_end. Defaults to true.
                            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:
                          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
                          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
                          id:
                            type: string
                            description: The Autumn invoice ID
                          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
                          amount_paid:
                            anyOf:
                              - type: number
                              - type: 'null'
                            description: >-
                              The amount paid on the invoice. Null on invoices
                              recorded before amounts paid were tracked.
                          refunded_amount:
                            type: number
                            description: The total amount refunded on the invoice
                          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:
                          - plan_ids
                          - stripe_id
                          - status
                          - total
                          - currency
                          - created_at
                          - id
                          - customer_id
                          - entity_id
                          - amount_paid
                          - refunded_amount
                      - 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,
                      whose amount lands on the customer's balance and covers
                      the replacement. 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'
                            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
                            - 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
                                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'
                    required:
                      - currency
                      - lines
                      - subtotal
                      - discount_total
                      - tax
                      - total
                      - amount_due
                      - issue_date
                      - due_date
                    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:
  securitySchemes:
    secretKey:
      type: http
      scheme: bearer
      bearerFormat: JWT

````