verifactu_hash
Computes the VERI*FACTU SHA-256 fingerprint (huella) for an invoice record, links it to the previous chain record, and returns the hash, exact hashed string, and AEAT field errors.
Instructions
Compute the VERI*FACTU fingerprint (huella, SHA-256) of one invoicing record.
record (AEAT field names; snake_case aliases accepted): alta: IDEmisorFactura, NumSerieFactura, FechaExpedicionFactura (DD-MM-AAAA), TipoFactura (F1, F2, F3, R1-R5), CuotaTotal, ImporteTotal (as written in the XML, decimal point), FechaHoraHusoGenRegistro (AAAA-MM-DDThh:mm:ss+hh:mm). anulación (TipoRegistro="anulacion"): IDEmisorFacturaAnulada, NumSerieFacturaAnulada, FechaExpedicionFacturaAnulada, FechaHoraHusoGenRegistro. previous_huella: fingerprint of the previous record of the chain; empty for the first record. Returns the fingerprint, the exact string hashed and any field problems (an error means the AEAT would reject the record).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| record | Yes | ||
| previous_huella | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||