This guide explains how to correctly fill the taxes_attributes array when creating invoices via the API so integrators know which tax names and categories are expected per country.
Important
The percentages shown are B2Brouter defaults to ease integration; tax rates can change. Always validate against the current law of each country.
Tax names must match the expected values in this guide. Do not invent new names (e.g., "Exento", "Umsatzsteuer", "Sales tax").
Many formats reuse comment as the exemption/“not subject” reason. Fill it whenever you set 0%/exempt/reverse-charge unless your account already has the correct default reason.
Use only these fields inside each taxes_attributes object: name (string), category (string, enum), percent (float), comment (string or null). No other keys such as amount, base, type, etc.
Percentages are defaults we expect; laws change. If your business case uses a different rate, send that rate but keep the correct name and category.
For withholdings/retentions, use negativepercent and the appropriate tax name (IRPF, IRNR, IRPEF, etc.).
comment is used as the exemption/“not subject” reason in many formats (Facturae/Verifactu, Peppol categories, etc.). Provide a reason whenever percent is 0 and the operation is exempt/not subject/reverse charge (example: comment: "E2").
Account settings impact calculation: apply_taxes_per_line (boolean) controls whether taxes are applied per line or on the sum; rounding_method controls rounding.
Use the country’s default tax names from the tables below (they match B2Brouter’s default configuration used when a company is created). Keep names/codes even if your rate differs.
For standard VAT, use the main VAT name and category: "S" with the appropriate percent.
For reduced rates, use category: "AA" or category: "AAA" according to the defaults shown.
For zero-rated or exempt operations:
Use percent: 0.
Choose category based on the legal situation:
Z: taxable but 0%.
E: exempt.
AE: reverse charge.
Local codes for specific regimes (Italy N.., Singapore GST categories, etc.).
For withholdings/retentions, use negative percentages (e.g., -19 for Spanish IRPF) and the tax name for the withholding (e.g., IRPF, IRNR, IRPEF).
When integrating with tax reporting (Verifactu, TicketBAI, LHDN, etc.), make sure your taxes_attributes are compatible with the corresponding guide.
Country reference – valid tax names and default rates
The following tables list the expected tax names per country with the default rates and categories we preload. Use them as reference for naming and categories; adjust percent if legislation or your scenario requires it.
Percentages may change over time; always verify with current local legislation. Rates and categories are aligned by position in each row (first rate → first category, etc.).
Spain has several VAT regimes depending on the postal code of the company:
Mainland/Balearic Islands: IVA.
Canary Islands: IGIC.
Ceuta/Melilla: IPSI.
comment is used for the exemption/not-subject reason in Facturae/Verifactu. If you send percent: 0 for an exempt or not-subject operation, add the reason in comment (example: comment: "E2"). If your account already sets the default reason, you can omit it.
For FatturaPA, non‑taxable operations use category codes like N1, N2.1, N2.2, N3.1, N3.2, N3.3, N3.4, N3.5, N3.6, N4, N5, N6.1… (see your FatturaPA configuration). They must be sent as 0% VAT with name: "IVA" and category: "N..".
Recommendation (Italy)
For standard operations: name: "IVA", category: "S", percent: 22.
For non‑taxable operations: name: "IVA", percent: 0, and the appropriate N.. code in category.