Skip to main content

Introduction

TicketBAI is a fiscal initiative developed collaboratively by the Basque Government and the provincial tax authorities of รlava, Gipuzkoa, and Bizkaia. Its primary objective is to combat tax fraud by ensuring that all invoices issued by individuals and entities conducting economic activities in the Basque Country are reported to the corresponding tax authorities. Under this system, businesses are required to use certified invoicing software that generates a unique TicketBAI QR code for each invoice. These codes facilitate the traceability of transactions and prevent the manipulation or deletion of invoices. The invoicing software must also create an XML file for each transaction, which is electronically signed and sent to the relevant provincial tax authority. The implementation timeline for TicketBAI varies across the three provinces:
  • Alava: Mandatory adoption began in phases starting in 2022, with full compliance required by December 1, 2022.
  • Gipuzkoa: A phased implementation commenced in 2022, with different sectors required to comply by specific dates, concluding on May 1, 2023.
  • Bizkaia: The province has integrated TicketBAI into a broader tax control system known as Batuz. Mandatory adoption for large companies began on January 1, 2024, with a staggered implementation for other entities extending until January 1, 2026.
Invopop will automatically convert GOBL Invoices into the TicketBAI format, including the required โ€œchainingโ€, and will send them to the correct tax authority.

Prerequisites

In order to register a supplier and issue invoices, you will need:
  • Supplier details, including:
    • company name,
    • a tax ID (NIF) from a company in one of the three Tax Agencies, and,
    • an address which includes the Region name; โ€œAlabaโ€, โ€œBizkaiaโ€, or โ€œGipuzkoaโ€.
  • Customer details for B2B sales, including the tax ID if selling to a Spanish or EU entity.
  • Quantity, name, price, and VAT rates of items being sold, including differenciating between physical goods and services.
  • An invoicing series.
TicketBAI requires all suppliers to sign an agreement with their invoicing provider explicitly granting permission to represent them. This is currently a manual process performed outside of Invopop. For more details, contact support.

Setup

To correctly issue TicketBAI invoices, you will need to prepare your Invopop Workspace by following these steps:
1

Connect the TicketBAI app

Head over to Configuration > Apps, and find TicketBAI from the list of apps to discover. Tap the Connect button to enable.No further configuration is required.
2

Create invoice workflow

If in the unlikely scenario a document is rejected, you will need to try and correct the error inside a new document and resend. As documents are all chained together in the Generate TicketBAI step, modifications are not permitted.

Running

Invopop uses the GOBL framework for sending and storing invoices to be sent to TicketBAI. In this section we provide example GOBL documents that you can copy and customize. We also recommend using the GOBL Builder to test building invoices and generating PDFs in real-time to see what the framework is capable of. All of the following examples assume you will be performing two key steps:
  1. Upload the example either via the Invopop Console or using the Invopop Silo Create an Entry API endpoint.
  2. Create a job to process the Silo Entry with your TicketBAI workflow either manually via the console, or using the Invopop Transform Create a Job endpoint.
The Invopop API will automatically prepare the uploaded documents from the minimal data provided, this allows us to keep the examples short and concise. GOBL Invoices sent to TicketBAI require the following properties in order to perform the correct normalization and validation steps: Invopop will try to assign these automatically if not explicitly provided.
If you do not already have a tax ID from a company in the Basque Country, you will need to use test data. In the examples, we use the name HFPn5yhXZ9tdD4pHRbvwymaVPrGZQr and tax ID code A99805194, which were issued by the TicketBAI tax authorities for testing.
Scenario details:
  • The supplier is based out of Bilbao in Bizkaia, using the sandbox data provided by TicketBAI.
  • The customer is in Madrid.
  • Theyโ€™re selling software development services with standard VAT.
  • The series for the invoice is โ€œF1โ€.
