---
title: "Create a one-off invoice"
method: POST
path: "/invoices"
tags: ["invoices"]
---

# Create a one-off invoice

`POST /invoices`

This endpoint is used for issuing a one-off invoice.

## Request body

- InvoiceOneOffCreateInput
  - `invoice` object, required
    - `external_customer_id` string, required — Unique identifier assigned to the customer in your application.
    - `billing_entity_code` string — The code of the billing entity to issue the invoice from. If not provided, the customer's billing entity is used.
    - `currency` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'ISK' | 'JMD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KRW' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'STD' | 'SZL' | 'THB' | 'TJS' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW'
    - `fees` object[], required
      - `add_on_code` string, required — The code of the add-on used as invoice item.
      - `invoice_display_name` string — Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
      - `unit_amount_cents` integer, nullable — The amount of the fee per unit, expressed in cents. By default, the amount of the add-on is used.
      - `units` string, nullable — The quantity of units associated with the fee. By default, only 1 unit is added to the invoice.
      - `description` string, nullable — This is a description
      - `from_datetime` string, date-time — The lower boundary of the invoice billing interval. The `from_datetime` should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
      - `to_datetime` string, date-time — The upper boundary of the invoice billing interval. The `to_datetime` should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
      - `tax_codes` string[] — List of unique code used to identify the taxes.
      - `skip_psp` boolean, nullable — If true, the invoice will be created but not sent to the payment provider.
    - `invoice_custom_section` InvoiceCustomSectionInput — Configuration for invoice custom sections to apply to invoices generated by this resource.
      - `skip_invoice_custom_sections` boolean — Set to `true` to exclude all invoice custom sections from PDF generation for invoices related to this resource. When `true`, `invoice_custom_section_codes` is ignored.
      - `invoice_custom_section_codes` string[] — List of unique codes identifying the invoice custom sections to apply. These override the default invoice custom sections configured at the customer or billing entity level.
    - `payment_method` PaymentMethodReference — Reference to a specific payment method for processing the payment.
      - `payment_method_type` 'provider' | 'manual' — The type of payment method to use.
      - `payment_method_id` string, uuid — The unique identifier of the payment method (required when using a specific provider payment method).

## Response `200`

Invoice created

