Skip to content

Canonical format

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

Invoice examples are attached: invoice examples.

Data to be completed in the canonical format for Veri*Factu

It is the application that must determine the data needed for its business, and then use it to generate a Veri*Factu record.

If not provided, the following default values are assumed for each data type:

Type Value
boolean false
integer 0
decimal 0
string
datetime 0001-01-01T00:00:00+00:00

Below are the values that must be completed in the canonical format for Veri*Factu:

Value to be completed
Invoice issuer:
* Seller.Tin: Tax Identification Number (NIF) of the party obliged to issue the invoice.
* Seller.BusinessName: Name / corporate name of the party obliged to issue the invoice.
Serial No. (Series) and Invoice No. (Number) that identify the issued invoice.
For Veri*Factu, Series is optional; however, for TicketBAI the regulation states that Series and Number must be specified separately.
Invoice issue date (DateAndTime). This reflects the day on which the invoice is formally generated, i.e., when it is sent to SDH.
Description of the invoice subject (Description).
(Optional) Transaction date (TransactionDate) when it differs from the issue date. This reflects the tax accrual date of the invoice, used to calculate due dates and accounting.
Invoice type
Replacement and corrective invoice considerations (correctives)
Recipient block considerations (buyer)
Third-party considerations (buyer, thirdParty)
Total tax amount (sum of Output Tax and Equivalence Surcharge Tax) (TotalTaxes).
Total invoice amount (Total).
In the detailed breakdown, it is necessary to specify taxableBases with a limit of 12 elements (grouping identical tax concepts is recommended):
  • (Optional) Tax type (taxType). If not provided, VAT is assumed.
  • 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.
(Optional) Coupon (isCoupon). Flag that specifies whether there is a reduction of the taxable base due to coupons, bonuses, or discounts when only the original invoice is issued.
It may only be set to true if TipoFactura = R5 or R1.
It indicates that the operation is not a full or simplified invoice, but a coupon redeemable for goods or services. It allows the AEAT to recognize that the operation does not generate an ordinary invoice, but an equivalent proof (ticket, coupon, voucher).
When tax regulations refer to an “invoice with coupon”, they do not mean any promotional voucher like those used in a supermarket, but a specific concept.
A coupon is a document (or code) that grants the customer a discount/bonus on the purchase, and that discount directly affects the invoice taxable base (the amount before VAT).
In these cases, instead of issuing an invoice for the full amount and then a separate credit note, the original invoice already includes the reduction of the taxable base thanks to the coupon.
That is why the system requires marking this flag, so the Tax Agency knows that the invoice does not reflect the full price of the product/service, but already has a coupon/bonus applied that reduces what is declared for VAT purposes.
Simple examples:
* A telecom company issues a €20 discount coupon for the next bill.
* A shop issues a promotional 10% discount coupon for the current purchase.
* An insurer applies a bonus that appears as a “coupon” on the insurance invoice.
(Optional) FacturaSimplificadaArt7273 (isSimplifiedArt7273). Simplified invoice that DOES identify the recipient under Articles 7.2 and 7.3 of RD 1619/2012.
It may only be set to true if TipoFactura = F1, F3, R1, R2, R3 or R4.
For example, when an operation does not exceed €400 (VAT included), it is allowed to issue simplified invoices even to professionals. In certain special sectors, such as hospitality, this threshold can be up to €3,000, but the recipient must be identified if they want to deduct VAT.
Articles 7.2 and 7.3 of RD 1619/2012 allow certain simplified invoices to be included in the VAT Record Book with deduction effects if they contain additional data:
* Art. 7.2 → Simplified invoice with recipient identification upon request, including NIF and name/corporate name of the recipient, recipient address, applied tax rate, and output VAT quota.
* Art. 7.3 → Simplified invoice issued in sectors with a specific obligation to identify the customer or with amounts above €400 (VAT included).
(Optional) FacturaSinIdentifDestinatarioArt61d (isNotBuyerArt61d). Invoice that DOES NOT identify the recipient under Article 6.1.d) of RD 1619/2012.
It may only be set to true if TipoFactura = F2 or R5.
For example, when a final consumer expressly requests a full invoice, but does not provide their tax identification.
Article 6.1.d) of RD 1619/2012 indicates that it is allowed to omit the recipient identification on a full invoice when the amount does not exceed €400 VAT included, or in other specific cases provided by law (for example, certain retail sales, hospitality, passenger transport, etc.), as long as it is not an intra-Community transaction or a case with an explicit obligation to identify the customer.

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

isSimplifiedArt7273=true: Although it is a simplified invoice, it is considered a full invoice. It may only be set to true if TipoFactura=F1, F3, R1, R2, R3 or R4.

isNotBuyerArt61d=true: Although it is a full invoice, it is considered a simplified invoice. It may only be set to true if TipoFactura=F2 or R5.

Replacement and corrective invoice considerations

Invoice type Corrected/Replaced invoices block (correctives)
F3 Indicate the list of issued invoices to replace in correctives, identifying each invoice (Series and Number) along with its issue date (Date).
R1 to R5 Set the corrective invoice type in correctiveType.

Indicate the list of issued invoices to be corrected in correctives, identifying each invoice (Series and Number) along with its issue date (Date).

If it is a corrective invoice by substitution (correctiveType=1), include its taxable base (Base), output/supported quota (Quota) and optionally its equivalence surcharge quota (Surcharge).

Recipient block considerations

Invoice type Recipient block (buyer)
F1 Mandatory
F2 Do not include it. Simplified
F3 Mandatory. Full invoice that replaces several simplified invoices
R1 to R4 Mandatory
R5 Do not include it. Corrective of a simplified invoice

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 isSimplifiedArt7273=false Fill in recipient (counterparty/customer) data (buyer):
- Name/corporate name (BusinessName).
- If isNotBuyerArt61d=false, include tax ID (NIF) or foreign identifier (Tin).
- If necessary, include the document type (documentType) and optionally the country code.

