Verifactu-PHP uses PHP 8.1 backed string enums for all fixed-value fields required by the AEAT specification. Each enum case carries the exact string that is written into the XML payload — you never need to handle raw strings manually. All enums live in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/josemmo/Verifactu-PHP/llms.txt
Use this file to discover all available pages before exploring further.
josemmo\Verifactu\Models\Records namespace.
InvoiceType — josemmo\Verifactu\Models\Records\InvoiceType
InvoiceType — josemmo\Verifactu\Models\Records\InvoiceType
InvoiceType classifies the invoice being reported (<TipoFactura>). The value determines which validation rules apply — for example, recipient requirements and whether corrective details are mandatory.| Case | Value | Description |
|---|---|---|
Factura | F1 | Standard invoice (Art. 6, 7.2 and 7.3 of R.D. 1619/2012) |
Simplificada | F2 | Simplified invoice or invoice without recipient identification (Art. 6.1.D of R.D. 1619/2012) |
Sustitutiva | F3 | Invoice issued to replace previously declared simplified invoices |
R1 | R1 | Corrective invoice — Art. 80.1, 80.2, and well-founded legal error (error fundado en derecho) |
R2 | R2 | Corrective invoice — Art. 80.3 |
R3 | R3 | Corrective invoice — Art. 80.4 |
R4 | R4 | Corrective invoice — other grounds |
R5 | R5 | Corrective simplified invoice |
TaxType — josemmo\Verifactu\Models\Records\TaxType
TaxType — josemmo\Verifactu\Models\Records\TaxType
TaxType identifies which indirect tax applies to a breakdown line (<Impuesto>).| Case | Value | Description |
|---|---|---|
IVA | 01 | Impuesto sobre el Valor Añadido — general Spanish VAT |
IPSI | 02 | Impuesto sobre la Producción, los Servicios y la Importación (Ceuta & Melilla) |
IGIC | 03 | Impuesto General Indirecto Canario (Canary Islands) |
Other | 05 | Other applicable taxes |
Value
04 is not defined — the AEAT specification skips it. Use Other (05) for any tax
not covered by the first three cases.RegimeType — josemmo\Verifactu\Models\Records\RegimeType
RegimeType — josemmo\Verifactu\Models\Records\RegimeType
RegimeType identifies the special VAT regime or additional fiscal significance of a breakdown line (<ClaveRegimen>). Values C12, C13, and C16 are not defined in the specification and are intentionally absent.| Case | Value | Description |
|---|---|---|
C01 | 01 | General regime operation |
C02 | 02 | Export |
C03 | 03 | Operations under the special regime for second-hand goods, works of art, antiques, and collectibles |
C04 | 04 | Special regime for investment gold |
C05 | 05 | Special regime for travel agencies |
C06 | 06 | Special regime for groups of entities under IVA (advanced level) |
C07 | 07 | Special cash-accounting criterion regime |
C08 | 08 | Operations subject to IPSI / IGIC |
C09 | 09 | Invoicing of travel agency mediation services acting in the name and on behalf of others (D.A. 4ª R.D. 1619/2012) |
C10 | 10 | Collections on behalf of third parties of professional fees or intellectual/industrial property rights by professional associations or similar bodies |
C11 | 11 | Business premises rental operations |
C14 | 14 | Invoice with pending IVA accrual for public-administration construction certifications |
C15 | 15 | Invoice with pending IVA accrual for successive-tract operations |
C17 | 17 | Operations covered by the OSS or IOSS regimes (Chapter XI, Title IX) |
C18 | 18 | Equivalence surcharge (recargo de equivalencia) |
C19 | 19 | Operations under the Special Agriculture, Livestock, and Fishing Regime (REAGYP) |
C20 | 20 | Simplified regime |
OperationType — josemmo\Verifactu\Models\Records\OperationType
OperationType — josemmo\Verifactu\Models\Records\OperationType
OperationType classifies whether a breakdown line is subject to tax, non-subject, or exempt, and on what legal basis (<CalificacionOperacion> / <OperacionExenta>).| Case | Value | Description |
|---|---|---|
Subject | S1 | Subject and not exempt — without reverse-charge mechanism |
PassiveSubject | S2 | Subject and not exempt — with reverse-charge mechanism (inversión del sujeto pasivo) |
NonSubject | N1 | Non-subject operation — Arts. 7, 14, and others |
NonSubjectByLocation | N2 | Non-subject by location rules |
ExemptByArticle20 | E1 | Exempt under Art. 20 |
ExemptByArticle21 | E2 | Exempt under Art. 21 |
ExemptByArticle22 | E3 | Exempt under Art. 22 |
ExemptByArticles23And24 | E4 | Exempt under Arts. 23 and 24 |
ExemptByArticle25 | E5 | Exempt under Art. 25 |
ExemptByOther | E6 | Exempt on other grounds |
Helper methods
OperationType also exposes three convenience instance methods to categorise a value at runtime:| Method | Returns true for |
|---|---|
isSubject(): bool | Subject, PassiveSubject |
isNonSubject(): bool | NonSubject, NonSubjectByLocation |
isExempt(): bool | ExemptByArticle20 through ExemptByOther (E1–E6) |
CorrectiveType — josemmo\Verifactu\Models\Records\CorrectiveType
CorrectiveType — josemmo\Verifactu\Models\Records\CorrectiveType
CorrectiveType specifies the method used to correct an original invoice (<TipoRectificativa>). Required for all R1–R5 invoice types.| Case | Value | Description |
|---|---|---|
Substitution | S | The corrective invoice replaces the original entirely. The original is annulled. When used, both correctedBaseAmount and correctedTaxAmount must be provided. |
Differences | I | The corrective invoice supplements the original, carrying only the delta amounts. The original invoice remains valid. |
ForeignIdType — josemmo\Verifactu\Models\Records\ForeignIdType
ForeignIdType — josemmo\Verifactu\Models\Records\ForeignIdType
ForeignIdType specifies the type of identification document held by a foreign recipient
(<IDOtro/IDType>). Used inside ForeignFiscalIdentifier objects added to
RegistrationRecord::$recipients.| Case | Value | Description |
|---|---|---|
VAT | 02 | NIF-IVA (foreign VAT identification number) |
Passport | 03 | Passport |
NationalId | 04 | Official identification document issued by the country or territory of residence |
Residence | 05 | Certificate of residence |
Other | 06 | Other proof of identity document |
Unregistered | 07 | Not yet registered with AEAT. The record must be corrected later to replace this type with the actual document type. |