code: import stripe
  stripe.api_key = "sk_test_your_key"
  
  invoice = stripe.Invoice.retrieve('in_1LSdrX2eZvKYlo2Cy1kxMopu')
  lines = invoice.lines.list(limit=5)
  '''Response {
    "object": "list",
    "url": "/v1/invoices/in_1LSdrX2eZvKYlo2Cy1kxMopu/lines",
    "has_more": false,
    "data": [
      {
        "id": "il_tmp_1LSdra2eZvKYlo2COW02i0Bc",
        "object": "line_item",
        "amount": 300,
        "amount_excluding_tax": 300,
        "currency": "usd",
        "description": "My First Invoice Item (created for API docs)",
        "discount_amounts": [],
        "discountable": true,
        "discounts": [],
        "invoice_item": "ii_1LSdra2eZvKYlo2COW02i0Bc",
        "livemode": false,
        "metadata": {},
        "period": {
          "end": 1659518858,
          "start": 1659518858
        },
        "price": {
          "id": "price_1LScCX2eZvKYlo2C1Z9zPyXF",
          "object": "price",
          "active": true,
          "billing_scheme": "per_unit",
          "created": 1659512469,
          "currency": "usd",
          "custom_unit_amount": null,
          "livemode": false,
          "lookup_key": null,
          "metadata": {},
          "nickname": null,
          "product": "prod_MAy8UvSA0uRRju",
          "recurring": null,
          "tax_behavior": "unspecified",
          "tiers_mode": null,
          "transform_quantity": null,
          "type": "one_time",
          "unit_amount": 300,
          "unit_amount_decimal": "300"
        },
        "proration": false,
        "proration_details": {
          "credited_items": null
        },
        "quantity": 1,
        "subscription": null,
        "tax_amounts": [],
        "tax_rates": [],
        "type": "invoiceitem",
        "unit_amount_excluding_tax": "300"
      },
      {...},
      {...}
    ]
  }'''
nl: Retrieve an invoice's line itemsWhen retrieving an invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.ParametersExpand all  ending_before optional   limit optional   starting_after optional ReturnsReturns a list of line_item objects