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.
RegistroAlta is the core invoice submission record in VeriFactu. It combines a set of object dependencies — such as an emisor, a destinatario, and a desglose — with a set of data fields that describe the invoice itself. Once built, you submit the record to VeriFactuAPI with altaRegistroAlta(), which POSTs it to the /api/alta-registro-facturacion endpoint for processing and, if enviarAeat is enabled on the emisor, onward submission to AEAT.
Build and Submit a RegistroAlta
ThenuevoRegistroAlta() method accepts two required arrays and one optional integer:
$objetos— an associative array of model objects (emisor,destinatario,desglose,tercero,facturaRectificada,facturaSustituida). Onlyemisoris required; the rest default to empty objects.$dataRegistroAlta— an associative array of invoice data fields.$webhookID(optional) — an integer webhook ID. If omitted or0, the emisor’s ownwebhookIDis used automatically.
- Standard Invoice (F1)
- Simplified Invoice (F2)
- Rectified Invoice (R5)
A standard invoice (
F1) requires an emisor, a destinatario, and a desglose. The IDEmisorFactura and NombreRazonEmisor fields are automatically populated from the $emisor object.RegistroAlta Data Fields Reference
The second argument tonuevoRegistroAlta() accepts the following fields. All fields are optional at the object-construction level, but VeriFactuAPI may require certain fields depending on the invoice type.
| Field | Type | Description |
|---|---|---|
numSerieFactura | string | Invoice series and number (e.g. AX/202412-118) |
fechaExpedicionFactura | string | Invoice issue date in YYYY-MM-DD format |
refExterna | string | Your own external reference string for this record |
tipoFactura | int|string | Invoice type (list L2): F1 = standard, F2 = simplified, R1–R5 = rectified |
tipoRectificativa | int|string | Rectification type (list L3); required when tipoFactura is a rectificative type |
baseRectificada | float | Rectified taxable base amount |
cuotaRectificada | float | Rectified tax quota amount |
cuotaRecargoRectificado | float | Rectified surcharge quota amount |
fechaOperacion | string | Date of the actual operation if different from the issue date (YYYY-MM-DD) |
descripcionOperacion | string | Free-text description of the operation |
facturaSimplificadaArt7273 | int|string | Simplified invoice under Art. 72/73 flag (list L4) |
facturaSinIdentifDestinatarioArt61d | int|string | Invoice without buyer identification under Art. 61d (list L5); use 'S' for simplified invoices with no destinatario |
macrodato | int|string | Large-amount transaction flag (list L14) |
emitidaPorTercODestinatario | int|string | Issued by third party or buyer flag (list L6) |
cupon | int|string | Coupon flag (list L4) |
subsanacion | int|string | Amendment of a previously rejected record (list L4) |
rechazoPrevio | int|string | Prior rejection reference (list L17) |
cuotaTotal | float | Total tax quota for the invoice |
importeTotal | float | Total invoice amount including tax |
List-based fields such as
tipoFactura and tipoRectificativa accept both the integer ID and the string code interchangeably — for example, 1 and 'F1' are equivalent for tipoFactura. Use listarListas() or idValorLista() to look up valid values for any list at runtime. See Listing Resources for details.If you do not pass a
$webhookID as the third argument to nuevoRegistroAlta(), the emisor’s own webhookID is used automatically. Pass an explicit integer to override the default on a per-record basis.
