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.
| Valor | Descripción |
|---|
F1 | Factura (art. 6, 7.2 y 7.3 del RD 1619/2012). Factura completa ordinaria. |
F2 | Factura Simplificada y facturas sin identificación del destinatario (art. 6.1.d) RD 1619/2012). |
F3 | Factura emitida en sustitución de facturas simplificadas facturadas y declaradas. |
R1 | Factura Rectificativa — error fundado en derecho y art. 80 Uno, Dos y Seis LIVA. |
R2 | Factura Rectificativa — art. 80.3 (concurso de acreedores del destinatario). |
R3 | Factura Rectificativa — art. 80.4 (créditos total o parcialmente incobrables). |
R4 | Factura Rectificativa (resto de supuestos no incluidos en R1–R3). |
R5 | Factura Rectificativa en facturas simplificadas. |
var invoice = new Invoice("FACT-001", new DateTime(2024, 10, 14), "B72877814")
{
InvoiceType = TipoFactura.F1
};
For corrective invoices (R1–R5), 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.
| Valor | Descripción |
|---|
NA | No asignada. Valor por defecto para facturas que no son rectificativas (F1, F2, F3). |
S | Por sustitución — la factura rectificativa reemplaza completamente la original. |
I | Por 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.
| Valor | Código XML | Descripción |
|---|
RegimenGeneral | 01 | Operación de régimen general. |
Exportacion | 02 | Exportación. |
Rebu | 03 | Régimen especial de bienes usados, objetos de arte, antigüedades y objetos de colección. |
OroInversion | 04 | Régimen especial del oro de inversión. |
AgenciasViajes | 05 | Régimen especial de las agencias de viajes. |
GrupoEntidades | 06 | Régimen especial grupo de entidades en IVA/IGIC (Nivel Avanzado). |
Recc | 07 | Régimen especial del criterio de caja (RECC). |
IpsiIgic | 08 | L8A: Operaciones sujetas al IPSI/IGIC. L8B: Operaciones sujetas al IPSI/IVA. |
MediadoresAgenciasViaje | 09 | Prestaciones de servicios de agencias de viaje que actúan como mediadoras en nombre y por cuenta ajena (D.A. 4ª RD 1619/2012). |
CobroTerceros | 10 | Cobros por cuenta de terceros de honorarios profesionales o derechos de propiedad intelectual/industrial efectuados por colegios profesionales u otras entidades. |
ArrendamientoLocalNecocio | 11 | Operaciones de arrendamiento de local de negocio. |
ArrendamientoLocalNecocioNoRetencion | 12 | ⚠️ Obsoleto. Solo para compatibilidad con SII. No usar en VERI*FACTU. |
ObraPteDevengoAdmonPublica | 14 | L8A: Factura con IVA pendiente de devengo en certificaciones de obra cuyo destinatario sea una Administración Pública. L8B: Ídem con IGIC. |
TractoSucesivoPteDevengo | 15 | L8A: Factura con IVA pendiente de devengo en operaciones de tracto sucesivo. L8B: Ídem con IGIC. |
IossRegEspMin | 17 | L8A: OSS e IOSS IVA. L8B: Régimen especial de comerciante minorista. |
RecEquivPeqEmp | 18 | L8A: Recargo de equivalencia. L8B: Régimen especial del pequeño empresario o profesional. |
RegimenEspecialAgriculturaArt25Ley19_1994 | 19 | L8A: 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. |
RegimenSimplificado | 20 | L8A: Régimen simplificado (solo IVA). L8B: Operaciones sujetas al IPSI. |
RegimenSimplificadoIpsi | 21 | L8B: 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.
| Valor | Descripción |
|---|
S1 | Operación sujeta y no exenta — sin inversión del sujeto pasivo. Caso general de IVA repercutido. |
S2 | Operación sujeta y no exenta — con inversión del sujeto pasivo (ISP). El destinatario liquida el IVA. |
N1 | Operación no sujeta — al amparo del art. 7, art. 14, u otros preceptos de no sujeción. |
N2 | Operació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).
| Valor | Descripción |
|---|
NA | No asignada. Valor por defecto cuando la operación no está exenta. |
E1 | Exenta por el art. 20 LIVA — Exenciones en operaciones interiores. |
E2 | Exenta por el art. 21 LIVA — Exportaciones de bienes. |
E3 | Exenta por el art. 22 LIVA — Operaciones asimiladas a las exportaciones (navegación marítima internacional, aeronaves, etc.). |
E4 | Exenta por los arts. 23 y 24 LIVA — Exenciones relativas a regímenes aduaneros y fiscales (depósitos aduaneros, zonas francas, etc.). |
E5 | Exenta por el art. 25 LIVA — Entregas de bienes destinadas a otro Estado miembro de la UE (operaciones intracomunitarias). |
E6 | Exenta por otros preceptos no listados anteriormente. |
E7 | Reservado para Impuesto = "03" (IGIC) — Causa de exención reservada 1. |
E8 | Reservado 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.
| Valor | Descripción |
|---|
D | Destinatario — la factura ha sido emitida por el propio destinatario (autofactura). |
T | Tercero — 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.
| Valor | Código XML | Descripción |
|---|
IVA | 01 | Impuesto sobre el Valor Añadido. Aplicable en Península y Baleares. |
IPSI | 02 | Impuesto sobre la Producción, los Servicios y la Importación. Aplicable en Ceuta y Melilla. |
IGIC | 03 | Impuesto General Indirecto Canario. Aplicable en Canarias. |
OTROS | 05 | Otros 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.
| Valor | Código XML | Descripción |
|---|
NIF_IVA | 02 | Número de identificación fiscal a efectos del IVA (NIF-IVA) — número de operador intracomunitario. |
PASAPORTE | 03 | Pasaporte. |
DOCUMENTO_OFICIAL | 04 | Documento oficial de identificación expedido por el país o territorio de residencia. |
CERTIFICADO_RESIDENCIA | 05 | Certificado de residencia. |
OTRO_DOC_PROBATORIO | 06 | Otro documento probatorio. |
NO_CENSADO | 07 | No 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.