Resolution of specific example cases

Case
Advance invoices must be treated as a normal invoice, usually type F1.
How to issue invoices with IRPF?
How to issue invoices for Canary Islands cases?
How to issue One-Stop Shop (OSS) invoices?
Who is affected by third-party invoices from a Veri*Factu SIF?
How is a domestic sale to an intra-Community customer performed?
How is an intra-Community sale to an intra-Community customer performed?
How does an export regime apply?

Canonical format equivalence with Veri*Factu

Canonical Veri*Factu
Seller / Tin IDFactura / IDEmisorFactura
Seller / BusinessName NombreRazonEmisor
Buyer / Tin Destinatarios / IDDestinatario / NIF
Buyer / Country Destinatarios / IDDestinatario / IDOtro / CodigoPais
Buyer / DocumentType Destinatarios / IDDestinatario / IDOtro / IDType
Buyer / Tin Destinatarios / IDDestinatario / IDOtro / ID
Buyer / BusinessName Destinatarios / IDDestinatario / NombreRazon
ThirdParty / Tin Tercero / NIF
ThirdParty / Country Tercero / IDOtro / CodigoPais
ThirdParty / DocumentType Tercero / IDOtro / IDType
ThirdParty / Tin Tercero / IDOtro / ID
ThirdParty / BusinessName Tercero / NombreRazon
IsIssuedByRecipients EmitidaPorTerceroODestinatario
IsIssuedByThirdParties EmitidaPorTerceroODestinatario
Series IDFactura / NumSerieFactura
Number IDFactura / NumSerieFactura
DateAndTime IDFactura / FechaExpedicionFactura
IsSimplified TipoFactura
IsSimplifiedSubstitution TipoFactura
IsCorrective TipoFactura
CorrectiveKey TipoFactura
CorrectiveType TipoRectificativa
Correctives / Base ImporteRectificacion / BaseRectificada
Correctives / Quota ImporteRectificacion / CuotaRectificada
Correctives / Surcharge ImporteRectificacion / CuotaRecargoRectificado
Correctives / Series FacturasRectificadas o FacturasSustituidas / IDFacturaRectificada o IDFacturaSustituida / NumSerieFactura
Correctives / Number FacturasRectificadas o FacturasSustituidas / IDFacturaRectificada o IDFacturaSustituida / NumSerieFactura
Correctives / Date FacturasRectificadas o FacturasSustituidas / IDFacturaRectificada o IDFacturaSustituida / FechaExpedicionFactura
TransactionDate FechaOperacion
Description DescripcionOperacion
TotalTaxes CuotaTotal
Total ImporteTotal
TaxableBases / CauseExemption Desglose / DetalleDesglose / OperacionExenta
TaxableBases / NonExemptType Desglose / DetalleDesglose / CalificacionOperacion
TaxableBases / BaseOrAmount Desglose / DetalleDesglose / BaseImponibleOimporteNoSujeto
TaxableBases / TaxRate Desglose / DetalleDesglose / TipoImpositivo
TaxableBases / TaxFee Desglose / DetalleDesglose / CuotaRepercutida
TaxableBases / SurchargeTypeEquivalence Desglose / DetalleDesglose / TipoRecargoEquivalencia
TaxableBases / FeeSurchargeEquivalence Desglose / DetalleDesglose / CuotaRecargoEquivalencia
TaxableBases / EquivalenceRegime Desglose / DetalleDesglose / TipoRecargoEquivalencia
TaxableBases / CauseNotSubject Desglose / DetalleDesglose / CalificacionOperacion
TaxableBases / TaxableBaseAtCost Desglose / DetalleDesglose / BaseImponibleACoste
TaxableBases / VATKey Desglose / DetalleDesglose / ClaveRegimen
TaxableBases / TaxType Desglose / DetalleDesglose / Impuesto
IsSimplifiedArt7273 FacturaSimplificadaArt7273
IsNotBuyerArt61d FacturaSinIdentifDestinatarioArt61d
IsCoupon Cupon
{
"series": "string",
"number": "string",
"dateAndTime": "datetime",
"transactionDate": "datetime",
"isSimplified": boolean,
"isSimplifiedSubstitution": boolean,
"seller": {
    "tin": "string",
    "businessName": "string"
},
"buyer": {
    "tin": "string",
    "documentType": integer,
    "businessName": "string",
    "country": "string"
},
"thirdParty": {
    "tin": "string",
    "documentType": integer,
    "businessName": "string",
    "country": "string"
},
"isIssuedByThirdParties": boolean,
"isIssuedByRecipients": boolean,
"isCorrective": boolean,
"correctiveKey": integer,
"correctiveType": integer,
"correctives": [
    {
    "series": "string",
    "number": "string",
    "date": "datetime",
    "base": decimal,
    "quota": decimal,
    "surcharge": decimal
    }
],
"description": "string",
"totalTaxes": decimal,
"total": decimal,
"taxableBases": [
    {
    "taxType": integer,
    "causeExemption": integer,
    "nonExemptType": integer,
    "causeNotSubject": integer,
    "baseOrAmount": decimal,
    "taxRate": decimal,
    "taxFee": decimal,
    "surchargeTypeEquivalence": decimal,
    "feeSurchargeEquivalence": decimal,
    "equivalenceRegime": boolean,
    "taxableBaseAtCost": decimal,
    "vatKey": integer
    }
],
"isCoupon": boolean,
"isSimplifiedArt7273": boolean,
"isNotBuyerArt61d": boolean
}