Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/mdiago/VeriFactu/llms.txt

Use this file to discover all available pages before exploring further.

VeriFactu uses a set of enumerations that correspond directly to the lookup tables (listas) defined in the AEAT VERI*FACTU technical specification. These enumerations are used across Invoice, TaxItem, and related classes to specify invoice types, tax regimes, operation qualifications, exemption causes, and issuer identification. Using the correct enum value ensures that the serialized XML conforms exactly to what the AEAT web service expects.

TipoFactura (L2)

Namespace: VeriFactu.Xml.Factu.Alta Identifies the type of invoice being submitted. Set via Invoice.InvoiceType.
ValorDescripción
F1Factura (art. 6, 7.2 y 7.3 del RD 1619/2012). Factura completa ordinaria.
F2Factura Simplificada y facturas sin identificación del destinatario (art. 6.1.d) RD 1619/2012).
F3Factura emitida en sustitución de facturas simplificadas facturadas y declaradas.
R1Factura Rectificativa — error fundado en derecho y art. 80 Uno, Dos y Seis LIVA.
R2Factura Rectificativa — art. 80.3 (concurso de acreedores del destinatario).
R3Factura Rectificativa — art. 80.4 (créditos total o parcialmente incobrables).
R4Factura Rectificativa (resto de supuestos no incluidos en R1–R3).
R5Factura Rectificativa en facturas simplificadas.
var invoice = new Invoice("FACT-001", new DateTime(2024, 10, 14), "B72877814")
{
    InvoiceType = TipoFactura.F1
};
For corrective invoices (R1R5), you must also set TipoRectificativa and populate RectificationItems with references to the original invoices being corrected.

TipoRectificativa (L3)

Namespace: VeriFactu.Xml.Factu.Alta Specifies whether a rectification invoice corrects by full substitution or by recording only the difference.
ValorDescripción
NANo asignada. Valor por defecto para facturas que no son rectificativas (F1, F2, F3).
SPor sustitución — la factura rectificativa reemplaza completamente la original.
IPor diferencias — la factura rectificativa registra únicamente la diferencia con respecto a la original.
var invoice = new Invoice("RECT-001", new DateTime(2024, 10, 20), "B72877814")
{
    InvoiceType = TipoFactura.R1,
    RectificationType = TipoRectificativa.S
};

ClaveRegimen (L8A / L8B)

Namespace: VeriFactu.Xml.Factu.Alta Identifies the VAT/IGIC regime or the special tax treatment applicable to the operation. Used in TaxItem.TaxScheme. L8A applies to IVA operations; L8B applies to IGIC operations — where the two lists differ, this is noted in the description.
ValorCódigo XMLDescripción
RegimenGeneral01Operación de régimen general.
Exportacion02Exportación.
Rebu03Régimen especial de bienes usados, objetos de arte, antigüedades y objetos de colección.
OroInversion04Régimen especial del oro de inversión.
AgenciasViajes05Régimen especial de las agencias de viajes.
GrupoEntidades06Régimen especial grupo de entidades en IVA/IGIC (Nivel Avanzado).
Recc07Régimen especial del criterio de caja (RECC).
IpsiIgic08L8A: Operaciones sujetas al IPSI/IGIC. L8B: Operaciones sujetas al IPSI/IVA.
MediadoresAgenciasViaje09Prestaciones de servicios de agencias de viaje que actúan como mediadoras en nombre y por cuenta ajena (D.A. 4ª RD 1619/2012).
CobroTerceros10Cobros por cuenta de terceros de honorarios profesionales o derechos de propiedad intelectual/industrial efectuados por colegios profesionales u otras entidades.
ArrendamientoLocalNecocio11Operaciones de arrendamiento de local de negocio.
ArrendamientoLocalNecocioNoRetencion12⚠️ Obsoleto. Solo para compatibilidad con SII. No usar en VERI*FACTU.
ObraPteDevengoAdmonPublica14L8A: Factura con IVA pendiente de devengo en certificaciones de obra cuyo destinatario sea una Administración Pública. L8B: Ídem con IGIC.
TractoSucesivoPteDevengo15L8A: Factura con IVA pendiente de devengo en operaciones de tracto sucesivo. L8B: Ídem con IGIC.
IossRegEspMin17L8A: OSS e IOSS IVA. L8B: Régimen especial de comerciante minorista.
RecEquivPeqEmp18L8A: Recargo de equivalencia. L8B: Régimen especial del pequeño empresario o profesional.
RegimenEspecialAgriculturaArt25Ley19_199419L8A: Operaciones incluidas en el Régimen Especial de Agricultura, Ganadería y Pesca (REAGYP). L8B: Operaciones interiores exentas por aplicación del art. 25 Ley 19/1994.
RegimenSimplificado20L8A: Régimen simplificado (solo IVA). L8B: Operaciones sujetas al IPSI.
RegimenSimplificadoIpsi21L8B: Régimen simplificado IPSI.
var taxItem = new TaxItem()
{
    TaxScheme = ClaveRegimen.RegimenGeneral,
    TaxType = CalificacionOperacion.S1,
    TaxRate = 21,
    TaxBase = 1000,
    TaxAmount = 210
};

