Factuarea APIDevelopers

tax_rate_mismatch

The line chooses a tax by id (`tax_rate_id`, `retention_rate_id` or `surcharge_rate_id`) and contradicts it: it declares a `tax_rate`, `retention_rate` or `surcharge_rate` different from that tax's rate, or the tax is of another class than its field (for example a withholding tax in `surcharge_rate_id`). The chosen VAT tax also qualifies the line (regime, AEAT qualification and exemption reason), so both values must match.

CodeTypeHTTPCategory
tax_rate_mismatchinvalid_request_error422Invoices

Cause

The line chooses a tax by id (tax_rate_id, retention_rate_id or surcharge_rate_id) and contradicts it: it declares a tax_rate, retention_rate or surcharge_rate different from that tax's rate, or the tax is of another class than its field (for example a withholding tax in surcharge_rate_id). The chosen VAT tax also qualifies the line (regime, AEAT qualification and exemption reason), so both values must match.

What to do

Send only the id (the percentage comes from the tax) or a percentage equal to the tax's rate, and put each tax in the field of its class. error.param names the field (lines.N.tax_rate, lines.N.retention_rate or lines.N.surcharge_rate) and error.line_index the line.

On this page

Need a hand?Contact support