Skip to main content

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.

Borga’s AccountingLink feature connects your merchant account to an external accounting provider, automatically pushing invoices, VAT data, and payment records on every transaction. Once connected, every new invoice Borga generates is synced to your accounting software without any manual intervention.

Supported providers

Retrieve the list of providers available on your platform:
curl https://api.borga.is/v1/accounting_link/providers \
  -H "Authorization: Bearer sk_live_…" \
  -H "X-Merchant-Id: mer_xxx"
This returns a list of provider objects. Some providers use OAuth (you are redirected to authorize), and others (such as DK+) use a form-based credential flow.

Connect a provider

1

Start the connection

Call POST /v1/accounting_link/connect to initiate. For OAuth providers, the response contains a redirect_url — send the merchant there to authorize access.
curl -X POST https://api.borga.is/v1/accounting_link/connect \
  -H "Authorization: Bearer sk_live_…" \
  -H "X-Merchant-Id: mer_xxx" \
  -H "Content-Type: application/json" \
  -d '{"provider": "my_provider"}'
{
  "redirect_url": "https://oauth.provider.is/authorize?..."
}
2

Complete the authorization

OAuth providers: After the merchant authorizes, the provider redirects to Borga’s callback endpoint at /v1/accounting_link/callback/{provider}. Borga exchanges the code and saves credentials automatically.Form-based providers (e.g. DK+): Skip the redirect. Post credentials directly:
curl -X POST https://api.borga.is/v1/accounting_link/complete \
  -H "Authorization: Bearer sk_live_…" \
  -H "X-Merchant-Id: mer_xxx" \
  -H "Content-Type: application/json" \
  -d '{"provider": "dk_plus", "username": "...", "password": "..."}'
3

Configure VAT and GL account mapping

Fetch your chart of accounts and VAT codes from the connected provider:
curl https://api.borga.is/v1/accounting_link/chart_of_accounts \
  -H "Authorization: Bearer sk_live_…" \
  -H "X-Merchant-Id: mer_xxx"

curl https://api.borga.is/v1/accounting_link/vat_codes \
  -H "Authorization: Bearer sk_live_…" \
  -H "X-Merchant-Id: mer_xxx"
Then update your settings to map Borga’s VAT categories to the correct codes and set the default GL account:
curl -X POST https://api.borga.is/v1/accounting_link/settings \
  -H "Authorization: Bearer sk_live_…" \
  -H "X-Merchant-Id: mer_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "default_gl_account": "5000",
    "vat_code_mapping": {
      "standard": "VSK24"
    }
  }'
4

Invoices sync automatically

From this point, every new invoice Borga generates is pushed to your accounting provider. Existing invoices are not retroactively synced.If an invoice fails to sync, you can trigger a retry from the Invoices section of the Borga dashboard by selecting the invoice and clicking Retry sync.

Check or disconnect

Retrieve your current accounting link status:
curl https://api.borga.is/v1/accounting_link \
  -H "Authorization: Bearer sk_live_…" \
  -H "X-Merchant-Id: mer_xxx"
To disconnect:
curl -X DELETE https://api.borga.is/v1/accounting_link \
  -H "Authorization: Bearer sk_live_…" \
  -H "X-Merchant-Id: mer_xxx"
AccountingLink is scoped per mode. Your test mode and live mode each have separate accounting connections. Configure them independently in the dashboard.