tax_info object provides a unified, connector-agnostic way to record tax details directly on journal entry lines. Using tax_info eliminates the need for separate VAT lines and ensures consistent behavior across all accounting systems.
It also supports “VAT per line” where available. “VAT per line” refers to recording VAT directly on each journal entry line instead of as a separate line. This approach aligns with the system’s expected handling of VAT and enables users to fully leverage built-in VAT reporting and declaration features.
The object presented here allows you to book VAT in a single, consistent way. On our side, we take care of posting the VAT according to the “VAT per line” approach, or alternatively generating separate VAT lines when needed, using the information provided in the object.
tax_info Structure
Each journal entry line can include tax_info:
Field Definitions
| Field | Required | Description |
|---|---|---|
| tax_code | Yes | Identifier of the tax rate. Used to map the correct VAT rate for the line. |
| description | No | Optional text describing the tax. Useful for reports or bookkeeping notes. |
| tax_amount | Yes | The amount of VAT for this line. Always positive, sign follows the line (debit/credit). |
| vat_account | Yes | Ledger account for VAT. Must be provided even if the target connector ignores it; placeholder values are accepted. |
| reversed_vat_account | No | Optional, account to record reversed VAT when applicable |
Key Takeaways
- **Attach **
tax_infoto each VAT-relevant line
Include the tax details directly in the line item of your journal entry payload. - Provide a VAT account
Even if your target connector does not use VAT accounts, include a placeholder for cross-connector consistency. - Handle reversed VAT if needed
Includereversed_vat_accountwhen reversed VAT applies. - Fallback logic
If a connector does not fully supporttax_info, the legacytax_codemechanism is used automatically. - **Never create separate VAT lines if using **
tax_info
tax_infoensures the tax is recorded directly on the line.