Invoices are created automatically by Borga when a payment is collected or a subscription billing cycle closes. You cannot create invoices via the API.
List invoices
GET /v1/invoices
Returns a paginated list of invoices, ordered by creation date descending.
Query parameters
number
Maximum number of invoices to return per page.
string
Filter by invoice status. One of
draft, open, paid, void, or uncollectible.Response fields
object[]
required
Array of invoice objects.
boolean
required
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
string
required
The ID of the invoice to retrieve.
Response fields
string
required
Unique invoice identifier.
string
required
ID of the associated customer.
string
ID of the associated subscription, if applicable.
string
required
Current invoice status. One of
draft, open, paid, void, or uncollectible.number
required
Total amount due on this invoice.
number
required
Amount that has been paid.
string
required
Three-letter ISO 4217 currency code.
object[]
required
Array of line items on the invoice.
string
required
ISO 8601 timestamp for the start of the billing period.
string
required
ISO 8601 timestamp for the end of the billing period.
string
required
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
string
required
The ID of the customer to attach this item to.
number
required
Amount for this item.
string
required
Description of the item. Appears on the invoice line.
string
ID of the subscription to associate this item with. If provided, the item will be included on the next invoice for that subscription.
string
Three-letter ISO 4217 currency code. Defaults to the customer’s currency.
number
Quantity of the item. Minimum value is
1. Defaults to 1.object
Set of key-value pairs you can attach to this item. Values must be strings.
Response fields
string
required
Unique identifier for the invoice item (e.g.
ii_xxx).string
required
ID of the associated customer.
string
ID of the associated subscription, if provided.
number
required
Amount for this item.
string
required
Three-letter ISO 4217 currency code.
string
required
Item description.
number
required
Quantity billed.
object
Key-value pairs attached to the item.
string
required
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
string
Filter by customer ID.
string
Filter by subscription ID.
boolean
When
true, returns only items not yet attached to an invoice.string
Cursor for pagination. Pass the
id of the last item from the previous page.number
Maximum number of items to return per page.
Response fields
object[]
required
Array of invoice item objects.
boolean
required
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
string
required
The ID of the invoice item to retrieve.