Guarantor software in Álava, Bizkaia and Gipuzkoa

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
POST /ticketbai/create
{
  "serie": "A",
  "numero": "234634",
  "fecha_expedicion": "19-11-2026",
  "tipo_operacion": "servicios",
  "importe_total": "242.00",
  …
}
200 OK · instantly
{
  "tbai": "TBAI-B05434202-021224-…",
  "estado": "Pendiente",
  "qr": "iVBORw0KGgoAAAANSUhEUgAA…"
}

How the TicketBAI API works

  1. 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. 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. 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.

Request · cURL
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"
  }'
Response · 200
{
  "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 days

Specialists in Spain

Common and foral territory: Verifactu, TicketBAI and SII with one provider.

Guarantor software in Álava, Bizkaia and Gipuzkoa

Proven 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 collaborator

TicketBAI: 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.

TicketBAI in Álava: foral taxpayersSince 1 Dec 2022
Phased from 1 April 2022; all other taxpayers since 1 December 2022.
In force
Batuz in Bizkaia (TicketBAI and LROE): all taxpayersSince 1 Jan 2026
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.
In force
TicketBAI in Gipuzkoa: foral taxpayersSince 1 Jun 2023
Phased by activity from 1 July 2022.
In force

This is not advice: each taxpayer determines what applies to them with their adviser.

TicketBAI API pricing

From

€14.99

/month per NIF active in production, excl. VAT

See all prices
  • 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.

Questions about the TicketBAI API

More questions about TicketBAI

Is Verifacti TicketBAI guarantor software?

Yes, with the foral treasuries of Álava, Bizkaia and Gipuzkoa. Your software does not need to register.

Do I need a separate integration for each foral treasury?

No. There are three TicketBAIs, one per foral treasury, but a single Verifacti API for all three: the same endpoint and the same JSON. The destination is the NIF’s treasury, and Verifacti generates each territory’s file and submits it to its treasury.

Do I need a digital certificate to submit to the foral treasury?

No. Verifacti is an AEAT social collaborator and submits with its own certificate once the taxpayer signs the representation form, the same one for the AEAT and the foral treasuries. It can be signed online, without a certificate.

If I am in the SII, do I have to comply with TicketBAI?

Being in the SII does not exempt you from TicketBAI in any of the three territories. What TicketBAI is.

Can I use the same integration if I have customers in common territory?

You integrate NIF management once; each NIF uses the Verifactu API or the TicketBAI API depending on where it is taxed, at the same price.

Start integrating today

Try it for free with the test environment.

Test environment and test NIF includedSee pricing