Documentation 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.
AeatResponse (josemmo\Verifactu\Models\Responses\AeatResponse) is returned by the promise resolved from AeatClient::send()->wait() and holds the fully parsed SOAP response from the AEAT VERI*FACTU web service. It exposes the global submission status, an optional CSV verification code, mandatory throttle timing, and a per-record status array so you can handle partial acceptance and errors programmatically.
AeatResponse properties
The CSV (Código Seguro de Verificación) code assigned by AEAT to this submission
(
<CSV>). Only present when the submission is not globally rejected — null when
status is ResponseStatus::Incorrect.The server-side timestamp recorded by AEAT at the moment of acceptance
(
<DatosPresentacion/TimestampPresentacion>). Parsed from ISO 8601. null when the
submission is rejected before being registered.The number of seconds your system information system (SIF) must wait before making the next
send() call (<TiempoEsperaEnvio>). Subject to NotBlank and Positive constraints —
always a positive integer.The global status of the entire submission batch (
<EstadoEnvio>). Subject to NotBlank.
See ResponseStatus below for possible values.Array of per-record status objects, one for each
<RespuestaLinea> element in the response.
Subject to Valid. See ResponseItem properties below.ResponseStatus enum
ResponseStatus (josemmo\Verifactu\Models\Responses\ResponseStatus) describes the overall outcome of a submission batch.
| Case | Value | Description |
|---|---|---|
Correct | Correcto | All records in the submission were accepted without errors. |
PartiallyCorrect | ParcialmenteCorrecto | At least one record has status Incorrect or AcceptedWithErrors; others may have been accepted. |
Incorrect | Incorrecto | Every record in the submission was rejected. |
ResponseItem properties
Each element of AeatResponse::$items is a ResponseItem (josemmo\Verifactu\Models\Responses\ResponseItem) instance describing the fate of a single submitted record.
The invoice identifier (
<IDFactura>) that this line item refers to, populated from the
<IDEmisorFactura>, <NumSerieFactura>, and <FechaExpedicionFactura> sub-elements of
<RespuestaLinea/IDFactura>. Subject to NotBlank and Valid.Whether the record was a registration (
Alta) or cancellation (Anulacion)
(<Operacion/TipoOperacion>). Subject to NotBlank.| Case | Value |
|---|---|
Registration | Alta |
Cancellation | Anulacion |
true when the record was flagged as a correction/resubmission (<Operacion/Subsanacion> = S).
Defaults to false.The per-record acceptance status (
<EstadoRegistro>). Subject to NotBlank.
See ItemStatus enum below.The AEAT numeric or alphanumeric error code (
<CodigoErrorRegistro>), present only when
status is Incorrect or AcceptedWithErrors. null for fully correct records.A human-readable description of the error in Spanish (
<DescripcionErrorRegistro>). null
when errorCode is null.ItemStatus enum
ItemStatus (josemmo\Verifactu\Models\Responses\ItemStatus) describes the outcome for a single record.
| Case | Value | Description |
|---|---|---|
Correct | Correcto | Record accepted without errors and registered in the AEAT system. |
AcceptedWithErrors | AceptadoConErrores | Record accepted but contains non-fatal errors. Inspect errorCode / errorDescription. |
Incorrect | Incorrecto | Record rejected. Must be corrected and resubmitted. |
Static methods
Parses the raw SOAP XML response and returns a populated
AeatResponse instance. Called
internally by the AeatClient — you typically do not need to call this directly.Throws josemmo\Verifactu\Exceptions\AeatException if:- The response contains a SOAP
<Fault>element - The
<RespuestaRegFactuSistemaFacturacion>root element is absent - Any date field cannot be parsed as ISO 8601
validate() is called automatically to enforce NotBlank / Positive constraints.