TicketBAI B2B Invoice
{
  "$schema": "https://gobl.org/draft-0/bill/invoice",
  "$addons": ["es-tbai-v1"],
  "series": "F1",
  "supplier": {
    "name": "HFPn5yhXZ9tdD4pHRbvwymaVPrGZQr",
    "tax_id": {
      "country": "ES",
      "code": "A99805194"
    },
    "addresses": [
      {
        "num": "42",
        "street": "San Frantzisko",
        "locality": "Bilbo",
        "region": "Bizkaia",
        "code": "48003",
        "country": "ES"
      }
    ],
    "emails": [
      {
        "addr": "billing@example.com"
      }
    ]
  },
  "customer": {
    "name": "Receive One S.L.",
    "tax_id": {
      "country": "ES",
      "code": "B98602642"
    },
    "emails": [
      {
        "addr": "billing@example.com"
      }
    ],
    "addresses": [
      {
        "num": "42",
        "street": "Calle Pradillo",
        "locality": "Madrid",
        "region": "Madrid",
        "code": "28002",
        "country": "ES"
      }
    ]
  },
  "lines": [
    {
      "quantity": "20",
      "item": {
        "name": "Development services",
        "price": "90.00",
        "unit": "h"
      },
      "taxes": [
        {
          "cat": "VAT",
          "rate": "standard"
        }
      ]
    }
  ],
  "notes": [
    {
      "key": "general",
      "text": "Invoice for development services"
    }
  ]
}
Key details to take away from this example:
  • Weโ€™re applying the es-tbai-v1 addon to ensure GOBLโ€™s TicketBAI validation checks are applied.
  • There is no currency nor issue_date, as these will be assigned automatically.
  • There is no invoice code as this will be assigned by the workflow.
  • TicketBAI requires a general note, so weโ€™ve added one at the bottom.
In this example:
  • The supplier is based out of Bilbao in Bizkaia, using the sandbox data provided by TicketBAI.
  • There is no cusomter
  • Physical goods are being sold with a standard VAT rate.
  • The series for the invoice is โ€œFS1โ€.
TicketBAI B2C Invoice
{
  "$schema": "https://gobl.org/draft-0/bill/invoice",
  "$addons": ["es-tbai-v1"],
  "series": "FS1",
  "tax": {
    "prices_include": "VAT"
  },
  "supplier": {
    "name": "HFPn5yhXZ9tdD4pHRbvwymaVPrGZQr",
    "tax_id": {
      "country": "ES",
      "code": "A99805194"
    },
    "addresses": [
      {
        "num": "42",
        "street": "San Frantzisko",
        "locality": "Bilbo",
        "region": "Bizkaia",
        "code": "48003",
        "country": "ES"
      }
    ],
    "emails": [
      {
        "addr": "billing@example.com"
      }
    ]
  },
  "lines": [
    {
      "quantity": "1",
      "item": {
        "name": "Advanced screwdriver set",
        "price": "25.10",
        "ext": {
          "es-tbai-product": "goods"
        }
      },
      "taxes": [
        {
          "cat": "VAT",
          "rate": "standard"
        }
      ]
    }
  ],
  "notes": [
    {
      "key": "general",
      "text": "In person sale"
    }
  ]
}
Observations:
  • There is no customer object.
  • The tax object contains the prices_include value set to VAT, which will ensure all totals will be calculated assuming that prices include VAT.
  • The line item includes a es-tbai-product extension with the value goods.
  • TicketBAI requires a general note, in this case weโ€™ve added a generic message.

FAQ

No, you donโ€™t need to register with TicketBAI, or upload any digital certificates to Invopop. As a certified billing provider, Invopop will sign all invoices with our own digital certificate.TicketBAI allows three types of certificates; Invopop uses the certificado sello de empresa which allows us to sign e-invoices on behalf of our customers, saving you the burden of registering and uploading certificates yourself.
  • Bizkaia: by the end of each quarter, except for companies under SII (turnover above 6 million euros), which must report within 4 days.
  • Gipuzkoa and รlava: The submission must be done immediately after generating the invoice.
โŒ˜I