Key: es-verifactu-v1

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

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:
Invoice TypeCode
correctiveS
credit-noteI
debit-noteI

Verifactu Operation Classification/Exemption Code

Operation classification code used to identify if taxes should be applied to the line. VERI*FACTU makes a clear distinction between “subjected” and “exempt”, while GOBL only recognises “exempt”, implying that there is simply no percentage. Mapping between the two can thus become confusing. GOBL will try to automatically map tax rates to operation classes, but if your system requires needs to offer tighter control to users, it may be easier to ask them to choose which combination of operation class and exemption code applies to their use-case. The following tax rates will be mapped automatically to operation classes:
Tax RateOperation Class
standardS1
reducedS1
super-reducedS1
zeroS1
exemptN1
exempt+reverse-chargeS2
exempt+exportN2
This extension maps to the field CalificacionOperacion, and cannot be provided alongside the es-verifactu-exempt extension. Values correspond to the L9 list. For details on how best to use and apply these and other codes, see 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. No attempt will be made by GOBL to automatically map tax rates to exemption reason codes, they will need to be determined and applied on a case-by-case basis.

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:
Combo ContextRegime Code
Rate standard01
Rate has export02
Has surcharge18

Identity Type Code

Identity code used to identify the type of identity document used by the customer. Codes 01 and 02 are not defined as they are explicitly inferred from the tax Identity and the associated country. 01 implies a Spanish NIF, and 02 is applied when the Tax ID is foreign VAT (or other tax) number. Corresponds to the IDType field and L7 list. The following identity keys will be mapped automatically to an extension by the addon for the following keys:
  • passport: 03
  • foreign: 04
  • resident: 05
  • other: 06
The 07 “not registered in census” code is not mapped automatically, but can be provided directly if needed. Here is an example of an identity:
{
	"identities": [
		{
			"key": "passport",
			"country": "GB",
			"code": "123456789"
		}
	]
}
And in normlized form:
{
	"identities": [
		{
			"key": "passport",
			"country": "GB",
			"code": "123456789",
			"ext": {
				"es-verifactu-identity-type": "03"
			}
		}
	]
}

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.