Regime keys
The catalogue of VeriFactu regime codes BeeL. supports, when each one is required, and how it pairs with exemption_reason.
main_tax.regime_key (AEAT's clave_regimen) declares the tax regime that applies to the operation. Most lines run under the general regime ("01") — that's the default if you don't set anything. The other codes appear in specific scenarios; this page is the canonical catalogue.
For the exemption_reason values referenced here, see Tax classification per line.
The catalogue
These are the values of the RegimeKey enum in the spec. Each is a two-character string. "03", "06" and "14" are in the enum but rejected on a line (see Keys that are not accepted); List tax types only offers the keys that are accepted.
| Code | AEAT name | Where it applies |
|---|---|---|
"01" | Régimen general | Default for every line |
"02" | Exportación | Exports and related operations exempt under arts. 21–22 LIVA (pairs with exemption_reason: EXENTA_ART_21 or EXENTA_ART_22); IVA and IGIC lines, not IPSI |
"03" | Bienes usados, arte, antigüedades, colección | REBU regime — not accepted |
"04" | Oro de inversión | Investment gold regime |
"05" | Agencias de viajes | Travel agencies regime; the PDF carries its mention |
"06" | Grupo de entidades IVA / IGIC | Entity group regime — not accepted |
"07" | Criterio de caja | Cash-basis IVA; the PDF carries its mention |
"08" | Operaciones sujetas a IPSI / IVA o IGIC | An operation subject to another indirect tax (IPSI or IGIC on an IVA line; IPSI or IVA on an IGIC line). Not the general regime of IGIC, which is "01" |
"09" | Facturación de servicios por agencias mediadoras | Mediating agencies (travel) |
"10" | Cobros por cuenta de terceros | Third-party honorarium collection |
"11" | Arrendamiento de local de negocio | Business premises rental |
"14" | IVA pendiente de devengo en certificaciones de obra | Public works certifications — not accepted |
"15" | IVA pendiente de devengo en operaciones de tracto sucesivo | Successive-tract operations |
"17" | OSS / IOSS | EU one-stop-shop for B2C distance sales |
"18" | Recargo de equivalencia | Lines carrying equivalence_surcharge_rate |
"19" | REAGYP / art. 25 Ley 19/1994 | Agriculture, livestock, fishing (or Canarias special regime) |
"20" | Régimen simplificado | Modules / simplified regime |
Where it goes in the request
regime_key lives inside main_tax, not at the line root:
{
"lines": [
{
"description": "...",
"quantity": 1,
"unit_price": 100,
"main_tax": {
"type": "IVA",
"percentage": 21,
"regime_key": "01"
}
}
]
}High-signal cases
"02" — Exports of goods (non-EU)
Mandatory for exports and the operations assimilated to them. Pair it with exemption_reason: EXENTA_ART_21 (E2 — goods leaving the EU) or EXENTA_ART_22 (E3 — operations assimilated to exports, such as international transport). The rule works both ways: regime "02" needs one of those two reasons, and those two reasons cannot go under the general regime "01". Full payload example in International customers > Exports of goods.
"03" — REBU (used goods, art, antiques)
Not accepted: a line with regime_key: "03" is rejected with 422 REGIME_KEY_NOT_SUPPORTED. Under the used-goods regime the invoice must not show the tax separately (RD 1619/2012, art. 16.2.c), and a BeeL. invoice always does. See Keys that are not accepted.
"07" — Cash-basis IVA (criterio de caja)
If you've opted into the cash-basis regime (Art. 163 decies LIVA), every issued invoice carries regime_key: "07". The IVA accrues when payment is received, not when the invoice is issued. The invoice PDF carries the mention «Régimen especial del criterio de caja». A "07" line cannot carry reverse charge or a not-subject reason, and of the exemptions only EXENTA_ART_20 or OTRO.
"17" — OSS / IOSS
For B2C distance sales of goods or services to EU consumers above the 10,000 € annual threshold. The line keeps the destination country's IVA rate — regime_key: "17" widens the accepted rates beyond the Spanish menu, so 19 % (Germany) or 22 % (Italy) are valid here. Do not set percentage: 0, and do not add an exemption_reason: BeeL. classifies the line as N2 from the regime key alone, and any exemption reason would force the rate to 0 % and drop the destination IVA from the breakdown. You still settle it via Modelo 369. Full payload in International customers > B2C OSS.
"18" — Equivalence surcharge
Set on every line that carries equivalence_surcharge_rate. See Equivalence surcharge.
"19" — REAGYP / Canary Islands
Two unrelated cases share this code: REAGYP (the special regime for agriculture, livestock and fishing) and Art. 25 Ley 19/1994 for the Canary Islands Special Zone (Zona Especial Canaria). Pick "19" when either applies; if unsure, talk to your tax advisor.
Keys that are not accepted
A line with one of these keys is rejected with 422 REGIME_KEY_NOT_SUPPORTED when you create, edit or issue the invoice, and so is a default key set to one of them in the tax configuration:
"03"(used goods, art, antiques): under this regime the invoice must not show the tax separately (RD 1619/2012, art. 16.2.c), and a BeeL. invoice always does."06"(group of entities): AEAT requires a cost-based taxable base the invoice does not carry."14"(VAT pending in public works certifications): AEAT requires an operation date after the issue date and a public-administration recipient.
A corrective invoice of an original that already carried one of these keys keeps it.
What AEAT requires with each key
Checked on IVA and IGIC lines when you create, edit or issue the invoice, before it is numbered:
| You send | Error | Status | Why |
|---|---|---|---|
"04" on a line with neither reverse charge (ISP_ART_84_2_*) nor an exemption; "08" without exemption_reason: NO_SUJETA_LOCALIZACION at 0 %; "10" without NO_SUJETA_ART_7_9; "11" with reverse charge; "07" with reverse charge, a not-subject reason or an exemption other than EXENTA_ART_20 / OTRO | REGIME_KEY_CLASSIFICATION_NOT_ACCEPTED | 422 | The line's exemption_reason (or its absence) is not one AEAT accepts with its regime key: 04 needs reverse charge or an exemption; 08 only NO_SUJETA_LOCALIZACION at 0 %; 10 only NO_SUJETA_ART_7_9; 11 no reverse charge; 07 no reverse charge, no not-subject reason and only EXENTA_ART_20 or OTRO as exemptions. |
"11" (IVA) on a subject line at a rate other than 21 % | REGIME_KEY_REQUIRES_VAT_RATE | 422 | A subject IVA line under regime_key 11 carries a rate AEAT does not accept with that key; it only accepts 21 %. |
"10" on a simplified or corrective invoice | REGIME_KEY_REQUIRES_STANDARD_INVOICE | 422 | regime_key 10 is used on an invoice that is not a full (STANDARD) invoice; AEAT rejects it on a simplified or corrective invoice. |
"10" with a recipient identified by an alternative_id instead of a nif | REGIME_KEY_REQUIRES_RECIPIENT_NIF | 422 | regime_key 10 is used with a recipient identified by an alternative_id; AEAT requires a Spanish nif with that key. |
Cross-field validations BeeL. applies
| Combination | Status |
|---|---|
regime_key: "17" with any exemption_reason | ⚠️ Accepted, but it forces the line to 0 % and loses the destination IVA — leave it unset |
regime_key: "02" without exemption_reason EXENTA_ART_21 or EXENTA_ART_22 | ❌ Rejected — REGIME_REQUIRES_INCOMPATIBLE_EXEMPTION: regime 02 needs E2 or E3 |
exemption_reason: EXENTA_ART_21 or EXENTA_ART_22 with regime_key: "01" | ❌ Rejected — EXEMPTION_INCOMPATIBLE_WITH_REGIME: exports use regime 02 |
regime_key: "18" without equivalence_surcharge_rate on the line | ❌ Rejected — REGIME_REQUIRES_SURCHARGE |
equivalence_surcharge_rate on a line whose regime_key is not "18" | ❌ Rejected — SURCHARGE_REQUIRES_REGIME: the surcharge is only compatible with regime 18 |
Related
Tax classification per line
Set `exemption_reason` on each line correctly, with the full mapping from BeeL. API values to AEAT codes (S1/S2/N1/N2/E1–E6).
Equivalence surcharge (recargo de equivalencia)
When to add `equivalence_surcharge_rate` on B2B lines, the surcharge values BeeL. accepts and their periods, and how the line is sent to AEAT.