Invoice generation
Borga creates an invoice the moment a payment succeeds. The invoice is associated with the payment and, if provided, the customer record. You can retrieve all invoices withGET /v1/invoices, or fetch a specific invoice with GET /v1/invoices/{id}.
Invoices generated from subscriptions are created at the start of each billing cycle and finalized once payment is collected.
Invoice generation happens asynchronously after payment succeeds. If you query
GET /v1/invoices immediately after a payment, allow a brief moment for the invoice to appear. Use webhooks to receive a notification when an invoice is finalized.Invoice statuses
An invoice moves through the following statuses during its lifecycle:Invoice items
For subscription invoices indraft status, you can add ad-hoc line items before the invoice is finalized using POST /v1/invoice_items. This is useful for one-off charges — setup fees, overages, or adjustments — that should appear on the customer’s next invoice.
curl
Invoice item fields
Credit notes
When you issue a refund against a paid invoice, Borga automatically generates a credit note. A credit note is the legally required document that offsets the original invoice amount — it does not modify or void the invoice itself. Retrieve credit notes withGET /v1/credit_notes. To filter by invoice, pass the invoice ID as a query parameter:
curl
GET /v1/credit_notes/{id}.
Credit notes are generated automatically when a refund is processed. You do not need to create them manually.
PDF access
Every finalized invoice has a PDF available for download. Invoice PDFs are accessible directly from the Borga dashboard under Invoices. From the API, the invoice object includes apdf_url field you can use to open or serve the PDF directly to your customers.