NEW V3.15 A new law requiring the digital signature of orders in the Spanish Basque countries will take effect on the 01.01.2022. From now on, SecuTix allows you to be compliant with this new regulation.

Solution

Documents

Following the TicketBAI regulation, a TBAI identifier and a QR code are displayed at the bottom of the order summary and order receipt. The QR code encodes a URL redirecting to the tax authorities' fiscal system, allowing to check that the order has been properly signed and sent to the fiscal authorities.

In addition to this, each duplicate is clearly marked as such. In case of order summary, a duplicate watermark is displayed.

In case of order receipt, duplicate is printed.

Either an order summary or an order receipt must be generated systematically for each order so that the tax authorities may check the order by scanning the QR code displayed on the document. However, the order is signed independently of the document generation. As a result:

  • You can display the order receipt and the order summary. The order will be signed exactly once and both documents will display the same QR code.
  • If you forgot to print and hand over a document to the end customer, you can always print it later.


Invoice and file summary

  • Invoices shouldn't be created in SecuTix when orders are signed. Indeed, both processes (invoice creation and order signature for TicketBAI) are generating an identifier to be displayed on the document and we want to avoid that a given order gets two different identifiers.
  • The file summary cannot display the required QR code because the QR code is related to an order, not to a file that may contain multiple orders. You can still provide file summaries to your customers for information purpose but they can't be used to prove that the order has been digitally signed.

Restricted operations after order closure

The interface to the TicketBAI system (defined by the fiscal authorities) allows mainly to create new orders and to cancel them. Modification is only possible in very specific cases that are listed exhaustively. As a result, in order to be able to send the appropriate information to the fiscal authorities, all actions modifying partially an order, like partial refunds and exchanges, must be avoided. SecuTix helps you in this task by performing following checks:

  • The box office doesn't allow neither partial refunds nor exchanges
  • The batch to cancel a single performance or product will only refund orders that don't contain any other performance or product
  • The on-line self exchange features are disabled

Getting started

Be ready on time !

You don't have to wait until the 01.01.2022 to enable this feature. Indeed, the TicketBAI service is already available in production but will store the signed orders "for real" from the 1st of January.

How does it work?

When the feature is enabled, SecuTix calls an external service provided by a partner, that in turn, calls the TicketBAI service. This partner is called KubiBAI. In fact, there exist multiple TicketBAI services, more precisely one for each Basque region. The reason of using an external service is to reduce the complexity in SecuTix, for example by hiding the differences related to each Basque region.

The signature process works in a half synchronous way. More precisely, SecuTix waits until the TBAI identifier has been generated and the order has been digitally signed, but it doesn't wait until the signed order has been stored in TicketBAI. By this way, the TBAI identifier and QR code may be printed on the documents right after order closure while still ensuring that the order closes in a reasonable time.

A separate batch process allows to ensure that the signed order has been stored by the fiscal authorities.

Set-up to be performed by the service team

Ask the service team to enable the order signature feature. The service team will perform following actions:

  • Set the MANDATORY_DUPLICATE flag to true for following document classes
    • Order summary
    • Order receipt
  • Set the institution parameter Basque Country Restrict After Sale to true
  • Set-up the credentials received from KubiBAI in the KubiBAI portal (https://kws.kubibai.net)

Documents

Order summary

Please add following information to your order summary template:

Invoice number:

{#if($document.order.invoiceNumber)}Invoice number: {$document.order.invoiceNumber}
{#else}Invoice number: Not available
{#end}

Invoice date:

Invoice date: {$document.order.orderCreationDate}

TBAI identifier and QR code:

{#if($document.order.externalIdentifier)}

      {$document.order.externalIdentifier}
{#else}TBAI identifier not available

QR code not available
{#end}

A complete example of document template in English, Spanish and Basque is provided below

Order receipt

Enable the display of the TicketBAI informations

#set($showKubibai = true)


Display if the document is a duplicate or not:

#if($showKubibai == true)

 #display($orderReceipt.documentType, 17, 'LEFT')#if($orderReceipt.solutionVersion.length() > 0) #display($orderReceipt.solutionVersion, 15, 'LEFT')#end

 #if($orderReceipt.isDuplicate == true)#set($duplicataStr = "DUPLICATE") #else #set($duplicataStr = 'ORIGINAL') #end  

 #display("Nb impressions: ", 18, 'LEFT')#display($duplicataStr,12, 'LEFT')

#end 

Display TBAI identifier and QR code

#if($showKubibai == true)
#if($orderReceipt.fiscalSignatureRestitutionStr.length() > 7)

#display($orderReceipt.fiscalSignatureRestitutionStr.substring(0, 32), 32, 'LEFT') 
    
#display($orderReceipt.fiscalSignatureRestitutionStr.substring(32, $orderReceipt.fiscalSignatureRestitutionStr.length()), 32, 'LEFT')
#else 
#display('TBAI identifier not available', 32, 'LEFT')
#end  

#if($orderReceipt.fiscalSignatureRestitution.length() > 0)
<QR>$orderReceipt.fiscalSignatureRestitution|6|CENTER<QR>
#else 
#display('QR code not available', 32, 'LEFT')
#end  
#end 

A complete example of document template in English, Spanish and Basque is provided below

New interface

Create a new interface of type external manager and sub-type KUBIBAI plugin

Set the following parameters

ParameterValue
URL
Client API keyProvided by KubiBAI on SecuTix' request
TBAI Territory id
  • Araba: 62b26c86-352c-44e6-980a-d89c4de762a6
● Bizkaia: b4039144-5069-4584-88e1-7086c9f01adc
● Gipuzkoa: dded8ad1-0574-4ee4-b4f7-36687cba73b9
Certificate passwordNot necessary
CIFCódigo de Identificación Fiscal

New function schedule

The schedule is only needed to check that the information have been stored successfully in TicketBAI and to recall KubiBAI in case of failures.

Schedule the Order recovery function belonging to the interface created previously with following parameters:

  • It's recommended to use an automatic schedule, for example once per day
  • Enter a date in the Date from field. The date has to be in the recent past. You should update this field from time to time, especially in case of heavy sales.
  • You can ignore the File to upload parameter.
  • No labels