VATGroups Best Practice
When working with the Billit API, it is important that invoice totals remain identical between your ERP and Billit. Without VATGroups, Billit calculates VAT totals using its own calculation method. While this ensures consistency within Billit, ERP systems often use their own VAT calculation and rounding logic. This can result in small differences between the totals calculated by your ERP and the totals calculated by Billit. To avoid these differences, we recommend using VATGroups.
Why Use VATGroups
VATGroups allow you to explicitly provide the VAT totals that were calculated by your ERP.
By providing these values, Billit will use the VAT amounts supplied in the invoice instead of recalculating them.
Advantages of using VATGroups:
- Invoice totals remain identical between your ERP and Billit.
- Your ERP's VAT calculations are preserved.
- Rounding differences are minimized.
- Financial data remains consistent across systems.
How VATGroups Work
For every VAT percentage used on an invoice, provide a VAT group containing:
- The VAT percentage.
- The total taxable amount (VAT exclusive).
- The total VAT amount.
- The total amount including VAT.
Example:
"VatGroups": [
{
"VATPercentage": 20.0,
"VentilationCode": "4",
"TotalExcl": 11.32,
"TotalVAT": 2.27,
"TotalIncl": 13.59
},
{
"VATPercentage": 10.0,
"VentilationCode": "4",
"TotalExcl": 11.32,
"TotalVAT": 1.13,
"TotalIncl": 12.45
}
]Billit will use the provided VAT group totals when calculating the invoice totals.
Recommended Approach
✅ Provide VATGroups whenever possible.
For each VAT rate used on the invoice:
- Calculate the taxable amount in your ERP.
- Calculate the VAT amount according to your ERP logic.
- Calculate the VAT-inclusive amount.
- Provide those values in the corresponding VATGroup.
This ensures the totals stored in Billit remain aligned with the totals generated by your ERP.
Order Line Best Practice
Many ERP systems store unit prices with a higher precision than what is eventually shown on the invoice.
A common ERP approach is:
Quantity = 3
UnitPriceExcl = 3.333333
Calculated TotalExcl = 9.999999
Stored TotalExcl = 10.00Because the line total is rounded before export, small differences may be introduced when invoice totals and VAT amounts are calculated later on.
When sending invoices to Billit, it is recommended that order lines remain mathematically consistent:
TotalExcl = UnitPriceExcl × QuantityIn other words, the line total should be derived from the original unit price and quantity rather than from an already rounded ERP value.
Recommended Example
"OrderLines": [
{
"Quantity": 1.0,
"UnitPriceExcl": 11.325,
"Reference": "P001207",
"Description": "Test Product",
"TotalExcl": 11.325,
"VATPercentage": 20.0,
"VentilationCode": "4",
"Unit": "pcs",
"TotalIncl": 13.59,
"ReductionPercentage": 0.0
}
]In this example:
11.325 × 1 = 11.325The values remain mathematically consistent and Billit can correctly process the invoice totals.
Common ERP Behaviour
Many ERP systems calculate and store line totals as:
TotalExcl = Round(UnitPriceExcl × Quantity, 2)For Billit, we recommend using:
TotalExcl = UnitPriceExcl × Quantityusing the original precision available in your ERP.
This helps ensure that order line totals, VAT groups and invoice totals remain aligned.
Combining VATGroups and Order Lines
The best results are achieved when:
- VATGroups are used to provide the VAT totals calculated by your ERP.
- Order lines remain mathematically consistent.
- Unit prices retain their original precision.
- TotalExcl values are based on
UnitPriceExcl × Quantity.
By combining both approaches, Billit can accurately represent the invoice while keeping totals synchronized with your ERP.
Conclusion
For the most accurate integration with the Billit API:
- Use VATGroups whenever possible.
- Let VATGroups define the VAT totals calculated by your ERP.
- Keep order line values mathematically consistent.
- Ensure that
TotalExcl = UnitPriceExcl × Quantity. - Avoid sending prematurely rounded line totals when more precise values are available.
Following these recommendations minimizes rounding differences and helps keep invoice totals identical between your ERP and Billit.
Updated about 10 hours ago