Invoice Line Items
Line items represent individual products or services being billed on an invoice. The Invoice Line Items API allows you to create, retrieve, update, and delete line items for a specific invoice.
The Line Item object
Attributes
Unique identifier for the line item.
String representing the object's type.
The name or description of the product or service.
The quantity of the product or service.
The unit price of the product or service in cents.
Three-letter ISO currency code, in uppercase. Currently only supports "USD".
Time at which the line item was created.
Time at which the line item was last updated.
{
"id": "08231737-6286-4a38-87c6-7e7812b2fafd",
"object": "invoice_line_item",
"description": "Fantastic Granite Keyboard",
"quantity": 3,
"unit_amount_cents": 1000,
"unit_amount_currency": "USD",
"created": 1742574589,
"updated": 1742574589
}
List Line Items
Retrieves a list of line items for a specific invoice.
Parameters
No parameters.
Returns
A dictionary with a data
property that contains an array of Line Item objects.
curl --request GET \
--url https://api.framepayments.com/v1/invoices/inv_1234567890/line_items \
--header 'Authorization: Bearer API_KEY'
{
"data": [
{
"id": "08231737-6286-4a38-87c6-7e7812b2fafd",
"object": "invoice_line_item",
"description": "Fantastic Granite Keyboard",
"quantity": 3,
"unit_amount_cents": 1000,
"unit_amount_currency": "USD",
"created": 1742574589,
"updated": 1742574589
}
]
}
Create a Line Item
Creates a new line item for a specific invoice.
Parameters
The ID of the product to be added to the invoice.
The quantity of the product to be added to the invoice. Must be greater than 0.
Returns
Returns the created Line Item object if the request was successful.
curl --request POST \
--url https://api.framepayments.com/v1/invoices/inv_1234567890/line_items \
--header 'Authorization: Bearer API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"product": "prod_1234567890",
"quantity": 2
}'
{
"id": "08231737-6286-4a38-87c6-7e7812b2fafd",
"object": "invoice_line_item",
"description": "Fantastic Granite Keyboard",
"quantity": 3,
"unit_amount_cents": 1000,
"unit_amount_currency": "USD",
"created": 1742574589,
"updated": 1742574589
}
Update a Line Item
Updates an existing line item for a specific invoice.
Parameters
The ID of the product to update the line item with.
The new quantity for the line item. Must be greater than 0.
Returns
Returns the updated Line Item object if the request was successful.
curl --request PATCH \
--url https://api.framepayments.com/v1/invoices/inv_1234567890/line_items/li_1234567890 \
--header 'Authorization: Bearer API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"quantity": 3
}'
{
"id": "08231737-6286-4a38-87c6-7e7812b2fafd",
"object": "invoice_line_item",
"description": "Fantastic Granite Keyboard",
"quantity": 3,
"unit_amount_cents": 1000,
"unit_amount_currency": "USD",
"created": 1742574589,
"updated": 1742574589
}
Retrieve a Line Item
Retrieves the details of an existing line item.
Parameters
No parameters.
Returns
Returns a Line Item object if a valid ID was provided.
curl --request GET \
--url https://api.framepayments.com/v1/invoices/inv_1234567890/line_items/li_1234567890 \
--header 'Authorization: Bearer API_KEY'
{
"id": "08231737-6286-4a38-87c6-7e7812b2fafd",
"object": "invoice_line_item",
"description": "Fantastic Granite Keyboard",
"quantity": 3,
"unit_amount_cents": 1000,
"unit_amount_currency": "USD",
"created": 1742574589,
"updated": 1742574589
}
Delete a Line Item
Deletes a line item from an invoice. Line items cannot be deleted if the invoice is paid.
Parameters
No parameters.
Returns
Returns a confirmation that the line item has been deleted.
curl --request DELETE \
--url https://api.framepayments.com/v1/invoices/inv_1234567890/line_items/li_1234567890 \
--header 'Authorization: Bearer API_KEY'
{
"object": "invoice_line_item",
"deleted": true
}