When 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.
Parameters
No parameters.
More parameters
- ending_
beforestring A cursor for use in pagination.
ending_is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting withbefore obj_, your subsequent call can includebar ending_in order to fetch the previous page of the list.before=obj_ bar - limitinteger
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
- starting_
afterstring A cursor for use in pagination.
starting_is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending withafter obj_, your subsequent call can includefoo starting_in order to fetch the next page of the list.after=obj_ foo
Returns
Returns a list of line_item objects.
{ "object": "list", "url": "/v1/invoices/in_1NpHiG2eZvKYlo2CZV0ZkEBT/lines", "has_more": false, "data": [ { "id": "il_tmp_1NpHiK2eZvKYlo2C9NdV8VrI", "object": "line_item", "amount": 129999, "amount_excluding_tax": 129999, "currency": "usd", "description": "My First Invoice Item (created for API docs)", "discount_amounts": [], "discountable": true, "discounts": [], "invoice_item": "ii_1NpHiK2eZvKYlo2C9NdV8VrI", "livemode": false, "metadata": {}, "period": { "end": 1694467932, "start": 1694467932 }, "price": { "id": "price_1NpEIa2eZvKYlo2CXcy5DRPA", "object": "price", "active": true, "billing_scheme": "per_unit", "created": 1694454804, "currency": "usd", "custom_unit_amount": null, "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "prod_OcTFTbV7qh48bd", "recurring": null, "tax_behavior": "unspecified", "tiers_mode": null, "transform_quantity": null, "type": "one_time", "unit_amount": 129999, "unit_amount_decimal": "129999" }, "proration": false, "proration_details": { "credited_items": null }, "quantity": 1, "subscription": null, "tax_amounts": [], "tax_rates": [], "type": "invoiceitem", "unit_amount_excluding_tax": "129999" } ]}