Definition
A VAT code (also called a tax code or tax rate) is the identifier for a specific tax configuration in an accounting system. It combines a tax rate (e.g. 21%), a tax type (standard, reduced, exempt, reverse charge, etc.) and the ledger accounts used for VAT postings. VAT codes are defined in the accounting software. You retrieve them with the API and reference them by ID when creating invoices or journal entries.Purpose
- Ensure the correct tax treatment is applied to each line.
- Let the accounting software, or Chift, generate the correct VAT ledger entries automatically.
- Provide consistent behavior across connectors, even when the underlying VAT mechanisms differ.
Structure
Each VAT code has:- An identifier (
id): the value to pass astax_codeon invoice and journal entry lines - A short code (
code) and a label (label) - A rate (
rate): the percentage applied to the amount - A type (
type):sale: sales taxpurchase: purchase taxboth: sales and purchasesunknown: the type could not be determined
- A scope (
scope):nat: domestic sales or purchaseseu: cross-border transactions within the EUint: transactions with countries outside the EUunknown: the scope could not be determined
- The ledger accounts for VAT:
deductible_account, typically for purchases, andpayable_account, typically for sales - A reversed flag (
reversed):truefor a reverse-charge code - A withholding tax flag (
withholding_tax):trueif the code can be used for withholding taxes - A country (
country), only when the code is restricted to one country - An active flag (
active): an inactive code cannot be used in entries or invoices
Relationships
- Invoice lines reference a VAT code with
tax_code. - Journal entry lines reference a VAT code with
tax_info.tax_code. See VAT on journal entry lines. - The
deductible_accountandpayable_accountare ledger accounts. - Codes with
reversedset totrueare used for reverse-charge scenarios. See Reversed VAT. - Codes with
withholding_taxset totruecan only be used at invoice header level, not on lines. See Spanish withholding taxes.
API endpoints
- Get VAT codes: list all VAT codes of a folder.