This article describes requirements for different types of documents in Spain, more specifically in the BIZKAIA region. The layouts of the individual documents serve only as examples. The design of the corresponding document types is up to you. In any case, care should be taken to integrate the necessary elements.
Invoices and receipts must contain an identification code and a QR code.
Identification code
The identification code is used to uniquely identify invoices or receipts and to link them to the other transaction data available in the POS system.
General requirements
- Length: 36+3 characters (fixed)
The font size must correspond to that of the rest of the data printed on the receipt/invoice. Good legibility for the recipient of the document must be guaranteed.
Content and structure
No. | lenght | Description |
1 | 4 | Fixed text "TBAI", to mark the purpose of the code |
2 | 1 | Separator "-" |
3 | 9 | NIF of the person/company issuing the document (Número de Identificación Fiscal) - tax number. The NIF in the identification code must correspond to that of the TBAI data (data report to the respective hacienda (tax administration)). |
4 | 6 | Date of issue of the document (invoice, receipt, credit note...) |
5 | 13 | the first 13 characters of the fiscal signature of the transaction data |
6 | 3 | Error detection code - ensures that the content of the identification code is correct. |
Example:
TBAI-00000006Y-251019-btFpwP8dcLGAF-237
QR code
The QR code can be used to check the validity of the document and contains a link to the TBAI web application.
General requirements
- Size: Edge length of the QR code must be between 30x30mm (not smaller) to 40x40mm (not larger).
- Error correction level: M
- Encoding for creation: UTF-8
- Colour contrast between QR code and background must be sufficiently high to ensure readability.
- Recommendation: Blank space of 6mm around the QR code
Content
No. | Key | Value | RetailForce DOM | Description / Notes |
1 | URL | https://batuz.eus/QRTBAI/ | automatic | The URL to access the web application to read the QR code |
2 | id | Identification code | automatic | see chapter "Identification code" |
3 | s | Number range of the document (document number series) |
element: "documentNumberSeries": |
Must match the details in the transaction file sent to the Hacienda |
4 | nf | Invoice / receipt number |
element: "documentNumber": |
Must match the details in the transaction file sent to the Hacienda |
5 | i | Total amount of the document | Calculated total amount of the receipt (receipt total) | Must match the details in the transaction file sent to the Hacienda |
6 | cr | CRC-8 Error detection code |
automatic |
The data is calculated by the software. It must be specified as the last parameter of the URL and is the result of applying the CRC-8 algorithm to the string of QR code content. The cr parameter itself and its associated "&" symbol are not included in the calculation. The output of the algorithm is written in decimal format as a new URL parameter. |
Output and placement
The prescribed position of the identification code and the QR code depend on the orientation of the document.
Vertical orientation ("portrait format):
- Position: at the lowest part of the invoice / voucher.
- TBAI identifier (identification code) must be on a single line.
- if the identification code cannot be placed on a single line, several consecutive lines are permitted (separate with a hyphen!)
- the TBAI-CR code below
Horizontal orientation ("landscape format"):
- Position: on the extreme right part of the document
- TBAI identifier (identification code) must be on a single line.
- if the identification code cannot be placed on a single line, several consecutive lines are allowed (separate with hyphen!)
- the TBAI-CR code below
Vertical document orientation - example
Horizontal document alignment - example
Comments
0 comments
Please sign in to leave a comment.