TicketBAI XML validator: check your file against the XSD

Validate your TicketBAI file (registration or cancellation) for free against the XSD schemas of the foral treasury you choose: Álava, Bizkaia or Gipuzkoa. The validator shows which element fails and on which line. The XML is validated in your browser and we do not store it. It does not check the electronic signature or each treasury’s business rules.

Validate a TicketBAI file

This tool only checks the schema (XSD): that the structure and the format of each field are correct. It is the basic validation. When you send your invoices with the Verifacti API, each one goes through a much more complete validation before it reaches the foral treasury: that amounts and tax add up, tax rates, dates, NIFs, key combinations and the rest of each treasury's business rules. If something is wrong, we return the specific error before anything is sent, instead of a rejection from the treasury. And Verifacti takes care of the signature, the chaining and the submission. and try it with the test environment and a test NIF.

The XML is validated in your browser: we do not send it to any server or store it.

Automate it with the API

With the TicketBAI API you don't generate or sign the file: you send the invoice as JSON and Verifacti, guarantor software in all three territories, generates the XML, signs it and sends it to the foral treasury; in Bizkaia, also to the LROE.

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": "48001",
    "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"
  }'
Test environment and test NIF included

How to use it

  1. Choose the treasury: Álava, Bizkaia or Gipuzkoa.
  2. Paste or upload the TicketBAI file (TicketBai or AnulaTicketBai).
  3. The file must be signed: the schema requires the signature (ds:Signature) and fails without it.
  4. Click «Validate» and fix the errors it shows.
  5. Validate again.

What it checks

It validates against the TicketBAI 1.2.2 schema of the foral treasury you choose. Today the three versions differ only in their documentation texts.

Schemas it validates against
FileSchema
Registration (TicketBai)ticketbaiv1-2-2.xsd
Cancellation (AnulaTicketBai)anula_ticketbaiv1-2-2.xsd
Signature (ds:Signature)Its structure only, with the W3C xmldsig schema

Questions

Do I need to choose the treasury?

Each treasury publishes its own copy of the 1.2.2 schema. Today only the documentation texts differ, not the rules; the tool uses the copy of the one you choose in case one changes.

Does it check the signature?

Only its structure. It does not verify the certificate or that the signature matches the content.

Do you send the file to a server?

No. The schemas are downloaded into your browser and validation runs there.

Does my software have to be guarantor software?

No, if you use the Verifacti TicketBAI API: the guarantor software is Verifacti, in Álava, Bizkaia and Gipuzkoa.

Where can I see TicketBAI examples?

Send JSON and leave the file to the API

Test environment and test NIF included.

Test environment and test NIF includedRead the documentation