TicketBAI API for your invoicing software
The Verifacti TicketBAI API connects your invoicing software with the foral treasuries of Álava, Bizkaia and Gipuzkoa: you send each invoice as JSON, Verifacti generates, signs and chains the TicketBAI file and instantly returns the QR and the TicketBAI code to print on the invoice, and then submits the file to the foral treasury. Verifacti is TicketBAI guarantor software in all three territories.
Test environment and test NIF included{
"serie": "A",
"numero": "234634",
"fecha_expedicion": "19-11-2026",
"tipo_operacion": "servicios",
"importe_total": "242.00",
…
}{
"tbai": "TBAI-B05434202-021224-…",
"estado": "Pendiente",
"qr": "iVBORw0KGgoAAAANSUhEUgAA…"
}How the TicketBAI API works
- 1
You send the invoice as JSON
Your software calls the API with the invoice data and the issuing NIF’s API key. It is the same endpoint for all three territories.
- 2
Verifacti generates the file and returns the QR
We generate, sign and chain the TicketBAI file. The TicketBAI code and the QR come from that signed file: the response returns them instantly, in Base64, to print on the invoice.
- 3
Verifacti submits the file to the foral treasury
We submit the file in the background to each NIF’s foral treasury; in Bizkaia, inside the Batuz LROE.
The result reaches you by webhook or by checking the record’s status.
Example: create an invoice with the TicketBAI API
An invoice against the test environment.
curl -X POST https://api.verifacti.com/ticketbai/create \
-H "Authorization: Bearer $VERIFACTI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"serie": "A",
"numero": "234634",
"fecha_expedicion": "19-11-2026",
"simplificada": false,
"nif": "A15022510",
"nombre": "Empresa de ejemplo SL",
"direccion": "Calle Mayor 15",
"cp": "48992",
"descripcion": "Descripción de la factura",
"tipo_operacion": "servicios",
"lineas": [{
"descripcion": "Línea 1",
"cantidad": "2",
"importe_unitario": "100.00",
"importe_total": "242.00"
}],
"desglose_iva": [{
"base_imponible": "200",
"tipo_impositivo": "21",
"cuota_impuesto": "42"
}],
"importe_total": "242.00"
}'{
"uuid": "ea6eae92-bac6-48c3-baa4-2bbf6b5ee562",
"tbai": "TBAI-B05434202-021224-mwUG7NRo2ZNxp-010",
"estado": "Pendiente",
"url": "https://…/qrtbai/?id=TBAI-B05434202-021224-…",
"qr": "iVBORw0KGgoAAAANSUhEUgAA…"
}What the TicketBAI API includes
Guarantor software in all three territories
Verifacti is registered as guarantor software in Álava, Bizkaia and Gipuzkoa. The software calling the API does not need to register.
Validation before sending
Every invoice is validated before it is sent and any error comes back with a code (code catalogue). By default we also check that the customer’s NIF is identified by the AEAT, because otherwise the foral treasury rejects the submission.
QR and TicketBAI code instantly
In the response, ready to print on the invoice.
Corrective invoices, cancellation and amendments
Corrective invoices (R1–R5) with the same create endpoint and cancellation with
/ticketbai/cancel. Modification and amendment of rejected files (/ticketbai/modify) are only available in Álava and Gipuzkoa.Status, listing and export
Status of each invoice, listings, export and XML download (
/status,/list,/export,/downloadXML).Bizkaia: submission to the Batuz LROE
In Bizkaia, every issued invoice is recorded in the LROE: form 140 for self-employed individuals and form 240 for entities, with registration and cancellation. TicketBAI in Bizkaia.
No digital certificate
The same representation form works for the AEAT and the three foral treasuries, and it can be signed online.
Your data, in the EU and exportable
Data is hosted in the European Union and you can export your invoices at any time. The SLA is in the terms of use.
One integration per regulation, on top of the NIF management API
You integrate the NIF management API once: registering, activating and removing NIFs, representation and webhooks. Each regulation then adds its own submission integration, close to the target administration’s API. If a NIF is taxed in common territory, it uses the Verifactu API with the same NIF management and the same price.
Why Verifacti for TicketBAI
Built for developers
Public documentation with examples for every call, quick start guide, Postman collections, llms.txt and a free account with a test environment.
Typical integration: one to three developer daysSpecialists in Spain
Common and foral territory: Verifactu, TicketBAI and SII with one provider.
Guarantor software in Álava, Bizkaia and GipuzkoaProven reliability
Hundreds of companies and software vendors in production with Verifacti. Data hosted in the EU and an SLA in the terms of use.
AEAT social collaboratorTicketBAI: territories, dates and who it applies to
TicketBAI is the invoicing control system of the foral treasuries of Álava, Bizkaia and Gipuzkoa. It replaces Verifactu in those territories, and being in the SII does not exempt you from it.
| Who | Date | Status | Rule |
|---|---|---|---|
| TicketBAI in Álava: foral taxpayers Phased from 1 April 2022; all other taxpayers since 1 December 2022. | Since 1 Dec 2022 | In force | NF 13/2021 y DF 48/2021 · FAQ 1.9 · calendario |
| Batuz in Bizkaia (TicketBAI and LROE): all taxpayers Companies that are not SMEs since 1 January 2024; everyone else in windows on 1 July 2024, 1 January 2025, 1 July 2025 and 1 January 2026. | Since 1 Jan 2026 | In force | NF 8/2023 · Batuz |
| TicketBAI in Gipuzkoa: foral taxpayers Phased by activity from 1 July 2022. | Since 1 Jun 2023 | In force | NF 3/2020 · DF 32/2020 |
This is not advice: each taxpayer determines what applies to them with their adviser.
- The price per NIF goes down with every tier.
- Up to 3,000 invoicing records per month per NIF.
- Online signing of the representation form: €2.90 + VAT.
- Free test environment and test NIF.
- Annual plan with a 10% discount, no setup fees.
- Same price as the Verifactu API: each NIF uses one or the other depending on where it is taxed.
- Startup plan for companies under 12 months old, with under €100,000 in revenue and under €200,000 in funding.
Everything you need to integrate TicketBAI
Questions about the TicketBAI API
More questions about TicketBAIIs Verifacti TicketBAI guarantor software?
Do I need a separate integration for each foral treasury?
Do I need a digital certificate to submit to the foral treasury?
If I am in the SII, do I have to comply with TicketBAI?
Can I use the same integration if I have customers in common territory?
Keep reading
Start integrating today
Try it for free with the test environment.