NewStripe: a buyer with a NIF always gets a standard invoice, and the simplified threshold is deprecated
BeeL
Get startedMulti-NIFVeriFactuRulesStripeAPI referenceChangelog

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.

CodeAEAT nameWhere it applies
"01"Régimen generalDefault for every line
"02"ExportaciónExports 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ónREBU regime — not accepted
"04"Oro de inversiónInvestment gold regime
"05"Agencias de viajesTravel agencies regime; the PDF carries its mention
"06"Grupo de entidades IVA / IGICEntity group regime — not accepted
"07"Criterio de cajaCash-basis IVA; the PDF carries its mention
"08"Operaciones sujetas a IPSI / IVA o IGICAn 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 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 — not accepted
"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 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 sendErrorStatusWhy
"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 / OTROREGIME_KEY_CLASSIFICATION_NOT_ACCEPTED422The 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_RATE422A 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 invoiceREGIME_KEY_REQUIRES_STANDARD_INVOICE422regime_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 nifREGIME_KEY_REQUIRES_RECIPIENT_NIF422regime_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

CombinationStatus
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