Skip to content

Data to be filled for the canonical format for TicketBAI

Below we describe the data required in the canonical format for invoice creation / subsanation, in order to ensure correct conversion to TicketBAI.

Value to be completed
General Canonical format
Invoice type
Third-party considerations (buyer, thirdParty)
In the detailed breakdown, it is necessary to specify taxableBases grouping identical operation types and tax concepts:
  • Operación type (OperationType).
  • Regime key (vatKey).
  • Tax rate (taxrate). Percentage applied to the taxable base to calculate the quota.
  • Taxable base or non-subject amount (baseOrAmount). Monetary amount on which the tax rate is applied / non-subject amount.
  • Output tax quota (taxFee). Amount resulting from applying the tax rate to the taxable base.
  • Detail type:
    * If it is non-subject, assign causeNotSubject.
    * If it is exempt, assign causeExemption.
    * Otherwise, assign nonExemptType. If not provided, S1 – Taxable and non-exempt operation – without reverse charge is assumed.
  • If it has equivalence surcharge:
    * Equivalence surcharge rate (surchargeTypeEquivalence). Percentage associated depending on the tax and tax rate.
    * Equivalence surcharge quota (feeSurchargeEquivalence). Amount resulting from applying the equivalence surcharge rate to the taxable base.
  • If it has taxable base at cost, assign taxableBaseAtCost. Monetary amount on which the tax rate is applied under the advanced special group regime.
It's required for Gipuzkoa and Araba the Details of invoice items (details). There are required description, amount, price, amountDiscount, total.
For Bizkaia the Details of invoice items (details) is optional, but it is filled, then are required description, amount, price, amountDiscount, total.
For Araba if you have to specify buyer, then buyer's address buyer.address and postal code buyer.postalCode are required.
For Gipuzkoa if you have to specify buyer, then buyer's address buyer.address is required except if it is not a simplified invoice or it is a simplified invoice to replace another or if it is not Corrective type R5

Invoice type

Specification of the invoice type: full invoice, simplified invoice, invoice issued as a replacement for simplified invoices, or corrective invoice.

Invoice type isSimplified isSimplifiedSubstitution isCorrective correctiveKey
F1
F2 true
F3 true
R1 true 1
R2 true 2
R3 true 3
R4 true 4
R5 true true 5

Third-party considerations

Condition Action (buyer, thirdParty)
isIssuedByThirdParties=true If the invoice is materially issued by a third party, i.e., someone else issues it on behalf of the taxpayer.

Fill in third-party data (thirdParty):
- Tax ID (NIF) or foreign identifier (Tin).
- Name/corporate name (BusinessName).
- If necessary, include the document type (documentType) and optionally the country code (country).
isIssuedByRecipients=true If the invoice is materially issued by a third party because the issuer is the recipient.
isSimplified=false Fill in recipient (counterparty/customer) data (buyer):
- Name/corporate name (BusinessName).
- If necessary, include the document type (documentType) and optionally the country code.

Canonical format equivalence with TicketBAI