CalificacionOperacion (L9)

Namespace: VeriFactu.Xml.Factu.Alta Qualifies whether the operation is subject to tax and, if so, whether reverse charge (inversión del sujeto pasivo) applies. Used in TaxItem.TaxType.
ValorDescripción
S1Operación sujeta y no exenta — sin inversión del sujeto pasivo. Caso general de IVA repercutido.
S2Operación sujeta y no exenta — con inversión del sujeto pasivo (ISP). El destinatario liquida el IVA.
N1Operación no sujeta — al amparo del art. 7, art. 14, u otros preceptos de no sujeción.
N2Operación no sujeta — por reglas de localización (la operación no se entiende realizada en el territorio de aplicación del impuesto).

CausaExencion (L10)

Namespace: VeriFactu.Xml.Factu.Alta Specifies the legal basis for a VAT/IGIC exemption when the operation is exempt. Used in TaxItem.ExemptionCause. Only applicable when CalificacionOperacion is not set (i.e., the line is treated as exempt rather than subject).
ValorDescripción
NANo asignada. Valor por defecto cuando la operación no está exenta.
E1Exenta por el art. 20 LIVA — Exenciones en operaciones interiores.
E2Exenta por el art. 21 LIVA — Exportaciones de bienes.
E3Exenta por el art. 22 LIVA — Operaciones asimiladas a las exportaciones (navegación marítima internacional, aeronaves, etc.).
E4Exenta por los arts. 23 y 24 LIVA — Exenciones relativas a regímenes aduaneros y fiscales (depósitos aduaneros, zonas francas, etc.).
E5Exenta por el art. 25 LIVA — Entregas de bienes destinadas a otro Estado miembro de la UE (operaciones intracomunitarias).
E6Exenta por otros preceptos no listados anteriormente.
E7Reservado para Impuesto = "03" (IGIC) — Causa de exención reservada 1.
E8Reservado para Impuesto = "03" (IGIC) — Causa de exención reservada 2.
var taxItem = new TaxItem()
{
    TaxScheme = ClaveRegimen.Exportacion,
    ExemptionCause = CausaExencion.E2,
    TaxBase = 5000
};

EmitidaPorTerceroODestinatario (L6)

Namespace: VeriFactu.Xml.Factu.Alta Indicates whether the invoice was issued by a third party or by the buyer themselves (self-invoicing / autofactura). Leave unset for the standard case where the seller issues the invoice directly.
ValorDescripción
DDestinatario — la factura ha sido emitida por el propio destinatario (autofactura).
TTercero — la factura ha sido emitida por un tercero en nombre del emisor.

Impuesto (L1)

Namespace: VeriFactu.Xml.Factu Identifies the tax type applicable to an invoice operation. Used internally when specifying desglose (breakdown) entries and in TaxItem.
ValorCódigo XMLDescripción
IVA01Impuesto sobre el Valor Añadido. Aplicable en Península y Baleares.
IPSI02Impuesto sobre la Producción, los Servicios y la Importación. Aplicable en Ceuta y Melilla.
IGIC03Impuesto General Indirecto Canario. Aplicable en Canarias.
OTROS05Otros impuestos.

IDType (L7)

Namespace: VeriFactu.Xml.Factu Specifies the type of identification document used for the buyer’s (BuyerID) identifier when the buyer does not have a Spanish NIF. Only required for foreign buyers.
ValorCódigo XMLDescripción
NIF_IVA02Número de identificación fiscal a efectos del IVA (NIF-IVA) — número de operador intracomunitario.
PASAPORTE03Pasaporte.
DOCUMENTO_OFICIAL04Documento oficial de identificación expedido por el país o territorio de residencia.
CERTIFICADO_RESIDENCIA05Certificado de residencia.
OTRO_DOC_PROBATORIO06Otro documento probatorio.
NO_CENSADO07No censado — el destinatario no dispone de número de identificación fiscal.
var invoice = new Invoice("EXP-001", new DateTime(2024, 10, 14), "B72877814")
{
    BuyerID = "FR12345678901",
    BuyerIDType = IDType.NIF_IVA,
    BuyerCountry = CodigoPais.FR
};

The [XmlEnum] attribute on each enum member controls the exact string value serialized into the VERI*FACTU XML payload. VeriFactu handles this mapping automatically — you only need to reference the C# enum member name in your code.

Build docs developers (and LLMs) love