Skip to main content

Tax Codes

Tax codes define how taxes are calculated and applied to invoice line items in the billing system. Each tax code contains a rate, validity period, and references to accounting accounts for proper financial posting. The system uses tax codes to automatically calculate tax amounts on invoices based on the configured rate and applies them consistently across all billing operations.

Properties

PropertyTypeDescription
idGUIDUnique identifier
codestringShort code identifier
namestringDisplay name
descriptionstringDetailed description
ratedecimalTax rate percentage (e.g., 19.00)
taxTypestringVAT, Sales Tax, or Exempt
taxAccountIdGUIDAccount for tax posting
revenueAccountIdGUIDAccount for revenue posting
validFromdateEffective start date
validTodateExpiration date (optional)
isActivebooleanActive status

API Endpoints

GET /tax-codes
GET /tax-codes/{id}

Response Example

{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"code": "VAT19",
"name": "Standard VAT 19%",
"description": "Standard value-added tax rate",
"rate": 19.00,
"taxType": "VAT",
"taxAccountId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"revenueAccountId": "8d7f9e8a-8536-41fe-a53c-3d874bf2c9d1",
"validFrom": "2024-01-01T00:00:00Z",
"validTo": null,
"isActive": true
}

Usage in Invoices

When an invoice line item is created, the tax code determines how tax is calculated and posted. The system copies the tax rate to the line item as a snapshot, ensuring historical accuracy even if the tax code changes later. Tax amounts are calculated using the formula: netAmount × (taxRate / 100). The tax account specified in the tax code is used for journal posting when the invoice is finalized.