Canonical TicketBAI
Seller / Tin Sujetos / Emisor / NIF
Seller / BusinessName Sujetos / Emisor / ApellidosNombreRazonSocial
Buyer / BusinessName Sujetos / Destinatarios / ApellidosNombreRazonSocial
Buyer / PostalCode Sujetos / Destinatarios / CodigoPostal
Buyer / Address Sujetos / Destinatarios / Direccion
Buyer / Tin Sujetos / Destinatarios / NIF (cuando no se usa IDOtro)
Buyer / Tin Sujetos / Destinatarios / IDOtro / ID
Buyer / DocumentType Sujetos / Destinatarios / IDOtro / IDType
Buyer / Country Sujetos / Destinatarios / IDOtro / CodigoPais
IsIssuedByRecipients Sujetos / EmitidaPorTercerosODestinatario = D
IsIssuedByThirdParties Sujetos / EmitidaPorTercerosODestinatario = T
Series Factura / CabeceraFactura / SerieFactura
Number Factura / CabeceraFactura / NumFactura
DateAndTime Factura / CabeceraFactura / FechaExpedicionFactura + HoraExpedicionFactura
IsSimplified Factura / CabeceraFactura / FacturaSimplificada
IsSimplifiedSubstitution Factura / CabeceraFactura / FacturaEmitidaSustitucionSimplificada
IsCorrective Factura / CabeceraFactura / FacturaRectificativa (si true)
CorrectiveKey Factura / CabeceraFactura / FacturaRectificativa / Codigo
CorrectiveType Factura / CabeceraFactura / FacturaRectificativa / Tipo
Correctives / Series Factura / CabeceraFactura / FacturasRectificadasSustituidas[] / SerieFactura
Correctives / Number Factura / CabeceraFactura / FacturasRectificadasSustituidas[] / NumFactura
Correctives / Date Factura / CabeceraFactura / FacturasRectificadasSustituidas[] / FechaExpedicionFactura
Correctives / Base Factura / CabeceraFactura / FacturaRectificativa / ImporteRectificacionSustitutiva / BaseRectificada
Correctives / Quota Factura / CabeceraFactura / FacturaRectificativa / ImporteRectificacionSustitutiva / CuotaRectificada
Correctives / Surcharge Factura / CabeceraFactura / FacturaRectificativa / ImporteRectificacionSustitutiva / CuotaRecargoRectificada
Description Factura / DatosFactura / DescripcionFactura
Total Factura / DatosFactura / ImporteTotalFactura
TransactionDate Factura / DatosFactura / FechaOperacion
Retention Factura / DatosFactura / RetencionSoportada
TaxableBases / TaxableBaseAtCost Factura / DatosFactura / BaseImponibleACoste
TaxableBases / VATKey Factura / DatosFactura / Claves[] / ClaveRegimenIvaOpTrascendencia
Details / Description Factura / DatosFactura / DetallesFactura[] / DescripcionDetalle
Details / Amount Factura / DatosFactura / DetallesFactura[] / Cantidad
Details / Price Factura / DatosFactura / DetallesFactura[] / ImporteUnitario
Details / AmountDiscount Factura / DatosFactura / DetallesFactura[] / Descuento
Details / Total Factura / DatosFactura / DetallesFactura[] / ImporteTotal
TaxableBases / CauseExemption Factura / desglose / ... / Sujeta / Exenta[] / CausaExencion
TaxableBases / NonExemptType Factura / desglose / ... / Sujeta / NoExenta[] / TipoNoExenta
TaxableBases / CauseNotSubject Factura / desglose / ... / NoSujeta[] / Causa
TaxableBases / BaseOrAmount Factura / / ... / Exenta[] / BaseImponible o NoSujeta[] / Importe o NoExenta[] / DesgloseIVA[] / BaseImponible
TaxableBases / TaxRate Factura / / ... / Sujeta / NoExenta[] / DesgloseIVA[] / TipoImpositivo
TaxableBases / TaxFee Factura / desglose / ... / Sujeta / NoExenta[] / DesgloseIVA[] / CuotaImpuesto
TaxableBases / SurchargeTypeEquivalence Factura / desglose / ... / Sujeta / NoExenta[] / DesgloseIVA[] / TipoRecargoEquivalencia
TaxableBases / FeeSurchargeEquivalence Factura / desglose / ... / Sujeta / NoExenta[] / DesgloseIVA[] / CuotaRecargoEquivalencia
TaxableBases / EquivalenceRegime Factura / desglose / ... / Sujeta / NoExenta[] / DesgloseIVA[] / OperacionEnRecargoDeEquivalenciaORegimenSimplificado
TaxableBases / OperationType Factura / desglose / DesgloseFactura o DesgloseTipoOperacion (PrestacionServicios/Entrega)
PreviousSeries HuellaTBAI / EncadenamientoFacturaAnterior / SerieFacturaAnterior
PreviousNumber HuellaTBAI / EncadenamientoFacturaAnterior / NumFacturaAnterior
PreviousDateAndTime HuellaTBAI / EncadenamientoFacturaAnterior / FechaExpedicionFacturaAnterior
PreviousSign HuellaTBAI / EncadenamientoFacturaAnterior / SignatureValueFirmaFacturaAnterior
Canonical Batuz
PropertyTransferAmountSubjectToVAT FacturasEmitidas[] / OtraInformacionTrascendenciaTributaria / ImporteTransmisionInmueblesSujetoAIVA
Properties / Situation FacturasEmitidas[] / OtraInformacionTrascendenciaTributaria / Inmuebles[] / SituacionInmueble
Properties / CadastralReference FacturasEmitidas[] / OtraInformacionTrascendenciaTributaria / Inmuebles[] / ReferenciaCatastral

Desglose

The breakdown can be 'TipoDesglose' or 'DesgloseOperacion'.