- Invoice
  - `invoice` InvoiceObjectExtended, required
    - `lago_id` string, uuid, required — Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee's record within the Lago system.
    - `billing_entity_code` string, nullable, required — The unique code of the billing entity associated with the invoice
    - `sequential_id` integer — This ID helps in uniquely identifying and organizing the invoices associated with a specific customer. It provides a sequential numbering system specific to the customer, allowing for easy tracking and management of invoices within the customer's context.
    - `number` string, required — The unique number assigned to the invoice. This number serves as a distinct identifier for the invoice and helps in differentiating it from other invoices in the system.
    - `issuing_date` string, date, required — The date when the invoice was issued. It is provided in the ISO 8601 date format.
    - `payment_dispute_lost_at` string, date-time — The date when the payment dispute was lost. It is expressed in Coordinated Universal Time (UTC).
    - `payment_due_date` string, date — The payment due date for the invoice, specified in the ISO 8601 date format.
    - `payment_overdue` boolean — Specifies if the payment is considered as overdue.
    - `net_payment_term` integer — The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.
    - `invoice_type` 'subscription' | 'add_on' | 'credit' | 'one_off' | 'progressive_billing', required — The type of invoice issued. Possible values are `subscription`, `one-off`, `credit` or `progressive_billing`.
    - `status` 'draft' | 'finalized' | 'voided' | 'failed' | 'pending', required — The status of the invoice. It indicates the current state of the invoice and can have following values: - `draft`: the invoice is in the draft state, waiting for the end of the grace period to be finalized. During this period, events can still be ingested and added to the invoice. - `finalized`: the invoice has been issued and finalized. In this state, events cannot be ingested or added to the invoice anymore. - `voided`: the invoice has been issued and subsequently voided. In this state, events cannot be ingested or added to the invoice anymore. - `pending`: the invoice remains pending until the taxes are fetched from the external provider. - `failed`: during an attempt of finalization of the invoice, an error happened. This invoice will have an array of error_details, explaining, in which part of the system an error happened and how it's possible to fix it. This invoice can't be edited or updated, only retried. This action will discard current error_details and will create new ones if the finalization failed again.
    - `payment_status` 'pending' | 'succeeded' | 'failed', required — The status of the payment associated with the invoice. It can have one of the following values: - `pending`: the payment is pending, waiting for payment processing in Stripe or when the invoice is emitted but users have not updated the payment status through the endpoint. - `succeeded`: the payment of the invoice has been successfully processed. - `failed`: the payment of the invoice has failed or encountered an error during processing.
    - `currency` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'ISK' | 'JMD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KRW' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'STD' | 'SZL' | 'THB' | 'TJS' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW', required
    - `fees_amount_cents` integer, required — The total sum of fees amount in cents. It calculates the cumulative amount of all the fees associated with the invoice, providing a consolidated value.
    - `coupons_amount_cents` integer, required — The total sum of all coupons discounted on the invoice. It calculates the cumulative discount amount applied by coupons, expressed in cents.
    - `credit_notes_amount_cents` integer, required — The total sum of all credit notes discounted on the invoice. It calculates the cumulative discount amount applied by credit notes, expressed in cents.
    - `sub_total_excluding_taxes_amount_cents` integer, required — Subtotal amount, excluding taxes, expressed in cents. This field depends on the version number. Here are the definitions based on the version: - Version 1: is equal to the sum of `fees_amount_cents`, minus `coupons_amount_cents`, and minus `prepaid_credit_amount_cents`. - Version 2: is equal to the `fees_amount_cents`. - Version 3 & 4: is equal to the `fees_amount_cents`, minus `coupons_amount_cents`
    - `taxes_amount_cents` integer, required — The sum of tax amount associated with the invoice, expressed in cents.
    - `sub_total_including_taxes_amount_cents` integer, required — Subtotal amount, including taxes, expressed in cents. This field depends on the version number. Here are the definitions based on the version: - Version 1: is equal to the `total_amount_cents`. - Version 2: is equal to the sum of `fees_amount_cents` and `taxes_amount_cents`. - Version 3 & 4: is equal to the sum `sub_total_excluding_taxes_amount_cents` and `taxes_amount_cents`
    - `prepaid_credit_amount_cents` integer, required — The total sum of all prepaid credits discounted on the invoice. It calculates the cumulative discount amount applied by prepaid credits, expressed in cents.
    - `prepaid_granted_credit_amount_cents` integer, nullable — The portion of prepaid credits discounted on the invoice that originated from granted (free) credits, expressed in cents. Only populated for invoices associated with traceable wallets.
    - `prepaid_purchased_credit_amount_cents` integer, nullable — The portion of prepaid credits discounted on the invoice that originated from purchased (paid) credits, expressed in cents. Only populated for invoices associated with traceable wallets.
    - `progressive_billing_credit_amount_cents` integer, required — The usage already billed in previous invoices. Only apply to `progressive_billing` and `subscription` invoices.
    - `total_amount_cents` integer, required — The sum of the amount and taxes amount on the invoice, expressed in cents. It calculates the total financial value of the invoice, including both the original amount and any applicable taxes.
    - `version_number` integer, required
    - `self_billed` boolean — Indicates if the invoice is self-billed. Self-billing is a process where an organization creates the invoice on behalf of the partner. This field specifies whether the invoice is self-billed or not.
    - `file_url` string, uri — Contains the URL that provides direct access to the invoice PDF file. You can use this URL to download or view the PDF document of the invoice
    - `created_at` string, date-time, required — The date of the invoice creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The creation_date provides a standardized and internationally recognized timestamp for when the invoice object was created
    - `updated_at` string, date-time, required — The date of the invoice update, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The update_date provides a standardized and internationally recognized timestamp for when the invoice object was updated
    - `customer` CustomerObject
      - `lago_id` string, uuid, required — Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system
      - `sequential_id` integer, required — The unique identifier assigned to the customer within the organization's scope. This identifier is used to track and reference the customer's order of creation within the organization's system. It ensures that each customer has a distinct `sequential_id`` associated with them, allowing for easy identification and sorting based on the order of creation
      - `slug` string, required — A concise and unique identifier for the customer, formed by combining the Organization's `name`, `id`, and customer's `sequential_id`
      - `external_id` string, required — The customer external unique identifier (provided by your own application)
      - `billing_entity_code` string — The unique code of the billing entity associated with the customer.
      - `address_line1` string, nullable — The first line of the billing address
      - `address_line2` string, nullable — The second line of the billing address
      - `applicable_timezone` 'UTC' | 'Africa/Algiers' | 'Africa/Cairo' | 'Africa/Casablanca' | 'Africa/Harare' | 'Africa/Johannesburg' | 'Africa/Monrovia' | 'Africa/Nairobi' | 'America/Argentina/Buenos_Aires' | 'America/Bogota' | 'America/Caracas' | 'America/Chicago' | 'America/Chihuahua' | 'America/Denver' | 'America/Guatemala' | 'America/Guyana' | 'America/Halifax' | 'America/Indiana/Indianapolis' | 'America/Juneau' | 'America/La_Paz' | 'America/Lima' | 'America/Los_Angeles' | 'America/Mazatlan' | 'America/Mexico_City' | 'America/Monterrey' | 'America/Montevideo' | 'America/New_York' | 'America/Nuuk' | 'America/Phoenix' | 'America/Puerto_Rico' | 'America/Regina' | 'America/Santiago' | 'America/Sao_Paulo' | 'America/St_Johns' | 'America/Tijuana' | 'Asia/Almaty' | 'Asia/Baghdad' | 'Asia/Baku' | 'Asia/Bangkok' | 'Asia/Chongqing' | 'Asia/Colombo' | 'Asia/Dhaka' | 'Asia/Hong_Kong' | 'Asia/Irkutsk' | 'Asia/Jakarta' | 'Asia/Jerusalem' | 'Asia/Kabul' | 'Asia/Kamchatka' | 'Asia/Karachi' | 'Asia/Kathmandu' | 'Asia/Kolkata' | 'Asia/Krasnoyarsk' | 'Asia/Kuala_Lumpur' | 'Asia/Kuwait' | 'Asia/Magadan' | 'Asia/Muscat' | 'Asia/Novosibirsk' | 'Asia/Riyadh' | 'Asia/Seoul' | 'Asia/Shanghai' | 'Asia/Singapore' | 'Asia/Srednekolymsk' | 'Asia/Taipei' | 'Asia/Tashkent' | 'Asia/Tbilisi' | 'Asia/Tehran' | 'Asia/Tokyo' | 'Asia/Ulaanbaatar' | 'Asia/Urumqi' | 'Asia/Vladivostok' | 'Asia/Yakutsk' | 'Asia/Yangon' | 'Asia/Yekaterinburg' | 'Asia/Yerevan' | 'Atlantic/Azores' | 'Atlantic/Cape_Verde' | 'Atlantic/South_Georgia' | 'Australia/Adelaide' | 'Australia/Brisbane' | 'Australia/Darwin' | 'Australia/Hobart' | 'Australia/Melbourne' | 'Australia/Perth' | 'Australia/Sydney' | 'Europe/Amsterdam' | 'Europe/Athens' | 'Europe/Belgrade' | 'Europe/Berlin' | 'Europe/Bratislava' | 'Europe/Brussels' | 'Europe/Bucharest' | 'Europe/Budapest' | 'Europe/Copenhagen' | 'Europe/Dublin' | 'Europe/Helsinki' | 'Europe/Istanbul' | 'Europe/Kaliningrad' | 'Europe/Kyiv' | 'Europe/Lisbon' | 'Europe/Ljubljana' | 'Europe/London' | 'Europe/Madrid' | 'Europe/Minsk' | 'Europe/Moscow' | 'Europe/Paris' | 'Europe/Prague' | 'Europe/Riga' | 'Europe/Rome' | 'Europe/Samara' | 'Europe/Sarajevo' | 'Europe/Skopje' | 'Europe/Sofia' | 'Europe/Stockholm' | 'Europe/Tallinn' | 'Europe/Vienna' | 'Europe/Vilnius' | 'Europe/Volgograd' | 'Europe/Warsaw' | 'Europe/Zagreb' | 'Europe/Zurich' | 'GMT+12' | 'Pacific/Apia' | 'Pacific/Auckland' | 'Pacific/Chatham' | 'Pacific/Fakaofo' | 'Pacific/Fiji' | 'Pacific/Guadalcanal' | 'Pacific/Guam' | 'Pacific/Honolulu' | 'Pacific/Majuro' | 'Pacific/Midway' | 'Pacific/Noumea' | 'Pacific/Pago_Pago' | 'Pacific/Port_Moresby' | 'Pacific/Tongatapu', required
      - `city` string, nullable — The city of the customer's billing address
      - `country` 'null' | 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AO' | 'AQ' | 'AR' | 'AS' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BO' | 'BQ' | 'BR' | 'BS' | 'BT' | 'BV' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CC' | 'CD' | 'CF' | 'CG' | 'CH' | 'CI' | 'CK' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CU' | 'CV' | 'CW' | 'CX' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FM' | 'FO' | 'FR' | 'GA' | 'GB' | 'GD' | 'GE' | 'GF' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GP' | 'GQ' | 'GR' | 'GS' | 'GT' | 'GU' | 'GW' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IR' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KP' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MF' | 'MG' | 'MH' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MP' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MX' | 'MY' | 'MZ' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PE' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PN' | 'PR' | 'PS' | 'PT' | 'PW' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RU' | 'RW' | 'SA' | 'SB' | 'SC' | 'SD' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SY' | 'SZ' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'UM' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW', nullable
      - `currency` 'null' | 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'ISK' | 'JMD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KRW' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'STD' | 'SZL' | 'THB' | 'TJS' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW', nullable
      - `email` string, email, nullable — The email of the customer
      - `legal_name` string, nullable — The legal company name of the customer
      - `legal_number` string, nullable — The legal company number of the customer
      - `logo_url` string, nullable — The logo URL of the customer
      - `name` string, nullable — The full name of the customer
      - `firstname` string, nullable — First name of the customer
      - `lastname` string, nullable — Last name of the customer
      - `account_type` 'customer' | 'partner' — The type of the account. It can have one of the following values: - `customer`: the account is a customer. - `partner`: the account is a partner.
      - `customer_type` 'company' | 'individual' | 'null', nullable — The type of the customer. It can have one of the following values: - `company`: the customer is a company. - `individual`: the customer is an individual.
      - `phone` string, nullable — The phone number of the customer
      - `state` string, nullable — The state of the customer's billing address
      - `tax_identification_number` string, nullable — The tax identification number of the customer
      - `timezone` 'null' | 'UTC' | 'Africa/Algiers' | 'Africa/Cairo' | 'Africa/Casablanca' | 'Africa/Harare' | 'Africa/Johannesburg' | 'Africa/Monrovia' | 'Africa/Nairobi' | 'America/Argentina/Buenos_Aires' | 'America/Bogota' | 'America/Caracas' | 'America/Chicago' | 'America/Chihuahua' | 'America/Denver' | 'America/Godthab' | 'America/Guatemala' | 'America/Guyana' | 'America/Halifax' | 'America/Indiana/Indianapolis' | 'America/Juneau' | 'America/La_Paz' | 'America/Lima' | 'America/Los_Angeles' | 'America/Mazatlan' | 'America/Mexico_City' | 'America/Monterrey' | 'America/Montevideo' | 'America/New_York' | 'America/Phoenix' | 'America/Puerto_Rico' | 'America/Regina' | 'America/Santiago' | 'America/Sao_Paulo' | 'America/St_Johns' | 'America/Tijuana' | 'Asia/Almaty' | 'Asia/Baghdad' | 'Asia/Baku' | 'Asia/Bangkok' | 'Asia/Chongqing' | 'Asia/Colombo' | 'Asia/Dhaka' | 'Asia/Hong_Kong' | 'Asia/Irkutsk' | 'Asia/Jakarta' | 'Asia/Jerusalem' | 'Asia/Kabul' | 'Asia/Kamchatka' | 'Asia/Karachi' | 'Asia/Kathmandu' | 'Asia/Kolkata' | 'Asia/Krasnoyarsk' | 'Asia/Kuala_Lumpur' | 'Asia/Kuwait' | 'Asia/Magadan' | 'Asia/Muscat' | 'Asia/Novosibirsk' | 'Asia/Rangoon' | 'Asia/Riyadh' | 'Asia/Seoul' | 'Asia/Shanghai' | 'Asia/Singapore' | 'Asia/Srednekolymsk' | 'Asia/Taipei' | 'Asia/Tashkent' | 'Asia/Tbilisi' | 'Asia/Tehran' | 'Asia/Tokyo' | 'Asia/Ulaanbaatar' | 'Asia/Urumqi' | 'Asia/Vladivostok' | 'Asia/Yakutsk' | 'Asia/Yekaterinburg' | 'Asia/Yerevan' | 'Atlantic/Azores' | 'Atlantic/Cape_Verde' | 'Atlantic/South_Georgia' | 'Australia/Adelaide' | 'Australia/Brisbane' | 'Australia/Darwin' | 'Australia/Hobart' | 'Australia/Melbourne' | 'Australia/Perth' | 'Australia/Sydney' | 'Europe/Amsterdam' | 'Europe/Athens' | 'Europe/Belgrade' | 'Europe/Berlin' | 'Europe/Bratislava' | 'Europe/Brussels' | 'Europe/Bucharest' | 'Europe/Budapest' | 'Europe/Copenhagen' | 'Europe/Dublin' | 'Europe/Helsinki' | 'Europe/Istanbul' | 'Europe/Kaliningrad' | 'Europe/Kiev' | 'Europe/Lisbon' | 'Europe/Ljubljana' | 'Europe/London' | 'Europe/Madrid' | 'Europe/Minsk' | 'Europe/Moscow' | 'Europe/Paris' | 'Europe/Prague' | 'Europe/Riga' | 'Europe/Rome' | 'Europe/Samara' | 'Europe/Sarajevo' | 'Europe/Skopje' | 'Europe/Sofia' | 'Europe/Stockholm' | 'Europe/Tallinn' | 'Europe/Vienna' | 'Europe/Vilnius' | 'Europe/Volgograd' | 'Europe/Warsaw' | 'Europe/Zagreb' | 'Europe/Zurich' | 'GMT+12' | 'Pacific/Apia' | 'Pacific/Auckland' | 'Pacific/Chatham' | 'Pacific/Fakaofo' | 'Pacific/Fiji' | 'Pacific/Guadalcanal' | 'Pacific/Guam' | 'Pacific/Honolulu' | 'Pacific/Majuro' | 'Pacific/Midway' | 'Pacific/Noumea' | 'Pacific/Pago_Pago' | 'Pacific/Port_Moresby' | 'Pacific/Tongatapu', nullable
      - `url` string, nullable — The custom website URL of the customer
      - `zipcode` string, nullable — The zipcode of the customer's billing address
      - `net_payment_term` integer, nullable — The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.
      - `created_at` string, date-time, required — The date of the customer creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The creation_date provides a standardized and internationally recognized timestamp for when the customer object was created
      - `updated_at` string, date-time — The date of the customer update, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The update_date provides a standardized and internationally recognized timestamp for when the customer object was updated
      - `finalize_zero_amount_invoice` 'inherit' | 'skip' | 'finalize' — Specifies how invoices with a zero total amount should be handled: - `inherit`: (Default) Follows the organization-level configuration. - `finalize`: Invoices are issued and finalized even if the total amount is zero. - `skip`: Invoices with a total amount of zero are not finalized.
      - `skip_invoice_custom_sections` boolean — Set to true to exclude all invoice custom sections from PDF generation for this customer only.
      - `billing_configuration` CustomerBillingConfiguration — Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer.
        - `invoice_grace_period` integer — The grace period, expressed in days, for the invoice. This period refers to the additional time granted to the customer beyond the invoice due date to adjust usage and line items
        - `subscription_invoice_issuing_date_anchor` 'current_period_end' | 'next_period_start' | 'null', nullable — Defines whether the issuing date follows the current billing period's end date or the next period starting date.
        - `subscription_invoice_issuing_date_adjustment` 'align_with_finalization_date' | 'keep_anchor' | 'null', nullable — The logic applied on top of the subscription_invoice_issuing_date_anchor rule. You can opt to use the invoice finalization date, that includes any configured grace period.
        - `payment_provider` 'stripe' | 'adyen' | 'gocardless' — The payment provider utilized to initiate payments for invoices issued by Lago. Accepted values: `stripe`, `adyen`, `gocardless` or null. This field is required if you intend to assign a `provider_customer_id`.
        - `payment_provider_code` string — Unique code used to identify a payment provider connection.
        - `provider_customer_id` string — The customer ID within the payment provider's system. If this field is not provided, Lago has the option to create a new customer record within the payment provider's system on behalf of the customer
        - `sync` boolean — Set this field to `true` if you want to create the customer in the payment provider synchronously with the customer creation process in Lago. This option is applicable only when the `provider_customer_id` is `null` and the customer is automatically created in the payment provider through Lago. By default, the value is set to `false`
        - `sync_with_provider` boolean — Set this field to `true` if you want to create a customer record in the payment provider's system. This option is applicable only when the `provider_customer_id` is null and the `sync_with_provider` field is set to `true`. By default, the value is set to `false`
        - `document_locale` string — The document locale, specified in the ISO 639-1 format. This field represents the language or locale used for the documents issued by Lago
        - `provider_payment_methods` string[], nullable — Specifies the available payment methods that can be used for this customer when `payment_provider` is set to `stripe`. The `provider_payment_methods` field is an array that allows multiple payment options to be defined. If this field is not explicitly set, the payment methods will be set to `card`. For now, possible values are `card`, `sepa_debit`, `us_bank_account`, `bacs_debit`, `boleto`, `link`, `crypto` and `customer_balance`. Note that when `link` is selected, `card` should also be provided in the array. When `customer_balance` is selected, no other payment can be selected.
      - `shipping_address` Address — Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer.
        - `address_line1` string, nullable — The first line of the billing address
        - `address_line2` string, nullable — The second line of the billing address
        - `city` string, nullable — The city of the customer's billing address
        - `country` 'null' | 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AO' | 'AQ' | 'AR' | 'AS' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BO' | 'BQ' | 'BR' | 'BS' | 'BT' | 'BV' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CC' | 'CD' | 'CF' | 'CG' | 'CH' | 'CI' | 'CK' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CU' | 'CV' | 'CW' | 'CX' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FM' | 'FO' | 'FR' | 'GA' | 'GB' | 'GD' | 'GE' | 'GF' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GP' | 'GQ' | 'GR' | 'GS' | 'GT' | 'GU' | 'GW' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IR' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KP' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MF' | 'MG' | 'MH' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MP' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MX' | 'MY' | 'MZ' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PE' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PN' | 'PR' | 'PS' | 'PT' | 'PW' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RU' | 'RW' | 'SA' | 'SB' | 'SC' | 'SD' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SY' | 'SZ' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'UM' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW', nullable
        - `state` string, nullable — The state of the customer's billing address
        - `zipcode` string, nullable — The zipcode of the customer's billing address
      - `metadata` CustomerMetadata[]
        - `lago_id` string, uuid, required — A unique identifier for the customer metadata object in the Lago application. Can be used to update a key-value pair
        - `key` string, required — The metadata object key
        - `value` string, required — The metadata object value
        - `display_in_invoice` boolean, required — Determines whether the item or information should be displayed in the invoice. If set to true, the item or information will be included and visible in the generated invoice. If set to false, the item or information will be excluded and not displayed in the invoice.
        - `created_at` string, date-time, required — The date of the metadata object creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The creation_date provides a standardized and internationally recognized timestamp for when the metadata object was created
      - `integration_customers` IntegrationCustomer[]
        - `lago_id` string, uuid, required — A unique identifier for the integration customer object in the Lago application.
        - `type` 'netsuite' | 'anrok' | 'xero' | 'hubspot' | 'salesforce', required — The integration type used for accounting and tax syncs. Accepted values: `netsuite, anrok`.
        - `integration_code` string, required — Unique code used to identify an integration connection.
        - `external_customer_id` string, required — The customer ID within the integration's system. If this field is not provided, Lago has the option to create a new customer record within the integration's system on behalf of the customer.
        - `sync_with_provider` boolean, nullable — Set this field to `true` if you want to create a customer record in the integration's system. This option is applicable only when the `external_customer_id` is null and the `sync_with_provider` field is set to `true`. By default, the value is set to `false`
        - `subsidiary_id` string — This optional field is needed only when working with `netsuite` connection.
        - `targeted_object` string, nullable — This optional field is present only when working with `hubspot` connection.
        - `email` string, nullable — This optional field is present only when working with `hubspot` connection.
    - `metadata` InvoiceMetadataObject[]
      - `lago_id` string, uuid — Unique identifier assigned to the invoice metadata within the Lago application.
      - `key` string — Represents the key of the metadata's key-value pair.
      - `value` string — Represents the value of the metadata's key-value pair (140 characters max).
      - `created_at` string, date-time — The date and time when the metadata object was created. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
    - `applied_taxes` InvoiceAppliedTaxObject[]
      - `lago_id` string, uuid, required — Unique identifier of the applied tax, created by Lago.
      - `lago_tax_id` string, uuid, nullable, required — Unique identifier of the tax, created by Lago.
      - `tax_name` string, required — Name of the tax.
      - `tax_code` string, required — Unique code used to identify the tax associated with the API request.
      - `tax_rate` number, required — The percentage rate of the tax
      - `tax_description` string, nullable, required — Internal description of the tax
      - `amount_cents` integer, required — Amount of the tax
      - `amount_currency` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'ISK' | 'JMD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KRW' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'STD' | 'SZL' | 'THB' | 'TJS' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW', required
      - `created_at` string, date-time, required — The date and time when the applied tax was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the applied tax was initially created.
    - `applied_invoice_custom_sections` InvoiceAppliedInvoiceCustomSectionObject[] — The invoice custom sections applied to this invoice for PDF generation.
      - `lago_id` string, uuid, required — Unique identifier of the applied invoice custom section in the Lago application.
      - `lago_invoice_id` string, uuid, required — Unique identifier of the invoice this custom section is applied to.
      - `code` string, required — Unique code identifying the invoice custom section.
      - `details` string, required — The value shown on the invoice PDF.
      - `display_name` string, required — The name of the invoice custom section displayed on the invoice.
      - `created_at` string, date-time, required — The date of the applied invoice custom section creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
    - `applied_usage_thresholds` AppliedUsageThresholdObject[]
      - `lifetime_usage_amount_cents` integer, required — The amount of usage in cents that has been accumulated over the lifetime of the subscription.
      - `created_at` string, date-time, required — The date and time when the lifetime usage was computed. It is expressed in UTC format according to the ISO 8601 datetime standard.
      - `usage_threshold` UsageThresholdObject, required
        - `lago_id` string, uuid, required — Unique identifier of the usage threshold created by Lago.
        - `threshold_display_name` string, nullable, required — The display name of the usage threshold.
        - `amount_cents` integer, required — The amount to reach to trigger a `progressive_billing` invoice.
        - `recurring` boolean, required — This field when set to `true` indicates that a `progressive_billing` invoice will be created every time the lifetime usage increases by the specified amount.
        - `created_at` string, date-time, required — The date and time when the usage threshold was created. It is expressed in UTC format according to the ISO 8601 datetime standard.
        - `updated_at` string, date-time, required — The date and time when the usage threshold was last updated. It is expressed in UTC format according to the ISO 8601 datetime standard.
    - `billing_periods` BillingPeriodObject[]
      - `lago_subscription_id` string, uuid, required — Unique identifier assigned to the subscription, created by Lago.
      - `external_subscription_id` string, required — Unique identifier assigned to the subscription in your application.
      - `lago_plan_id` string, uuid, required — Unique identifier assigned to the plan, created by Lago.
      - `subscription_from_datetime` string, date-time, required — The beginning date of the subscription billing period. This field indicates the start date of the billing period associated with the subscription fee.
      - `subscription_to_datetime` string, date-time, required — The ending date of the subscription billing period. This field indicates the end date of the billing period associated with the subscription fee.
      - `charges_from_datetime` string, date-time, required — The beginning date of the period that covers the charge fees. It is applicable only to the `charge` fees attached to the subscription. This field indicates the start date of the billing period or subscription period associated with the fees.
      - `charges_to_datetime` string, date-time, required — The ending date of the period that covers the charge fees. It is applicable only to the `charge` fees attached to the subscription. This field indicates the end date of the billing period or subscription period associated with the fees.
      - `invoicing_reason` 'subscription_starting' | 'subscription_periodic' | 'subscription_terminating' | 'in_advance_charge' | 'in_advance_charge_periodic' | 'progressive_billing', required — The reason explaining why this subscription appears on the invoice.
    - `credits` CreditObject[]
      - `lago_id` string, uuid, required — Unique identifier assigned to the credit within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the credit's item record within the Lago system.
      - `amount_cents` integer, required — The amount of credit associated with the invoice, expressed in cents.
      - `amount_currency` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'ISK' | 'JMD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KRW' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'STD' | 'SZL' | 'THB' | 'TJS' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW', required
      - `before_taxes` boolean, required — Indicates whether the credit is applied on the amount before taxes (coupons) or after taxes (credit notes). This flag helps determine the order in which credits are applied to the invoice calculation
      - `item` object, required — The item attached to the credit.
        - `lago_item_id` string, uuid, required — Unique identifier assigned to the credit item within the Lago application.
        - `type` 'coupon' | 'credit_note' | 'invoice', required — The type of credit applied. Possible values are `coupon`, `credit_note` or `invoice` (for `progressive_billing` invoice).
        - `code` string, required — The code of the credit applied. It can be the code of the coupon attached to the credit, the credit note's number or the `progressive_billing` invoice number.
        - `name` string, required — The name of the credit applied. It can be the name of the coupon attached to the credit, the initial invoice's number linked to the credit note or the `progressive_billing` invoice number.
      - `invoice` object, required
        - `lago_id` string, uuid, required
        - `payment_status` 'pending' | 'succeeded' | 'failed', required
    - `fees` FeeObject[]
      - `lago_id` string, uuid, nullable — Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee's record within the Lago system.
      - `lago_charge_id` string, uuid, nullable — Unique identifier assigned to the charge that the fee belongs to
      - `lago_charge_filter_id` string, uuid, nullable — Unique identifier assigned to the charge filter that the fee belongs to
      - `lago_fixed_charge_id` string, uuid, nullable — Unique identifier assigned to the fixed charge that the fee belongs to
      - `lago_invoice_id` string, uuid, nullable — Unique identifier assigned to the invoice that the fee belongs to
      - `lago_true_up_fee_id` string, uuid, nullable — Unique identifier assigned to the true-up fee when a minimum has been set to the charge. This identifier helps to distinguish and manage the true-up fee associated with the charge, which may be applicable when a minimum threshold or limit is set for the charge amount.
      - `lago_true_up_parent_fee_id` string, uuid, nullable — Unique identifier assigned to the parent fee on which the true-up fee is assigned. This identifier establishes the relationship between the parent fee and the associated true-up fee.
      - `lago_subscription_id` string, uuid, nullable — Unique identifier assigned to the subscription, created by Lago. This field is specifically displayed when the fee type is charge or subscription.
      - `lago_customer_id` string, uuid, nullable — Unique identifier assigned to the customer, created by Lago. This field is specifically displayed when the fee type is charge or subscription.
      - `external_customer_id` string, nullable — Unique identifier assigned to the customer in your application. This field is specifically displayed when the fee type is charge or subscription.
      - `external_subscription_id` string, nullable — Unique identifier assigned to the subscription in your application. This field is specifically displayed when the fee type is charge or subscription.
      - `amount_cents` integer, required — The cost of this specific fee, excluding any applicable taxes.
      - `precise_amount` string — The cost of this specific fee, excluding any applicable taxes, with precision.
      - `precise_total_amount` string — The cost of this specific fee, including any applicable taxes, with precision.
      - `amount_currency` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'ISK' | 'JMD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KRW' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'STD' | 'SZL' | 'THB' | 'TJS' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW', required
      - `taxes_amount_cents` integer, required — The cost of the tax associated with this specific fee.
      - `taxes_precise_amount` string — The cost of the tax associated with this specific fee, with precision.
      - `taxes_rate` number, required — The tax rate associated with this specific fee.
      - `units` string, required — The number of units used to charge the customer. This field indicates the quantity or count of units consumed or utilized in the context of the charge. It helps in determining the basis for calculating the fee or cost associated with the usage of the service or product provided to the customer.
      - `precise_unit_amount` string, required — The unit amount of the fee per unit, with precision.
      - `total_aggregated_units` string, required — The total number of units that have been aggregated for this specific fee.
      - `total_amount_cents` integer, required — The cost of this specific fee, including any applicable taxes.
      - `total_amount_currency` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'ISK' | 'JMD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KRW' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'STD' | 'SZL' | 'THB' | 'TJS' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW', required
      - `events_count` integer, nullable — The number of events that have been sent and used to charge the customer. This field indicates the count or quantity of events that have been processed and considered in the charging process.
      - `pay_in_advance` boolean, required — Flag that indicates whether the fee was paid in advance. It serves as a boolean value, where `true` represents that the fee was paid in advance (straightaway), and `false` indicates that the fee was not paid in arrears (at the end of the period).
      - `invoiceable` boolean, required — Flag that indicates whether the fee was included on the invoice. It serves as a boolean value, where `true` represents that the fee was included on the invoice, and `false` indicates that the fee was not included on the invoice.
      - `from_date` string, date-time, nullable — The beginning date of the period that the fee covers. It is applicable only to `subscription`, `charge`, `fixed_charge` and `commitment` fees. This field indicates the start date of the billing period or subscription period associated with the fee.
      - `to_date` string, date-time, nullable — The ending date of the period that the fee covers. It is applicable only to `subscription`, `charge`, `fixed_charge` and `commitment` fees. This field indicates the end date of the billing period or subscription period associated with the fee.
      - `payment_status` 'pending' | 'succeeded' | 'failed' | 'refunded', required — Indicates the payment status of the fee. It represents the current status of the payment associated with the fee. The possible values for this field are `pending`, `succeeded`, `failed` and `refunded`.
      - `created_at` string, date-time, nullable — The date and time when the fee was created. It is provided in Coordinated Universal Time (UTC) format.
      - `succeeded_at` string, date-time, nullable — The date and time when the payment for the fee was successfully processed. It is provided in Coordinated Universal Time (UTC) format.
      - `failed_at` string, date-time, nullable — The date and time when the payment for the fee failed to process. It is provided in Coordinated Universal Time (UTC) format.
      - `refunded_at` string, date-time, nullable — The date and time when the payment for the fee was refunded. It is provided in Coordinated Universal Time (UTC) format
      - `event_transaction_id` string, nullable — Unique identifier assigned to the transaction. This field is specifically displayed when the fee type is `charge` and the payment for the fee is made in advance (`pay_in_advance` is set to `true`).
      - `description` string, nullable — The description of the fee.
      - `precise_coupons_amount_cents` string — The coupon amount applied to the fee, with precision.
      - `sub_total_excluding_taxes_amount_cents` integer, required — The sub total of the fee excluding taxes, in cents.
      - `sub_total_excluding_taxes_precise_amount_cents` string, required — The sub total of the fee excluding taxes, with precision.
      - `amount_details` FeeAmountDetails
        - `plan_amount_cents` integer — The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan.
        - `graduated_ranges` object[] — Graduated ranges, used for a `graduated` charge model.
          - `units` string, required — Total units received in Lago.
          - `from_value` integer, required — Lower value of a tier. It is either 0 or the previous range's `to_value + 1`.
          - `to_value` integer, nullable, required — Highest value of a tier. - This value is higher than the from_value of the same tier. - This value is null for the last tier.
          - `flat_unit_amount` string, required — Flat unit amount within a specified tier.
          - `per_unit_amount` string, required — Amount per unit within a specified tier.
          - `per_unit_total_amount` string, required — Total amount of received units to be charged within a specified tier.
          - `total_with_flat_amount` string, required — Total amount to be charged for a specific tier, taking into account the flat_unit_amount and the per_unit_total_amount.
        - `graduated_percentage_ranges` object[] — Graduated percentage ranges, used for a `graduated_percentage` charge model.
          - `units` string, required — Total units received in Lago.
          - `from_value` integer, required — Lower value of a tier. It is either 0 or the previous range's `to_value + 1`.
          - `to_value` integer, nullable, required — Highest value of a tier. - This value is higher than the from_value of the same tier. - This value is null for the last tier.
          - `flat_unit_amount` string, required — Flat unit amount within a specified tier.
          - `rate` string, ^[0-9]+.?[0-9]*$, required — Percentage rate applied within a specified tier.
          - `per_unit_total_amount` string, required — Total amount of received units to be charged within a specified tier.
          - `total_with_flat_amount` string, required — Total amount to be charged for a specific tier, taking into account the flat_unit_amount and the per_unit_total_amount.
        - `free_units` string — The quantity of units that are provided free of charge for each billing period in a `package` charge model.
        - `paid_units` string — The quantity of units that are not provided free of charge for each billing period in a `package` charge model.
        - `per_package_size` integer — The quantity of units included, defined for Package or Percentage charge model.
        - `per_package_unit_amount` string — Total amount to charge for received paid_units, defined for Package or Percentage charge model.
        - `per_unit_total_amount` string — Total amount of received units to be charged for the Volume or Percentage charge model.
        - `units` string — The total units received in Lago for the Percentage charge model.
        - `free_events` integer — Total number of free events allowed for the Percentage charge model.
        - `rate` string, ^[0-9]+.?[0-9]*$ — Percentage rate applied for the Percentage charge model.
        - `paid_events` integer — Total number of paid events for the Percentage charge model.
        - `fixed_fee_unit_amount` string — Fixed fee unit price per received paid_event for the Percentage charge model.
        - `fixed_fee_total_amount` string — Total amount to charge for received paid_events for the Percentage charge model.
        - `min_max_adjustment_total_amount` string — Total adjustment amount linked to minimum and maximum spending per transaction for the Percentage charge model.
        - `per_unit_amount` string — The flat amount for a whole tier, excluding tax, for a `volume` charge model.
        - `flat_unit_amount` string — The unit price, excluding tax, for a specific tier of a `volume` charge model.
      - `self_billed` boolean — Indicates if the fee belongs to self-billed invoice. Self-billing is a process where an organization creates the invoice on behalf of the partner.
      - `item` object, required — Item attached to the fee
        - `type` 'charge' | 'fixed_charge' | 'add_on' | 'subscription' | 'credit' | 'commitment', required — The fee type. Possible values are `add-on`, `charge`, `fixed_charge`, `credit`, `subscription` or `commitment`.
        - `code` string, required — The code of the fee item. It can be the code of the `add-on`, the code of the `charge`, the code of the `fixed_charge`, the code of the `credit` or the code of the `subscription`.
        - `name` string, required — The name of the fee item. The value depends on the type of the fee item: - If the fee item is a `charge`, it is the billable metric name. - If the fee item is a `add-on`, it is the add-on name. - If the fee item is a `credit`, it is the wallet transaction name if set, or `"credit"` if not. - If the fee item is a `fixed_charge`, it is the fixed charge add-on name. - For all the other fee items, it is the subscription plan name.
        - `description` string, nullable — The description of the fee item. The value depends on the type of the fee item: - If the fee item is a `charge`, it is the billable metric description. - If the fee item is a `add-on`, it is the add-on description. - If the fee item is a `credit`, it is always `"credit"`. - If the fee item is a `fixed_charge`, it is the fixed charge add-on description. - For all the other fee items, it is the subscription plan description.
        - `invoice_display_name` string — Specifies the name that will be displayed on an invoice. If no value is set for this field, we'll fallback to a value that depends on the type of the fee items: - If the fee item is a `charge`, we'll fallback to the `invoice_display_name` of the `charge` or the billable metric name if no `invoice_display_name` is set. - If the fee item is a `add-on`, we'll fallback to the `invoice_name` of the `add-on` or the `name` of the `add-on`. - If the fee item is a `credit`, we'll fallback to the wallet transaction name if set, or `credit` if not. - If the fee item is a `fixed_charge`, we'll fallback to the `invoice_display_name` of the `fixed_charge` or the `invoice_name` of the `fixed_charge_add_on` if no `invoice_display_name` is set. - For all the other fee items, we'll fallback to the `invoice_display_name` of the subscription plan.
        - `filter_invoice_display_name` string, nullable — Specifies the name that will be displayed on an invoice. If no value is set for this field, the actual charge filter values will be used as the default display name.
        - `filters` object, nullable — Key value list of event properties
        - `lago_item_id` string, uuid, required — Unique identifier of the fee item, created by Lago. It can be the identifier of the `add-on`, the `charge`, the `credit`, the `subscription` or the `commitment`.
        - `item_type` 'AddOn' | 'BillableMetric' | 'Subscription' | 'WalletTransaction', required — The type of the fee item. Possible values are `AddOn`, `BillableMetric`, `WalletTransaction`, `Subscription`.
        - `grouped_by` object — Key value list of event properties aggregated by the charge model
      - `applied_taxes` FeeAppliedTaxObject[] — List of fee applied taxes
        - `lago_id` string, uuid, required — Unique identifier of the applied tax, created by Lago.
        - `lago_tax_id` string, uuid, nullable, required — Unique identifier of the tax, created by Lago.
        - `tax_name` string, required — Name of the tax.
        - `tax_code` string, required — Unique code used to identify the tax associated with the API request.
        - `tax_rate` number, required — The percentage rate of the tax
        - `tax_description` string, nullable, required — Internal description of the tax
        - `amount_cents` integer, required — Amount of the tax
        - `amount_currency` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'ISK' | 'JMD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KRW' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'STD' | 'SZL' | 'THB' | 'TJS' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW', required
        - `created_at` string, date-time, required — The date and time when the applied tax was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the applied tax was initially created.
      - `pricing_unit_details` PricingUnitDetailsObject
        - `lago_pricing_unit_id` string, uuid, required — Unique identifier of the pricing unit, created by Lago.
        - `pricing_unit_code` string, required — The code of the pricing unit.
        - `short_name` string, required — The short name of the pricing unit. Will be used as currency name in the UI and PDFs.
        - `amount_cents` integer, required — The amount in cents in the pricing unit.
        - `precise_amount_cents` string, required — The precise amount in cents in the pricing unit.
        - `unit_amount_cents` integer, required — The unit amount in cents in the pricing unit.
        - `precise_unit_amount` string, required — The precise unit amount in the pricing unit.
        - `conversion_rate` string, required — The conversion rate from pricing units to the plan's currency.
      - `presentation_breakdowns` object[] — Array of usage breakdowns split by presentation group keys without affecting pricing or aggregation.
        - `presentation_by` object — Key value list of event properties used for presentation grouping.
        - `units` string — The number of units consumed for a specific presentation group.
    - `subscriptions` SubscriptionObject[]
      - `lago_id` string, uuid, required — Unique identifier assigned to the subscription within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription's record within the Lago system
      - `external_id` string, required — The subscription external unique identifier (provided by your own application).
      - `lago_customer_id` string, uuid, required — Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system
      - `external_customer_id` string, required — The customer external unique identifier (provided by your own application).
      - `billing_entity_code` string — The code of the billing entity associated with the subscription.
      - `billing_time` 'calendar' | 'anniversary', required — The billing time for the subscription, which can be set as either `anniversary` or `calendar`. If not explicitly provided, it will default to `calendar`. The billing time determines the timing of recurring billing cycles for the subscription. By specifying `anniversary`, the billing cycle will be based on the specific date the subscription started (billed fully), while `calendar` sets the billing cycle at the first day of the week/month/year (billed with proration).
      - `name` string, nullable, required — The display name of the subscription on an invoice. This field allows for customization of the subscription's name for billing purposes, especially useful when a single customer has multiple subscriptions using the same plan.
      - `plan_code` string, required — The unique code representing the plan to be attached to the customer. This code must correspond to the `code` property of one of the active plans.
      - `plan_amount_cents` integer — The base cost of the related plan, excluding any applicable taxes, that is billed on a recurring basis.
      - `plan_amount_currency` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'ISK' | 'JMD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KRW' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'STD' | 'SZL' | 'THB' | 'TJS' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW'
      - `status` 'active' | 'canceled' | 'incomplete' | 'pending' | 'terminated', required — The status of the subscription, which can have the following values: - `active`: the subscription is currently active and applied to the customer. - `canceled`: the subscription has been stopped before its activation. This can occur when two consecutive downgrades have been applied to a customer, when a subscription with a pending status is terminated, or when a payment-gated subscription fails to be paid (or its activation rule expires) before activation. When caused by payment gating, the `cancellation_reason` field is set. - `incomplete`: the subscription was created with a payment activation rule and is waiting for the gating payment to succeed before it becomes `active`. It is automatically `canceled` if the payment fails or the activation rule expires. - `pending`: a previous subscription has been downgraded, and the current one is awaiting automatic activation at the end of the billing period. - `terminated`: the subscription is no longer active.
      - `created_at` string, date-time, required — The creation date of the subscription, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). This date provides a timestamp indicating when the subscription was initially created.
      - `canceled_at` string, date-time, nullable, required — The cancellation date of the subscription. This field is not null when the subscription is `canceled`. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
      - `started_at` string, date-time, nullable, required — The effective start date of the subscription. This field can be null if the subscription is `pending` or `canceled`. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
      - `ending_at` string, date-time, nullable, required — The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC).
      - `subscription_at` string, date-time, required — The anniversary date and time of the initial subscription. This date serves as the basis for billing subscriptions with `anniversary` billing time. The `anniversary_date` should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
      - `terminated_at` string, date-time, nullable, required — The termination date of the subscription. This field is not null when the subscription is `terminated`. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC)
      - `previous_plan_code` string, nullable, required — The code identifying the previous plan associated with this subscription.
      - `next_plan_code` string, nullable, required — The code identifying the next plan in the case of a downgrade.
      - `downgrade_plan_date` string, date, nullable, required — The date when the plan will be downgraded, represented in ISO 8601 date format.
      - `trial_ended_at` string, date-time, nullable, required — The date when the free trial is ended, represented in ISO 8601 date format.
      - `current_billing_period_started_at` string, date-time, nullable, required — The date and time when the current billing period started, represented in ISO 8601 date format.
      - `current_billing_period_ending_at` string, date-time, nullable, required — The date and time when the current billing period ends, represented in ISO 8601 date format.
      - `on_termination_credit_note` 'credit' | 'refund' | 'offset' | 'skip', nullable, required — When a pay-in-advance subscription is terminated before the end of its billing period, we generate a credit note for the unused subscription time by default. This field allows you to control the behavior of the credit note generation: - `credit`: A credit note is generated for the unused subscription time. The unused amount is credited back to the customer. - `refund`: A credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is credited back to the customer. - `offset`: A credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is applied to the invoice reducing its amount due. - `skip`: No credit note is generated for the unused subscription time. _Note: This field is only applicable to pay-in-advance plans and will be `null` for pay-in-arrears plans._
      - `on_termination_invoice` 'generate' | 'skip', required — When a subscription is terminated before the end of its billing period, we generate an invoice for the unbilled usage. This field allows you to control the behavior of the invoice generation: - `generate`: An invoice is generated for the unbilled usage. - `skip`: No invoice is generated for the unbilled usage.
      - `applied_invoice_custom_sections` AppliedInvoiceCustomSectionObject[] — The invoice custom sections applied to invoices generated by this subscription.
        - `lago_id` string, uuid, required — Unique identifier of the applied invoice custom section in the Lago application.
        - `created_at` string, date-time, required — The date of the applied invoice custom section creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
        - `invoice_custom_section_id` string, uuid — **Deprecated.** Unique identifier of the invoice custom section that was applied.
        - `invoice_custom_section` InvoiceCustomSectionObject, required
          - `lago_id` string, uuid, required — Unique identifier for the invoice custom section in the Lago application, generated by Lago to ensure record uniqueness within the system.
          - `name` string, required — Name of the invoice custom section.
          - `code` string, required — Unique code identifying the invoice custom section for the API request.
          - `description` string — Internal description of the invoice custom section.
          - `details` string — The value shown on the invoice PDF.
          - `display_name` string — The name of the invoice custom section displayed on the invoice.
          - `applied_to_organization` boolean — **Deprecated.** This field will be removed in a future version. When set to true, it applies the invoice custom section to the organization's default billing entity. To apply or remove an invoice custom section from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead.
          - `organization_id` string, uuid — Unique identifier for the organization associated with the invoice custom section.
          - `created_at` string, date-time — Creation date of the tax.
      - `payment_method` PaymentMethodReference — Reference to a specific payment method for processing the payment.
        - `payment_method_type` 'provider' | 'manual' — The type of payment method to use.
        - `payment_method_id` string, uuid — The unique identifier of the payment method (required when using a specific provider payment method).
      - `consolidate_invoice` boolean — Controls whether this subscription is eligible to be grouped with other subscriptions of the same customer on a consolidated recurring invoice. - `true` (default): the subscription is included in the customer's standard invoice grouping (by billing entity, currency and payment method). - `false`: the subscription is excluded from consolidation and always billed on its own dedicated invoice, regardless of other grouping criteria.
      - `cancellation_reason` 'payment_failed' | 'timeout', nullable — The reason a payment-gated subscription was canceled before activation. Null unless the subscription was canceled by payment gating. - `payment_failed`: the gating payment failed. - `timeout`: the activation rule expired before the payment succeeded.
      - `activated_at` string, date-time, nullable — The date and time when a payment-gated subscription was activated (i.e. moved from `incomplete` to `active` once the gating payment succeeded), represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). Null while the subscription is still `incomplete`.
      - `activation_rules` SubscriptionActivationRuleObject[] — The activation rules attached to the subscription. A payment activation rule gates activation on a successful first payment, keeping the subscription in the `incomplete` state until the payment succeeds or the rule expires.
        - `lago_id` string, uuid, required — Unique identifier assigned to the activation rule within the Lago application. This ID is exclusively created by Lago.
        - `type` 'payment', required — The type of the activation rule. Only `payment` is currently supported. A `payment` rule gates the subscription activation on a successful payment of the first invoice.
        - `timeout_hours` integer, required — The number of hours the subscription stays in the `incomplete` state waiting for the payment to succeed before it is automatically canceled.
        - `status` 'inactive' | 'pending' | 'satisfied' | 'declined' | 'failed' | 'expired' | 'not_applicable', required — The evaluation status of the activation rule: - `inactive`: the rule has not been evaluated yet. - `pending`: the rule is applicable and is waiting to be satisfied (e.g. waiting for the payment). - `satisfied`: the rule has been satisfied and no longer blocks activation. - `declined`: the rule was applicable but was declined. - `failed`: the rule could not be satisfied (e.g. the payment failed). - `expired`: the rule was not satisfied before its timeout elapsed. - `not_applicable`: the rule did not apply to this subscription.
        - `expires_at` string, date-time, nullable — The date and time when the rule expires, after which an unsatisfied rule causes the subscription to be canceled. Represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). Null until the rule starts being evaluated.
        - `created_at` string, date-time, required — The creation date of the activation rule, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
        - `updated_at` string, date-time, required — The last update date of the activation rule, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
    - `error_details` ErrorDetailObject[]
      - `lago_id` string, uuid, nullable, required — Unique identifier assigned to the error_detail within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the error's record within the Lago system.
      - `error_code` string, required — Code that specifies part of the application / connection, where the error originally happened
      - `details` object, required — Key value list of more elaborated error detail, where by the key of error_code an external service error details are stored

## Other responses

- `400` — Bad Request error
- `401` — Unauthorized error
- `422` — Unprocessable entity error

---

[API](https://skmtc.dev/getlago/apis/lago-api-documentation.md) · [All operations](https://skmtc.dev/getlago/apis/lago-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/getlago/lago-api-documentation/revisions/6e969ef3bb45/schema)
