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, "currency": "usd", "description": "My First Invoice Item (created for API docs)", "discount_amounts": [], "discountable": true, "discounts": [], "livemode": false, "metadata": {}, "parent": { "type": "invoice_item_details", "invoice_item_details": { "invoice_item": "ii_1NpHiK2eZvKYlo2C9NdV8VrI", "proration": false, "proration_details": { "credited_items": null }, "subscription": null } }, "period": { "end": 1694467932, "start": 1694467932 }, "pricing": { "price_details": { "price": "price_1NpEIa2eZvKYlo2CXcy5DRPA", "product": "prod_OcTFTbV7qh48bd" }, "type": "price_details", "unit_amount_decimal": "129999" }, "quantity": 1, "taxes": [] } ]}