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

# Get invoice

<CodeGroup>
  ```py Python theme={null}
  lotus.get_invoice(
      invoice_id='plan_0569173ee6654369',
  )
  ```

  ```ts Typescript theme={null}
  await lotus.getInvoice({
    plan_id: "plan_0569173ee6654369",
  }); // Will return a promise
  ```
</CodeGroup>


## OpenAPI

````yaml GET /api/invoices/{invoice_id}/
openapi: 3.0.3
info:
  title: Lotus API
  version: 0.9.3
  description: >-
    Lotus is an open-core pricing and billing engine. We enable API companies to
    automate and optimize their custom usage-based pricing for any metric.
servers: []
security: []
paths:
  /api/invoices/{invoice_id}/:
    get:
      tags:
        - api
      operationId: api_invoices_retrieve
      parameters:
        - in: path
          name: invoice_id
          schema:
            type: string
            format: uuid
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
          description: ''
      security:
        - knoxTokenAuth: []
        - OrganizationApiKeyAuth: []
          TokenAuth: []
components:
  schemas:
    Invoice:
      type: object
      properties:
        invoice_id:
          type: string
        invoice_number:
          type: string
          readOnly: true
        cost_due:
          type: number
          format: double
          maximum: 10000000000
          minimum: 0
          exclusiveMaximum: true
          deprecated: true
        amount:
          type: number
          format: double
          maximum: 10000000000
          minimum: -10000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          readOnly: true
        currency:
          $ref: '#/components/schemas/PricingUnit'
        issue_date:
          type: string
          format: date-time
          readOnly: true
        payment_status:
          enum:
            - draft
            - voided
            - paid
            - unpaid
          description: |-
            * `draft` - draft
            * `voided` - voided
            * `paid` - paid
            * `unpaid` - unpaid
          readOnly: true
        external_payment_obj_id:
          type: string
          nullable: true
          readOnly: true
        external_payment_obj_type:
          enum:
            - stripe
            - braintree
            - null
          type: string
          description: |-
            * `stripe` - Stripe
            * `braintree` - Braintree
          nullable: true
        external_payment_obj_status:
          type: string
          nullable: true
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLineItem'
        customer:
          $ref: '#/components/schemas/LightweightCustomerSerializerForInvoice'
        due_date:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        start_date:
          type: string
          format: date
          readOnly: true
        end_date:
          type: string
          format: date
          readOnly: true
        seller:
          $ref: '#/components/schemas/Seller'
        invoice_pdf:
          type: string
          format: uri
          nullable: true
          readOnly: true
      required:
        - amount
        - cost_due
        - currency
        - customer
        - due_date
        - end_date
        - external_payment_obj_id
        - external_payment_obj_type
        - invoice_id
        - invoice_number
        - invoice_pdf
        - issue_date
        - line_items
        - payment_status
        - seller
        - start_date
    PricingUnit:
      type: object
      properties:
        code:
          type: string
          maxLength: 10
        name:
          type: string
          maxLength: 100
        symbol:
          type: string
          maxLength: 10
      required:
        - code
        - name
        - symbol
    InvoiceLineItem:
      type: object
      properties:
        name:
          type: string
          maxLength: 100
        start_date:
          type: string
          format: date-time
        end_date:
          type: string
          format: date-time
        quantity:
          type: number
          format: double
          maximum: 10000000000
          minimum: 0
          exclusiveMaximum: true
          nullable: true
        billing_type:
          enum:
            - in_arrears
            - intermediate
            - in_advance
            - one_time
            - null
          type: string
          description: |-
            * `in_arrears` - In Arrears
            * `intermediate` - Intermediate
            * `in_advance` - In Advance
            * `one_time` - One Time
          nullable: true
        metadata:
          type: object
          additionalProperties: {}
          nullable: true
        plan:
          allOf:
            - $ref: '#/components/schemas/LightweightPlanVersion'
          nullable: true
          readOnly: true
        subscription_filters:
          type: array
          items:
            $ref: '#/components/schemas/SubscriptionFilter'
          nullable: true
          readOnly: true
        base:
          type: number
          format: double
          maximum: 10000000000
          minimum: -10000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          description: >-
            Base price of the line item. This is the price before any
            adjustments are applied.
        adjustments:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLineItemAdjustment'
          readOnly: true
        amount:
          type: number
          format: double
          maximum: 10000000000
          minimum: -10000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          description: >-
            Amount of the line item. This is the price after any adjustments are
            applied.
        subtotal:
          type: number
          format: double
          maximum: 10000000000
          minimum: -10000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          deprecated: true
      required:
        - adjustments
        - amount
        - base
        - billing_type
        - end_date
        - metadata
        - name
        - plan
        - quantity
        - start_date
        - subscription_filters
        - subtotal
    LightweightCustomerSerializerForInvoice:
      type: object
      properties:
        customer_name:
          type: string
          readOnly: true
          nullable: true
          description: The display name of the customer
        email:
          type: string
          format: email
          readOnly: true
          nullable: true
          description: >-
            The primary email address of the customer, must be the same as the
            email address used to create the customer in the payment provider
        customer_id:
          type: string
          readOnly: true
          nullable: true
          description: >-
            The id provided when creating the customer, we suggest matching with
            your internal customer id in your backend
        address:
          allOf:
            - $ref: '#/components/schemas/Address'
          nullable: true
          readOnly: true
      required:
        - customer_id
        - customer_name
        - email
    Seller:
      type: object
      properties:
        name:
          type: string
        address:
          allOf:
            - $ref: '#/components/schemas/Address'
          nullable: true
          readOnly: true
        phone:
          type: string
          nullable: true
          maxLength: 20
        email:
          type: string
          format: email
          nullable: true
          maxLength: 254
      required:
        - name
    LightweightPlanVersion:
      type: object
      properties:
        plan_name:
          type: string
          readOnly: true
        plan_id:
          type: string
        version_id:
          type: string
          readOnly: true
        version:
          oneOf:
            - type: integer
            - enum:
                - custom_version
              type: string
          readOnly: true
      required:
        - plan_id
        - plan_name
        - version
        - version_id
    SubscriptionFilter:
      type: object
      properties:
        value:
          type: string
        property_name:
          type: string
          description: 'The string name of the property to filter on. Example: ''product_id'''
      required:
        - property_name
        - value
    InvoiceLineItemAdjustment:
      type: object
      properties:
        amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,10}(?:\.\d{0,10})?$
        account:
          type: string
          readOnly: true
        adjustment_type:
          enum:
            - sales_tax
            - plan_adjustment
          description: |-
            * `sales_tax` - sales_tax
            * `plan_adjustment` - plan_adjustment
          readOnly: true
      required:
        - account
        - adjustment_type
        - amount
    Address:
      type: object
      properties:
        city:
          type: string
          description: City, district, suburb, town, or village
          maxLength: 50
        country:
          enum:
            - AW
            - AF
            - AO
            - AI
            - AX
            - AL
            - AD
            - AE
            - AR
            - AM
            - AS
            - AQ
            - TF
            - AG
            - AU
            - AT
            - AZ
            - BI
            - BE
            - BJ
            - BQ
            - BF
            - BD
            - BG
            - BH
            - BS
            - BA
            - BL
            - BY
            - BZ
            - BM
            - BO
            - BR
            - BB
            - BN
            - BT
            - BV
            - BW
            - CF
            - CA
            - CC
            - CH
            - CL
            - CN
            - CI
            - CM
            - CD
            - CG
            - CK
            - CO
            - KM
            - CV
            - CR
            - CU
            - CW
            - CX
            - KY
            - CY
            - CZ
            - DE
            - DJ
            - DM
            - DK
            - DO
            - DZ
            - EC
            - EG
            - ER
            - EH
            - ES
            - EE
            - ET
            - FI
            - FJ
            - FK
            - FR
            - FO
            - FM
            - GA
            - GB
            - GE
            - GG
            - GH
            - GI
            - GN
            - GP
            - GM
            - GW
            - GQ
            - GR
            - GD
            - GL
            - GT
            - GF
            - GU
            - GY
            - HK
            - HM
            - HN
            - HR
            - HT
            - HU
            - ID
            - IM
            - IN
            - IO
            - IE
            - IR
            - IQ
            - IS
            - IL
            - IT
            - JM
            - JE
            - JO
            - JP
            - KZ
            - KE
            - KG
            - KH
            - KI
            - KN
            - KR
            - KW
            - LA
            - LB
            - LR
            - LY
            - LC
            - LI
            - LK
            - LS
            - LT
            - LU
            - LV
            - MO
            - MF
            - MA
            - MC
            - MD
            - MG
            - MV
            - MX
            - MH
            - MK
            - ML
            - MT
            - MM
            - ME
            - MN
            - MP
            - MZ
            - MR
            - MS
            - MQ
            - MU
            - MW
            - MY
            - YT
            - NA
            - NC
            - NE
            - NF
            - NG
            - NI
            - NU
            - NL
            - 'NO'
            - NP
            - NR
            - NZ
            - OM
            - PK
            - PA
            - PN
            - PE
            - PH
            - PW
            - PG
            - PL
            - PR
            - KP
            - PT
            - PY
            - PS
            - PF
            - QA
            - RE
            - RO
            - RU
            - RW
            - SA
            - SD
            - SN
            - SG
            - GS
            - SH
            - SJ
            - SB
            - SL
            - SV
            - SM
            - SO
            - PM
            - RS
            - SS
            - ST
            - SR
            - SK
            - SI
            - SE
            - SZ
            - SX
            - SC
            - SY
            - TC
            - TD
            - TG
            - TH
            - TJ
            - TK
            - TM
            - TL
            - TO
            - TT
            - TN
            - TR
            - TV
            - TW
            - TZ
            - UG
            - UA
            - UM
            - UY
            - US
            - UZ
            - VA
            - VC
            - VE
            - VG
            - VI
            - VN
            - VU
            - WF
            - WS
            - YE
            - ZA
            - ZM
            - ZW
          type: string
          description: |-
            Two-letter country code (ISO 3166-1 alpha-2)

            * `AW` - Aruba
            * `AF` - Afghanistan
            * `AO` - Angola
            * `AI` - Anguilla
            * `AX` - Åland Islands
            * `AL` - Albania
            * `AD` - Andorra
            * `AE` - United Arab Emirates
            * `AR` - Argentina
            * `AM` - Armenia
            * `AS` - American Samoa
            * `AQ` - Antarctica
            * `TF` - French Southern Territories
            * `AG` - Antigua and Barbuda
            * `AU` - Australia
            * `AT` - Austria
            * `AZ` - Azerbaijan
            * `BI` - Burundi
            * `BE` - Belgium
            * `BJ` - Benin
            * `BQ` - Bonaire, Sint Eustatius and Saba
            * `BF` - Burkina Faso
            * `BD` - Bangladesh
            * `BG` - Bulgaria
            * `BH` - Bahrain
            * `BS` - Bahamas
            * `BA` - Bosnia and Herzegovina
            * `BL` - Saint Barthélemy
            * `BY` - Belarus
            * `BZ` - Belize
            * `BM` - Bermuda
            * `BO` - Bolivia, Plurinational State of
            * `BR` - Brazil
            * `BB` - Barbados
            * `BN` - Brunei Darussalam
            * `BT` - Bhutan
            * `BV` - Bouvet Island
            * `BW` - Botswana
            * `CF` - Central African Republic
            * `CA` - Canada
            * `CC` - Cocos (Keeling) Islands
            * `CH` - Switzerland
            * `CL` - Chile
            * `CN` - China
            * `CI` - Côte d'Ivoire
            * `CM` - Cameroon
            * `CD` - Congo, The Democratic Republic of the
            * `CG` - Congo
            * `CK` - Cook Islands
            * `CO` - Colombia
            * `KM` - Comoros
            * `CV` - Cabo Verde
            * `CR` - Costa Rica
            * `CU` - Cuba
            * `CW` - Curaçao
            * `CX` - Christmas Island
            * `KY` - Cayman Islands
            * `CY` - Cyprus
            * `CZ` - Czechia
            * `DE` - Germany
            * `DJ` - Djibouti
            * `DM` - Dominica
            * `DK` - Denmark
            * `DO` - Dominican Republic
            * `DZ` - Algeria
            * `EC` - Ecuador
            * `EG` - Egypt
            * `ER` - Eritrea
            * `EH` - Western Sahara
            * `ES` - Spain
            * `EE` - Estonia
            * `ET` - Ethiopia
            * `FI` - Finland
            * `FJ` - Fiji
            * `FK` - Falkland Islands (Malvinas)
            * `FR` - France
            * `FO` - Faroe Islands
            * `FM` - Micronesia, Federated States of
            * `GA` - Gabon
            * `GB` - United Kingdom
            * `GE` - Georgia
            * `GG` - Guernsey
            * `GH` - Ghana
            * `GI` - Gibraltar
            * `GN` - Guinea
            * `GP` - Guadeloupe
            * `GM` - Gambia
            * `GW` - Guinea-Bissau
            * `GQ` - Equatorial Guinea
            * `GR` - Greece
            * `GD` - Grenada
            * `GL` - Greenland
            * `GT` - Guatemala
            * `GF` - French Guiana
            * `GU` - Guam
            * `GY` - Guyana
            * `HK` - Hong Kong
            * `HM` - Heard Island and McDonald Islands
            * `HN` - Honduras
            * `HR` - Croatia
            * `HT` - Haiti
            * `HU` - Hungary
            * `ID` - Indonesia
            * `IM` - Isle of Man
            * `IN` - India
            * `IO` - British Indian Ocean Territory
            * `IE` - Ireland
            * `IR` - Iran, Islamic Republic of
            * `IQ` - Iraq
            * `IS` - Iceland
            * `IL` - Israel
            * `IT` - Italy
            * `JM` - Jamaica
            * `JE` - Jersey
            * `JO` - Jordan
            * `JP` - Japan
            * `KZ` - Kazakhstan
            * `KE` - Kenya
            * `KG` - Kyrgyzstan
            * `KH` - Cambodia
            * `KI` - Kiribati
            * `KN` - Saint Kitts and Nevis
            * `KR` - Korea, Republic of
            * `KW` - Kuwait
            * `LA` - Lao People's Democratic Republic
            * `LB` - Lebanon
            * `LR` - Liberia
            * `LY` - Libya
            * `LC` - Saint Lucia
            * `LI` - Liechtenstein
            * `LK` - Sri Lanka
            * `LS` - Lesotho
            * `LT` - Lithuania
            * `LU` - Luxembourg
            * `LV` - Latvia
            * `MO` - Macao
            * `MF` - Saint Martin (French part)
            * `MA` - Morocco
            * `MC` - Monaco
            * `MD` - Moldova, Republic of
            * `MG` - Madagascar
            * `MV` - Maldives
            * `MX` - Mexico
            * `MH` - Marshall Islands
            * `MK` - North Macedonia
            * `ML` - Mali
            * `MT` - Malta
            * `MM` - Myanmar
            * `ME` - Montenegro
            * `MN` - Mongolia
            * `MP` - Northern Mariana Islands
            * `MZ` - Mozambique
            * `MR` - Mauritania
            * `MS` - Montserrat
            * `MQ` - Martinique
            * `MU` - Mauritius
            * `MW` - Malawi
            * `MY` - Malaysia
            * `YT` - Mayotte
            * `NA` - Namibia
            * `NC` - New Caledonia
            * `NE` - Niger
            * `NF` - Norfolk Island
            * `NG` - Nigeria
            * `NI` - Nicaragua
            * `NU` - Niue
            * `NL` - Netherlands
            * `NO` - Norway
            * `NP` - Nepal
            * `NR` - Nauru
            * `NZ` - New Zealand
            * `OM` - Oman
            * `PK` - Pakistan
            * `PA` - Panama
            * `PN` - Pitcairn
            * `PE` - Peru
            * `PH` - Philippines
            * `PW` - Palau
            * `PG` - Papua New Guinea
            * `PL` - Poland
            * `PR` - Puerto Rico
            * `KP` - Korea, Democratic People's Republic of
            * `PT` - Portugal
            * `PY` - Paraguay
            * `PS` - Palestine, State of
            * `PF` - French Polynesia
            * `QA` - Qatar
            * `RE` - Réunion
            * `RO` - Romania
            * `RU` - Russian Federation
            * `RW` - Rwanda
            * `SA` - Saudi Arabia
            * `SD` - Sudan
            * `SN` - Senegal
            * `SG` - Singapore
            * `GS` - South Georgia and the South Sandwich Islands
            * `SH` - Saint Helena, Ascension and Tristan da Cunha
            * `SJ` - Svalbard and Jan Mayen
            * `SB` - Solomon Islands
            * `SL` - Sierra Leone
            * `SV` - El Salvador
            * `SM` - San Marino
            * `SO` - Somalia
            * `PM` - Saint Pierre and Miquelon
            * `RS` - Serbia
            * `SS` - South Sudan
            * `ST` - Sao Tome and Principe
            * `SR` - Suriname
            * `SK` - Slovakia
            * `SI` - Slovenia
            * `SE` - Sweden
            * `SZ` - Eswatini
            * `SX` - Sint Maarten (Dutch part)
            * `SC` - Seychelles
            * `SY` - Syrian Arab Republic
            * `TC` - Turks and Caicos Islands
            * `TD` - Chad
            * `TG` - Togo
            * `TH` - Thailand
            * `TJ` - Tajikistan
            * `TK` - Tokelau
            * `TM` - Turkmenistan
            * `TL` - Timor-Leste
            * `TO` - Tonga
            * `TT` - Trinidad and Tobago
            * `TN` - Tunisia
            * `TR` - Turkey
            * `TV` - Tuvalu
            * `TW` - Taiwan, Province of China
            * `TZ` - Tanzania, United Republic of
            * `UG` - Uganda
            * `UA` - Ukraine
            * `UM` - United States Minor Outlying Islands
            * `UY` - Uruguay
            * `US` - United States
            * `UZ` - Uzbekistan
            * `VA` - Holy See (Vatican City State)
            * `VC` - Saint Vincent and the Grenadines
            * `VE` - Venezuela, Bolivarian Republic of
            * `VG` - Virgin Islands, British
            * `VI` - Virgin Islands, U.S.
            * `VN` - Viet Nam
            * `VU` - Vanuatu
            * `WF` - Wallis and Futuna
            * `WS` - Samoa
            * `YE` - Yemen
            * `ZA` - South Africa
            * `ZM` - Zambia
            * `ZW` - Zimbabwe
        line1:
          type: string
          description: Address line 1 (e.g., street, PO Box, or company name)
          maxLength: 100
        line2:
          type: string
          nullable: true
          description: Address line 2 (e.g., apartment, suite, unit, or building)
        postal_code:
          type: string
          description: ZIP or postal code
          maxLength: 20
        state:
          type: string
          nullable: true
          description: State, county, province, or region
          maxLength: 30
      required:
        - city
        - country
        - line1
        - postal_code
  securitySchemes:
    knoxTokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"
    OrganizationApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````