TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/NemonInvocash/verifactu-php/llms.txt
Use this file to discover all available pages before exploring further.
Desglose model carries the line-level tax breakdown for an invoice. It records the applicable tax type (VAT or IGIC), the fiscal regime, the operation classification, taxable base amounts, the tax rate, the resulting VAT amount, and any equivalence surcharge. A Desglose instance is passed into RegistroAlta via its objects array. Multiple desgloses per invoice are not directly supported by the model; create separate RegistroAlta entries if your invoice spans multiple tax lines.
Construction
For IGIC invoices (Canary Islands), use
claveRegimenIGIC (lista L8B) instead of claveRegimen. Both fields can be present in the constructor array; only non-zero values are forwarded to the API.Fields
Tax type applied to this breakdown line, from lista L1 (e.g.
1 = IVA, 2 = IGIC). Both the integer ID and the string code are accepted. Maps to API field Impuesto.VAT fiscal regime key, from lista L8A (e.g.
1 = régimen general). Both the integer ID and the string code are accepted. Maps to API field ClaveRegimen. Use for peninsular VAT operations.IGIC fiscal regime key, from lista L8B. Both the integer ID and the string code are accepted. Maps to API field
ClaveRegimenIGIC. Use for Canary Islands IGIC operations instead of claveRegimen.Operation classification, from lista L9 (e.g. subject, exempt, non-subject). Both the integer ID and the string code are accepted. Maps to API field
CalificacionOperacion.Exempt operation type, from lista L10. Both the integer ID and the string code are accepted. Maps to API field
OperacionExenta. Only required when the operation is classified as exempt.Tax rate percentage applied to the taxable base (e.g.
21.0 for 21 % VAT). Maps to API field TipoImpositivo.Taxable base amount, or the non-subject amount when the operation is not subject to tax. Maps to API field
BaseImponibleOImporteNoSujeto.Cost-based taxable base. Used for specific regime operations where the taxable base is calculated at cost. Maps to API field
BaseImponibleACoste.VAT amount charged to the recipient (base × rate / 100). Maps to API field
CuotaRepercutida.Equivalence surcharge rate percentage, applicable under the recargo de equivalencia special regime. Maps to API field
TipoRecargoEquivalencia.Equivalence surcharge amount (base × surcharge rate / 100). Maps to API field
CuotaRecargoEquivalencia.Getters and Setters
| Method | Description |
|---|---|
getImpuesto(): int|string | Returns the tax type (lista L1). |
setImpuesto(int|string $v): void | Sets the tax type (lista L1). |
getClaveRegimen(): int|string | Returns the VAT regime key (lista L8A). |
setClaveRegimen(int|string $v): void | Sets the VAT regime key (lista L8A). |
getClaveRegimenIGIC(): int|string | Returns the IGIC regime key (lista L8B). |
setClaveRegimenIGIC(int|string $v): void | Sets the IGIC regime key (lista L8B). |
getCalificacionOperacion(): int|string | Returns the operation classification (lista L9). |
setCalificacionOperacion(int|string $v): void | Sets the operation classification (lista L9). |
getOperacionExenta(): int|string | Returns the exempt operation type (lista L10). |
setOperacionExenta(int|string $v): void | Sets the exempt operation type (lista L10). |
getTipoImpositivo(): float | Returns the tax rate percentage. |
setTipoImpositivo(float $v): void | Sets the tax rate percentage. |
getBaseImponibleOImporteNoSujeto(): float | Returns the taxable base or non-subject amount. |
setBaseImponibleOImporteNoSujeto(float $v): void | Sets the taxable base or non-subject amount. |
getBaseImponibleACoste(): float | Returns the cost-based taxable base. |
setBaseImponibleACoste(float $v): void | Sets the cost-based taxable base. |
getCuotaRepercutida(): float | Returns the VAT amount charged. |
setCuotaRepercutida(float $v): void | Sets the VAT amount charged. |
getTipoRecargoEquivalencia(): float | Returns the equivalence surcharge rate. |
setTipoRecargoEquivalencia(float $v): void | Sets the equivalence surcharge rate. |
getCuotaRecargoEquivalencia(): float | Returns the equivalence surcharge amount. |
setCuotaRecargoEquivalencia(float $v): void | Sets the equivalence surcharge amount. |
getArrayData()
getArrayData(): array returns an associative array containing only non-zero fields, ready for embedding inside the Desglose key of the RegistroAlta payload.
PHP property names differ from the API field names used in the payload:
| PHP property | API field key |
|---|---|
impuesto | Impuesto |
claveRegimen | ClaveRegimen |
claveRegimenIGIC | ClaveRegimenIGIC |
calificacionOperacion | CalificacionOperacion |
operacionExenta | OperacionExenta |
tipoImpositivo | TipoImpositivo |
baseImponibleOImporteNoSujeto | BaseImponibleOImporteNoSujeto |
baseImponibleACoste | BaseImponibleACoste |
cuotaRepercutida | CuotaRepercutida |
tipoRecargoEquivalencia | TipoRecargoEquivalencia |
cuotaRecargoEquivalencia | CuotaRecargoEquivalencia |
RegistroAlta::getArrayData() wraps the result in a single-element array under the key Desglose, matching the API’s expected structure.empty()
Desglose::empty(): Desglose returns a Desglose with all integer fields set to 0 and all float fields set to 0.0. Because getArrayData() skips zero values, an empty Desglose produces no output in the API payload. Use it as a safe no-op placeholder in RegistroAlta when no tax breakdown is required.

