Skip to main content

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 as tax_code on 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 tax
    • purchase: purchase tax
    • both: sales and purchases
    • unknown: the type could not be determined
  • A scope (scope):
    • nat: domestic sales or purchases
    • eu: cross-border transactions within the EU
    • int: transactions with countries outside the EU
    • unknown: the scope could not be determined
  • The ledger accounts for VAT: deductible_account, typically for purchases, and payable_account, typically for sales
  • A reversed flag (reversed): true for a reverse-charge code
  • A withholding tax flag (withholding_tax): true if 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_account and payable_account are ledger accounts.
  • Codes with reversed set to true are used for reverse-charge scenarios. See Reversed VAT.
  • Codes with withholding_tax set to true can only be used at invoice header level, not on lines. See Spanish withholding taxes.
  • Companies without VAT: for some connectors, Chift returns one virtual VAT code, CHIFT_VAT_FREE_CODE, when the company has no usable VAT setup. This code does not exist in the accounting software. It has a rate of 0 and the type both.

API endpoints