Skip to content
Log in

Submit TicketBAI

B2Brouter provides a convenient API for submitting TicketBAI tax reports so you can easily comply with the legislation of the three Basque Tax Authorities (Araba, Bizkaia, and Gipuzkoa). Our API abstracts away the differences between them and offers you a unified interface that is fully compliant with all three Tax Authorities. You can check the status of B2Brouter as “software garante” in all three Tax Authorities: Araba, Bizkaia, Gipuzkoa.

With the B2Brouter API, you can manage the submission of TicketBAIs in two ways:

  • Delegate the generation of TicketBAI to B2Brouter
  • Generate yourself the XML TicketBAI file

Delegate the generation of TicketBAI to B2Brouter

Section titled “Delegate the generation of TicketBAI to B2Brouter”

This is the default and recommended way of processing tax reports. You will only have to worry about your issued invoices; we’ll take care of generating and sending the TicketBAIs.

First, you need to set up the Tax Authority that has to receive your tax reports in your account configuration at B2Brouter. Please check the documentation on how to set up your account, and specify the Tax Authority details in the Tax declaration section.

Once you have configured your tax declarations, setting up any of the Basque Tax Authorities as receivers, a TicketBAI will be generated automatically and sent to the Tax Authority for each invoice you issue via B2Brouter.

Second, you create an invoice at B2Brouter using our API. You have two options:

Generate the TicketBAI associated with the issued invoice

Section titled “Generate the TicketBAI associated with the issued invoice”

If you issued automatically the invoice that you just created (by setting the parameter send_after_import in the API call), the TicketBAI corresponding to the invoice will be generated automatically and sent to the Tax Authority.

Alternatively, if you issue your invoices using other means or want more control over the issuing process, you can explicitly generate the TicketBAI corresponding to any issued invoice imported in B2Brouter by calling the generate tax report method.

The process of sending tax reports to the Basque Tax Authorities is asynchronous — we generate, sign, chain, and send the TicketBAI in a background process.

You will have to check the status of the TicketBAI we send on your behalf:

Because of the asynchronous nature of the tax report sending process, there is no guarantee that when you check the status it will already have the response of the Tax Authority. It usually takes a few seconds to complete the transaction. The transaction is complete if the status is registered or error. We recommend implementing an exponential backoff strategy for retries.

If you prefer to generate the XML file of the TicketBAI yourself, we can process them for you (sign, chain, and send them to the corresponding Tax Authority). We can also send you back the response of the Tax Authority.

Please contact sales if you are interested in this method of processing tax reports.