Documentation 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.
FacturaRectificada is a lightweight reference model that identifies the original invoice being corrected by a rectification. When the tipoFactura field on a RegistroAlta is set to a rectification type from lista L2 (values R1 through R5), a populated FacturaRectificada must be included in the RegistroAlta objects array under the key facturaRectificada. The model carries three fields that uniquely identify the original invoice within the AEAT system.
Construction
RegistroAlta via the objects array:
The three fields in
FacturaRectificada must exactly match the IDEmisorFactura, NumSerieFactura, and FechaExpedicionFactura of the original RegistroAlta as stored in AEAT.Fields
NIF of the issuer of the original invoice being corrected. Maps to API field
IDEmisorFactura.Series and number of the original invoice being corrected. Maps to API field
NumSerieFactura.Issue date of the original invoice being corrected, in
YYYY-MM-DD format. Maps to API field FechaExpedicionFactura.Getters and Setters
| Method | Description |
|---|---|
getIDEmisorFactura(): string | Returns the issuer NIF of the original invoice. |
setIDEmisorFactura(string $v): void | Sets the issuer NIF of the original invoice. |
getNumSerieFactura(): string | Returns the series/number of the original invoice. |
setNumSerieFactura(string $v): void | Sets the series/number of the original invoice. |
getFechaExpedicionFactura(): string | Returns the issue date of the original invoice. |
setFechaExpedicionFactura(string $v): void | Sets the issue date of the original invoice. |
getArrayData()
getArrayData(): array returns an associative array containing only the fields with non-empty string values. All three PHP property names map directly to the same names in the API payload:
| PHP property | API field key |
|---|---|
IDEmisorFactura | IDEmisorFactura |
numSerieFactura | NumSerieFactura |
fechaExpedicionFactura | FechaExpedicionFactura |
RegistroAlta::getArrayData() wraps the result in a single-element array under the key FacturasRectificadas, matching the API’s expected structure. If getArrayData() returns an empty array (i.e. all fields are empty), the FacturasRectificadas key is omitted entirely from the payload.empty()
FacturaRectificada::empty(): FacturaRectificada returns a FacturaRectificada with all three fields set to ''. Because getArrayData() skips empty strings, an empty instance produces no output in the API payload. Pass it to RegistroAlta when the invoice is not a rectification.

