Borga automatically generates an invoice for every payment and subscription billing cycle. Invoices are legally compliant documents that include customer details, VAT, and line items. You can retrieve and filter invoices through the API, but you do not create them directly.Documentation Index
Fetch the complete documentation index at: https://docs.borga.is/llms.txt
Use this file to discover all available pages before exploring further.
Invoices are created automatically by Borga when a payment is collected or a subscription billing cycle closes. You cannot create invoices via the API.
| Value | Description |
|---|---|
draft | Invoice is being assembled and has not been finalized. |
open | Invoice has been finalized and is awaiting payment. |
paid | Invoice has been paid in full. |
void | Invoice has been voided and is no longer collectible. |
uncollectible | Payment attempts have failed and the invoice is marked as uncollectible. |
List invoices
GET /v1/invoices
Returns a paginated list of invoices, ordered by creation date descending.
Query parameters
Maximum number of invoices to return per page.
Filter by invoice status. One of
draft, open, paid, void, or uncollectible.Response fields
Array of invoice objects.
Whether more invoices exist beyond this page.
Retrieve an invoice
GET /v1/invoices/{id}
Retrieves the details of an existing invoice, including all line items.
Path parameters
The ID of the invoice to retrieve.
Response fields
Unique invoice identifier.
ID of the associated customer.
ID of the associated subscription, if applicable.
Current invoice status. One of
draft, open, paid, void, or uncollectible.Total amount due on this invoice.
Amount that has been paid.
Three-letter ISO 4217 currency code.
Array of line items on the invoice.
ISO 8601 timestamp for the start of the billing period.
ISO 8601 timestamp for the end of the billing period.
ISO 8601 timestamp of when the invoice was created.
Create an invoice item
POST /v1/invoice_items
Creates an invoice item that will be included on the next invoice generated for the customer. Use this to add one-off charges or adjustments to an upcoming invoice.
Request parameters
The ID of the customer to attach this item to.
Amount for this item.
Description of the item. Appears on the invoice line.
ID of the subscription to associate this item with. If provided, the item will be included on the next invoice for that subscription.
Three-letter ISO 4217 currency code. Defaults to the customer’s currency.
Quantity of the item. Minimum value is
1. Defaults to 1.Set of key-value pairs you can attach to this item. Values must be strings.
Response fields
Unique identifier for the invoice item (e.g.
ii_xxx).ID of the associated customer.
ID of the associated subscription, if provided.
Amount for this item.
Three-letter ISO 4217 currency code.
Item description.
Quantity billed.
Key-value pairs attached to the item.
ISO 8601 timestamp of when the item was created.
List invoice items
GET /v1/invoice_items
Returns a paginated list of invoice items, ordered by creation date descending.
Query parameters
Filter by customer ID.
Filter by subscription ID.
When
true, returns only items not yet attached to an invoice.Cursor for pagination. Pass the
id of the last item from the previous page.Maximum number of items to return per page.
Response fields
Array of invoice item objects.
Whether more items exist beyond this page.
Retrieve an invoice item
GET /v1/invoice_items/{id}
Retrieves the details of an existing invoice item.
Path parameters
The ID of the invoice item to retrieve.