Invoicing and accounting sync
Every sale is booked as a legal invoice in PayDay.is or DK+, refunds become credit notes, and your books need no second system.
Icelandic law requires a compliant sales invoice for every sale. Rather than generating invoices itself, Borga connects to the accounting system you already use and creates the invoice there: the provider issues the legal document and PDF, and Borga keeps a reference to it as an Invoice object (inv_…). Refunds are mirrored as credit notes (cn_…).
Supported providers
| Provider | Connection | Bank invoices (krafa) |
|---|---|---|
| PayDay.is | Paste the client ID and secret of an API integration created in PayDay under Stillingar → Fyrirtæki → Samþættingar (company settings; add a PaydayAPI integration), then choose the payment type card payments are booked to | Yes |
| DK+ | Paste an API token generated in DK+ | No |
Connect one provider per mode under Settings. Test mode connects to the provider's test environment, so you can see invoices appear without touching real books.
What gets booked
| Event in Borga | In your accounting system |
|---|---|
| Card or wallet payment succeeds | A paid sales invoice to the customer's name, email and kennitala when known, with one line per line item at its tax rate, or a single line at the payment's tax_rate (your default VAT rate when none was sent) when the payment has none |
| Bank invoice requested | An open invoice sent as a bank claim; marked paid when the bank confirms |
| Subscription period ends | A finalised invoice with one line per subscription item, collected by card or bank claim |
| Refund succeeds | A credit note against the original invoice. PayDay credits a full refund by cancelling the invoice; issue a partial refund's credit note in PayDay |
The Invoice object records the provider's id and invoice number, the pdf_url, totals, tax and the billing details used. Retrieve it with the Invoices API or list a customer's invoices in the customer portal.
Statuses
| Status | Meaning |
|---|---|
draft | Created by a billing cycle, not yet sent to the provider |
open | Issued and awaiting payment (bank invoices, send_invoice subscriptions) |
paid | Paid and booked |
void | Voided, so it can no longer be paid. PayDay invoices and their bank claims are cancelled in PayDay too |
sync_failed | The provider rejected the request, or the total it computed differs from the amount Borga charged. The payment itself is unaffected. |
When a sync fails Borga emits invoice.sync_failed with the provider's error, and the invoice can be re-synced from its page under Invoices in the dashboard. Common causes are an expired provider token, no PayDay payment type chosen yet, a VAT code that does not exist in the provider, and a VAT code mapped to a different rate than the line's tax_rate, which Borga catches by comparing the provider's total with the amount it charged rather than booking a wrong invoice. If the provider had already created the invoice when the sync failed, Borga keeps its reference and re-syncing never creates a second one: a payment's invoice is marked paid, and a subscription invoice is reopened for collection. Re-syncing after a total mismatch therefore accepts the total as the provider booked it.
Managing invoices
The Invoices page in the dashboard lists invoices by status, with Open showing what is still awaiting payment. An invoice's page shows its lines, billing details and, for bank invoices, the claim's due date, reference (KID) and account. From there you can:
- Send invoice: email the PDF to the payer, with how to pay it if it is open.
- Mark paid: record a payment that arrived outside Borga, such as a bank transfer. The invoice is marked paid in your provider too.
- Void invoice: cancel an open invoice so it can't be paid. A paid invoice is refunded instead.
The same actions are in the API: void, pay and send.
VAT and accounts
VAT is off until you turn it on under Settings, with a default rate; Borga never assumes one. Off, every payment is charged and shown with no VAT in it, like a plain card payment, whatever rates your catalogue or a request carries, and the provider books lines at 0%. Connecting an accounting system asks you to decide. On, each line item carries its own tax_rate in basis points (2400 for 24%, 1100 for 11%, 0 for exempt), the provider receives that rate on the line, and payments without line items book as one line at the tax_rate sent on the payment or session, else your default rate. Amounts include VAT unless sent with tax_behavior: "exclusive", which adds the VAT on top of a net amount; see prices without VAT. The provider receives the same lines either way, with the price including VAT.
Subscription invoices split each line at its product's tax_rate, read when the invoice is built, else your default VAT rate. A price's amount is what the customer pays, VAT included, so the rate only decides how the line is booked, unless the price was created with tax_behavior: "exclusive", when the product's rate is added on top of its net amount. Prorations and pause credits carry the rate of the price they adjust, and invoice items carry their own tax_rate. A subscription started from checkout books its prepaid first period line by line at each product's rate. A customer marked exempt or reverse (VAT status) is charged the prices without their VAT: each line's net at its rate, no tax, on invoices, prorations, quotes and checkout alike.
For DK+ the same page has two optional overrides: a map from tax rates to DK+ VAT codes, and a default revenue account. Give a line item or a Price an accounting_code to book it to a specific account; the code is copied onto the invoice line. PayDay takes the rate on each line directly and books revenue by its own account rules, so neither override applies there.
Rates and codes are resolved when the payment is created and frozen on it. Changing a setting affects payments taken from then on, never an invoice that already exists.
Without a provider
You can take payments before connecting a provider. Borga still records an Invoice object per payment so the history is complete, but nothing is booked anywhere and there is no PDF. Bank invoices are unavailable until PayDay is connected.
Related
- Bank invoices
- Refunds and credit notes
- Customer portal for payer-facing invoice history
- Credit notes API