Territorial taxes — VAT, IGIC and IPSI
Spain has three indirect taxes, not one. Which rates are legal in each, how the regime is chosen per document, what the AEAT breakdown declares, and why IGIC and IPSI never appear in the quarterly VAT return.
Mainland Spain and the Balearic Islands charge VAT. The Canary Islands charge IGIC. Ceuta and Melilla charge IPSI. They are three different taxes with three different rate grids, three different AEAT codes and three different administrations — and treating them as one is how a Canary Islands company ends up over-declaring its VAT.
When this applies
The applicable regime derives from the AEAT zone of the issuing company:
mainland → VAT, Canary Islands → IGIC, Ceuta and Melilla → IPSI
(BR-TAX-020, art. 1.3 RRSIF).
Derivation is the fallback, not the whole story. Since operations can be
located somewhere other than where the issuer is established, a document may
override the regime explicitly (BR-TAX-027) — see
Choosing the regime.
The three rate grids
Each regime has a closed grid of legal rates and a general rate
(BR-TAX-020):
| Regime | AEAT code | Legal rates | General rate |
|---|---|---|---|
| VAT | 01 | 0, 4, 10, 21 | 21% |
| IPSI | 02 | 0, 0.5, 1, 2, 4, 8, 10 | 8% |
| IGIC | 03 | 0, 3, 5, 7, 9.5, 15, 20 | 7% |
0% is valid in all three — it represents the exempt operation.
Note the AEAT codes: IPSI is 02 and IGIC is 03, not the other way
round. An earlier internal value object had them inverted; emitting the wrong
one produces a rejection or a wrong declaration.
The grid is enforced when creating or editing an IGIC or IPSI tax: a rate
outside its regime's grid answers 422 listing the legal rates
(BR-TAX-021). Moving an existing tax to another zone
re-validates its rate against the new regime, so a 21% tax cannot be relabelled
as Canary Islands without changing the rate first.
VAT is deliberately not narrowed this way. The seeded catalogue contains historical and transitional rates — 2%, 5%, 7.5% from the anti-inflation measures — that do not belong to a closed grid, and rejecting them would break existing data.
What the API sends
Finding the right taxes
GET /v1/taxes accepts both
country_aeat_zone (peninsula, canarias, ceuta, melilla) and the derived
indirect_tax_regime (iva, igic, ipsi). The two are equivalent views of the
same dimension: ?indirect_tax_regime=igic matches ?country_aeat_zone=canarias
(BR-TAX-026).
curl "https://api.factuarea.com/v1/taxes?indirect_tax_regime=igic" \
-H "Authorization: Bearer fact_live_3pXnR2VbY7TcA9eFmN5z8KqW"Each tax exposes its indirect_tax_regime, derived read-only from its zone, and
linked_surcharge_taxes_id, the equivalence surcharge legally paired with it.
An unknown regime in the filter degenerates to an empty list — it never invents
results. Taxes that are not consumption taxes — withholdings, surcharges — carry
a null regime.
Choosing the regime for a document
lines[].indirect_tax_regime accepts iva, igic or ipsi on
POST /v1/invoices and
PUT /v1/invoices/{id}.
Precedence is override over zone (BR-TAX-027):
A valid override wins over the regime derived from the tax's zone.
No override → the regime is derived from the zone, the historical behaviour.
Neither a resolvable tax nor an override → the snapshot stays empty. Nothing is inferred.
Two guards apply, both 422:
- A value outside
iva|igic|ipsiis rejected as a domain invariant, not just a form-level one — the same answer whichever surface sends it. - All lines of a document must share the same regime. The override is
document-wide, not per line; mixing two regimes answers
422with a business-rule violation. Lines with no regime are ignored by the check, so a document combining explicitigiclines with untyped lines is homogeneous.
{
"lines": [
{ "description": "Servicio prestado en Canarias", "quantity": 1, "unit_price": 100, "indirect_tax_regime": "igic" },
{ "description": "Materiales", "quantity": 2, "unit_price": 50, "indirect_tax_regime": "igic" }
]
}The chosen regime is part of the line's immutable fiscal snapshot, so it
survives conversion: a quote or pro-forma converted into an invoice inherits
the regime that was chosen, rather than recomputing it from today's company zone
(BR-TAX-023). The companion field aeat_tax_code is always
derived from the tax and is never overridable; an incoming value is ignored.
What appears on the PDF
The tax column and the totals block show the rates that were actually applied, so
an IGIC invoice prints IGIC rates. The regime name itself is not a separate
printed element; it is visible through the rates and, when the document carries
one, the legal mention of its exemption cause
(BR-TAX-024).
Because the snapshot is immutable, a company that later moves its registered address does not retroactively change the documents it has already issued.
What reaches the AEAT
In the VeriFactu record, the Impuesto field of each breakdown group is
derived from the line's regime — 01 for VAT, 02 for IPSI, 03 for IGIC — and
is never hardcoded (BR-VFC-034). A mixed invoice produces one
breakdown group per (rate, regime) pair, and the fingerprint seals the set.
Historical lines with no regime snapshot keep 01, so the XML of invoices
already declared is not altered.
The regime key travels differently: under IPSI it is not emitted at all, and under VAT and IGIC it is derived rather than hardcoded — see Regime keys.
In the quarterly VAT return, the rule is absolute:
POST /v1/tax_reports/303
aggregates only lines whose regime is VAT (BR-TXR-039,
BR-TXR-020):
- Output tax. A line of any other regime is skipped. It never reaches a VAT box.
- Input tax. The base and quota of non-VAT lines are subtracted from the invoice total, so a purely VAT purchase keeps exactly its previous amount, and a mixed purchase contributes only its VAT part. IGIC and IPSI borne are not deductible in this return — they are different taxes.
IGIC is settled with the Canary Islands tax agency; IPSI with the local administration of Ceuta or Melilla. Neither has anything to do with the state VAT return.
Snapshot lines are grouped by the composite key (regime, rate) rather than by
rate alone, which is what prevents an IPSI line at 10% from merging with a VAT
line at 10% (BR-TXR-038). Among VAT lines, every rate present
is emitted — including 2%, 5% and 7.5% — so nothing is lost from the AEAT file
because it falls outside the usual three.
The territorial notice is a warning, never a block
A company in a special territory that generates its VAT return receives a
Spanish-language warning in the warnings list, naming the administration
before which the indirect tax is settled. The file is still produced, with the
VAT part only (BR-TXR-040).
It is deliberately not a 422. A Canary Islands company can have perfectly
legitimate VAT — sales to the mainland, for instance — and blocking would deny it
a valid return. The warning appears only when the zone is special and the
period actually contains indirect-tax operations, and it accumulates with the
other fiscal-quality warnings.
The annual third-party operations return (Modelo 347) behaves differently: it does include IGIC and IPSI operations at their total amount including tax, because it is agnostic to which indirect tax applies. See Disbursements for what changes its base.
Traceability
Derived from the domain rules of the Factuarea backend:
BR-TAX-020— the indirect tax regime as a value object derived from the AEAT zone, its legal rate grids and its AEAT codes.BR-TAX-021— rate-grid enforcement when creating or editing an IGIC or IPSI tax, and why VAT is not narrowed.BR-TAX-023— the immutable per-line fiscal snapshot.BR-TAX-024— the document-level exemption cause and its legal mention.BR-TAX-026— catalogue filtering by zone and regime, and the exposed linked surcharge.BR-TAX-027— the per-document regime override, its precedence, its two422guards and its survival through conversion.BR-VFC-034— the breakdownImpuestoderived per line, never hardcoded.BR-TXR-020— the VAT return aggregates only VAT lines, and loses no VAT rate.BR-TXR-038— the snapshot groups by (regime, rate).BR-TXR-039— exclusion of IGIC and IPSI from both output and input VAT.BR-TXR-040— the territorial warning that never blocks generation.