Regime keys (`main_tax.regime_key`)
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 only values BeeL's API accepts (from the RegimeKey enum in the spec). Each is a two-character string.
| Code | Name | Where it applies |
|---|---|---|
"01" | Régimen general | Default for every line |
"02" | Exportación | Exports of goods to non-EU territories (pairs with exemption_reason: EXENTA_ART_21) |
"03" | Bienes usados, arte, antigüedades, colección | REBU regime — base is the margin, not the sale price |
"04" | Oro de inversión | Investment gold regime |
"05" | Agencias de viajes | Travel agencies regime |
"06" | Grupo de entidades IVA / IGIC | Entity group regime |
"07" | Criterio de caja | Cash-basis IVA |
"08" | Operaciones sujetas a IPSI / IVA o IGIC | Mixed-territory operations |
"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 |
"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 when shipping goods outside the EU. Pair with exemption_reason: EXENTA_ART_21. Full payload example in International customers > Exports of goods.
"03" — REBU (used goods, art, antiques)
Margin-only taxation: the base imponible is the margin, the invoice total is the full sale price. BeeL relaxes the usual reconciliation when regime_key is "03".
Sale price: 3 000 € Purchase price: 2 000 € Margin: 1 000 €
Base imponible: 826.45 € Cuota IVA (21 %): 173.55 €
Invoice total: 3 000 €"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 is devengada when payment is received, not when the invoice is issued.
"17" — OSS / IOSS
For B2C distance sales of goods or services to EU consumers above the 10 000 € annual threshold. Pair with exemption_reason: NO_SUJETA_LOCALIZACION and main_tax.percentage: 0 (the destination IVA is settled outside the Spanish IVA breakdown, via Modelo 369). Full payload in International customers > B2C OSS.
"18" — Recargo de equivalencia
Set on every line that carries equivalence_surcharge_rate. See Equivalence surcharge.
"19" — REAGYP / Canarias
Two unrelated cases share this code: REAGYP (régimen especial de la agricultura, ganadería y pesca) and Art. 25 Ley 19/1994 for Canarias zona especial canaria. Pick "19" when either applies; if unsure, talk to your tax advisor.
Cross-field validations BeeL applies
| Combination | Status |
|---|---|
regime_key: "17" without exemption_reason: NO_SUJETA_LOCALIZACION | ❌ Rejected — OSS lines must be marked not-subject |
regime_key: "02" without exemption_reason: EXENTA_ART_21 | ⚠️ Allowed but unusual |
regime_key: "18" without equivalence_surcharge_rate on the line | ❌ Rejected |
regime_key: "03" (REBU) with equivalence_surcharge_rate | ❌ Rejected — REBU forbids the surcharge |
Related
- Tax classification — the
exemption_reasonenum and its AEAT mapping (SSoT) - International customers — B2B/B2C/extracomunitario scenarios with payloads
- Equivalence surcharge — the dedicated guide for
regime_key: "18"
Tax classification per line
Set `exemption_reason` on each line correctly. Includes 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 how the line is sent to AEAT.