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.

CodeNameWhere it applies
"01"Régimen generalDefault for every line
"02"ExportaciónExports of goods to non-EU territories (pairs with exemption_reason: EXENTA_ART_21)
"03"Bienes usados, arte, antigüedades, colecciónREBU regime — base is the margin, not the sale price
"04"Oro de inversiónInvestment gold regime
"05"Agencias de viajesTravel agencies regime
"06"Grupo de entidades IVA / IGICEntity group regime
"07"Criterio de cajaCash-basis IVA
"08"Operaciones sujetas a IPSI / IVA o IGICMixed-territory operations
"09"Facturación de servicios por agencias mediadorasMediating agencies (travel)
"10"Cobros por cuenta de tercerosThird-party honorarium collection
"11"Arrendamiento de local de negocioBusiness premises rental
"14"IVA pendiente de devengo en certificaciones de obraPublic works certifications
"15"IVA pendiente de devengo en operaciones de tracto sucesivoSuccessive-tract operations
"17"OSS / IOSSEU one-stop-shop for B2C distance sales
"18"Recargo de equivalenciaLines carrying equivalence_surcharge_rate
"19"REAGYP / art. 25 Ley 19/1994Agriculture, livestock, fishing (or Canarias special regime)
"20"Régimen simplificadoModules / 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

CombinationStatus
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