Skip to main content
Key: es-verifactu-v1 Module: github.com/invopop/gobl

Sources

Correction Definitions

Auto-generation of corrective invoices or credit and debit notes is supported.

Extension Keys

One or all of the following extensions may be required as part of the correction options. See the Extensions section for possible values.
  • es-verifactu-doc-type

Scenarios

bill/invoice

Filters:
  • Types: standard
Output:
  • Extensions: es-verifactu-doc-type:F1
Filters:
  • Types: standard
  • Tags: simplified
Output:
  • Extensions: es-verifactu-doc-type:F2
Filters:
  • Types: standard
  • Tags: replacement
Output:
  • Extensions: es-verifactu-doc-type:F3
Filters:
  • Types: corrective, credit-note, debit-note
  • Tags: simplified
Output:
  • Extensions: es-verifactu-doc-type:R5

Extensions

Invoice Type Code

Code used to identify the type of invoice being sent. This will be determined automatically by GOBL during normalization according to the scenario definitions. The codes R2, R3, and R4 are not covered by GOBL’s scenarios and will need to be set manually if needed. Values correspond to L2 list.

Verifactu Correction Type Code

Correction type code used to identify the type of correction being made. Values map to L3 list. Code is determined automatically according to the invoice type:

Subject and Not Exempt Operation Class Code

Classification code for operations that are subject to tax and not exempt, or for operations not subject to tax. GOBL will attempt to automatically assign operation class codes based on tax key, but if your workflow requires more control, you may prefer to let users select the appropriate operation class and exemption code for each case. Tax keys will be normalized as described in the following table. Some keys will set a default value which can be overridden. This extension maps to the CalificacionOperacion field and must not be used together with the es-verifactu-exempt extension. Values correspond to the L9 list. For further guidance on applying these codes, refer to the AEAT FAQ:

Verifactu Exemption Code

Exemption code used to explain why the operation is exempt from taxes. This extension maps to the field OperacionExenta, and cannot be provided alongside the es-verifactu-op-class extension. Values correspond to the L10 list. The follow mappings will be made automatically by GOBL during normalization.

VAT/IGIC Regime Code

Identify the type of VAT or IGIC regime applied to the operation. This list combines lists L8A which include values for VAT, and L8B for IGIC. Maps to the field ClaveRegimen, and is required for all VAT and IGIC operations. Values correspond to L8A (VAT) and L8B (IGIC) lists. The regime code must be assigned for each tax combo. If no regime code is provided, GOBL will try to assign a code from the following tax combo contexts:

Identity Type Code

Identity code used to identify the type of identity document used by the customer defined in the L7 list. The regular Party Tax Identity is preferred over using a specific identity type code, and will be mapped automatically as follows:
  • Spanish Tax IDs will be mapped to the NIF field.
  • EU Tax IDs will be mapped to the IDOtro field with code 02.
  • Non-EU Tax IDs will be mapped to the IDOtro field with code 04.
VERI*FACTU will perform validation on both Spanish and EU Tax IDs, so it is important to provide the correct details. The following identity key values will be mapped automatically to an extension by the addon for the following keys: The 07 “not registered in census” code is not mapped automatically, but can be provided directly if needed. Example identity of a UK passport:
Will be normalized to:

Simplified Invoice Art. 7.2 and 7.3, RD 1619/2012

This extensions covers a specific use-case when the customer specifically requests that the invoice includes their fiscal details, but they are not registered for tax. Maps to the FacturaSimplificadaArt7273 field in Verifactu documents. Can only be true when the invoice type (TipoFactura) is one of: F1, F3, R1, R2, R3, or R4.

Issuer Type Code

Indicates whether the invoice is issued by a third party or by the customer themselves. Mapped to the field EmitidaPorTerceroODestinatario in Verifactu documents, with list L6. The self-billed tag will automatically be set this extension in the invoice to D. If the issuer field is set in the invoice’s ordering section, then this extension will be set to T.

Validation Rules