Skip to main content

Type of Signature: ftSignatureType

The ftSignatureType indicates the type and origin of the signature. The data type is Int64 and can contain a country-specific code, a value following the ISO-3166-1-ALPHA-2 standard, converted from ASCII into hex and used as byte 8 and 7.

For definitions regarding national laws, please refer to the appropriate appendix.

Format​

_CCCC_vlll_gggg_tsss

v - version​

version 2

t - Type/Category​

ValueDescription
0Uncategorized, Normal use (notification)
1Information (notification), low priority
2Alert (notification), high priority
3Failure (notification), high priority

Table 1. Signature type/category values (t) for Spain.

gggg - global flags​

ValueDescription
0001Archiving required.
Signatures marked with this flag are known to be archived related to market specific bookkeeping requirements. In case of offline usage or pure open-source usage, receipts/artefacts having this flag need to be handled as bookkeeping/accounting-relevant item.
0010Printing/Visualization is optional.
0020Do not print/visualize.
0040Printed receipt only.
0080Digital receipt only.

Table 2. Global flag values (gggg) for Spain.

sss - SignatureCase​

ValueDescriptionCaption
000Text items without a dedicated case
Returned with the country code ES for the TBAI identifier (TBAI-<NIF>-<ddMMyy>-<13 characters>-<CRC>, TicketBAI queues) and without country code for the VERI*FACTU legend (Factura verificable en la Sede electrónica de la AEAT, format text with position before header). Both must be printed. Messages of the provincial web service are returned with the Information category (t = 1) and caption Codigo <code>.
(empty) / Codigo <code>
001Url (QR code)
VERI*FACTU: the AEAT verification URL (…/wlpl/TIKE-CONT/ValidarQR?nif=…&numserie=…&fecha=…&importe=…), format QR code with position before header. TicketBAI: the TicketBAI verification URL (…/QRTBAI/?id=…&s=…&nf=…&i=…&cr=…), format QR code. Must be printed as QR code.
QR tributario: (VERI*FACTU) / [www.fiskaltrust.es] (TicketBAI)
002NIF
The issuer NIF (IDEmisorFactura) of the transmitted VERI*FACTU record; on cancellations the caption is IDEmisorFacturaAnulada. Part of the issuer data on the document.
IDEmisorFactura
003Signature
The Base64 signature value of the XAdES signature of the TicketBAI file. Format Base64, flagged Do not print (0020). Used for the chaining of the next invoice and kept for audit.
Signature
004Huella
The SHA-256 hash (huella) of the VERI*FACTU record, 64 upper-case hex characters. Chained into the next record. Not required on the document.
Huella
1 001InitialOperationReceipt (t = 1, flag 0001 archiving required)
Returned for the queue-start receipt (4001).
Initial-operation receipt
1 002OutOfOperationReceipt (t = 1, flag 0001 archiving required)
Returned for the queue-stop receipt (4002).
Out-of-operation receipt

Table 3. SignatureCase values (sss) for Spain.

Validation errors and rejections by the tax authority are returned as a single signature item with caption FAILURE, the Failure category (t = 3) and the error text as data; the response then carries the error state (see Service Status: ftState). Sandbox queues additionally return a text item with caption S A N D B O X. See Receipt Printing for the print rules of every item.