Skip to main content
Accounting Link connects your Borga account to your accounting software so that invoices, credit notes, and payments sync automatically. Borga supports both OAuth-based providers (which redirect users through an authorization flow) and form-based providers (where you supply credentials directly). Once connected, you can map VAT codes and GL accounts to control how transactions are posted.
For a step-by-step walkthrough of setting up an accounting integration, see the Accounting Link setup guide.

List providers

GET /v1/accounting_link/providers Returns a list of available accounting providers and their connection methods.

Response fields

object[]
required
Array of provider objects.

Start a connection

POST /v1/accounting_link/connect Initiates a connection to an accounting provider. For OAuth providers, the response includes a redirect_url — send the user there to authorize the connection. For form-based providers, use complete a connection instead.

Request parameters

string
required
The provider ID to connect to (e.g. xero, quickbooks).
string
The mode to connect in. One of test or live. Defaults to live.

Response fields

string
The OAuth authorization URL to redirect the user to. Present for OAuth providers only.

Complete a connection

POST /v1/accounting_link/complete Completes a form-based provider connection by submitting credentials directly. Not applicable to OAuth providers.

Request parameters

string
required
The provider ID to connect to.
object
required
Provider-specific credential fields. Refer to your accounting provider’s API documentation for the required fields.

Response fields

Returns the created AccountingLink object. See get current link for the full field reference.

OAuth callback

GET /v1/accounting_link/callback/{provider} OAuth providers redirect to this endpoint after the user authorizes access. Borga handles the token exchange automatically — you do not need to call this endpoint directly. It is documented here for reference if you need to configure a redirect URI in your OAuth provider’s settings.

Path parameters

string
required
The provider completing the OAuth flow (e.g. xero).

GET /v1/accounting_link Returns the current accounting provider connection for your merchant account.

Response fields

string
required
Unique accounting link identifier.
string
required
Connected provider ID.
string
required
Connection status. One of active, disconnected, or error.
string
required
Connection mode: test or live.
string
required
ISO 8601 timestamp of when the connection was established.

Disconnect

DELETE /v1/accounting_link Disconnects the current accounting provider. Borga will stop syncing invoices and payments immediately. Existing records in your accounting software are not affected.

Response fields

Returns an empty body with a 204 No Content status on success.

Get chart of accounts

GET /v1/accounting_link/chart_of_accounts Returns the chart of accounts from your connected accounting provider. Use the GL account codes returned here when configuring default accounts in update settings.

Response fields

object[]
required
Array of GL account objects from your accounting provider.

Get VAT codes

GET /v1/accounting_link/vat_codes Returns the VAT codes available in your connected accounting provider. Use these when configuring VAT mappings in update settings.

Response fields

object[]
required
Array of VAT code objects.

Update settings

POST /v1/accounting_link/settings Updates the accounting sync configuration for your connection. Use this to map VAT codes from Borga to your provider, and to set the default GL account for revenue posting.

Request parameters

string
GL account code to use as the default revenue account when posting invoices.
object
A map of Borga VAT rate identifiers to provider VAT code strings. For example, { "standard": "IS24", "reduced": "IS11" }.

Response fields

string
The configured default GL account code.
object
The configured VAT code mapping.