Documentation Index
Fetch the complete documentation index at: https://mintlify.com/mdiago/VeriFactu/llms.txt
Use this file to discover all available pages before exploring further.
VeriFactu requires a valid digital certificate issued by a Certification Authority (CA) recognised by the AEAT to sign all SOAP messages and authenticate submissions. Without a correctly configured certificate, any attempt to send records to the AEAT will fail. The certificate can be loaded in two ways: from a .pfx or .p12 file stored on the filesystem, or by selecting an installed certificate from the Windows certificate store by serial number or thumbprint.
The certificate must be valid, non-expired, and issued by a CA trusted by the
AEAT. Expired or revoked certificates will cause all VERI*FACTU submissions to
be rejected with an authentication error. Renew your certificate before its
expiry date and update the configuration accordingly.
Cargar desde archivo (.pfx / .p12)
Use the CertificatePath and CertificatePassword properties to load a certificate directly from the filesystem. This approach works on all platforms (Windows, Linux, macOS).
| Propiedad | Tipo | Descripción |
|---|
CertificatePath | string | Ruta completa al archivo .pfx o .p12 del certificado digital. |
CertificatePassword | string | Contraseña de acceso al archivo de certificado. Solo es necesaria si el archivo está protegido con contraseña. |
// Valores actuales de configuración de certificado
Debug.Print($"{Settings.Current.CertificatePath}");
Debug.Print($"{Settings.Current.CertificatePassword}");
// Establezco nuevos valores
Settings.Current.CertificatePath = @"C:\MiCertificado.pfx";
Settings.Current.CertificatePassword = "mi_contraseña";
// Guardo los cambios
Settings.Save();
CertificatePassword sólo se utiliza cuando se carga el certificado desde el
sistema de archivos mediante CertificatePath. Si selecciona el certificado
desde el almacén de Windows, esta propiedad se ignora.
Cargar desde el almacén de Windows
On Windows, you can select a certificate already installed in the system or user certificate store using either its serial number (CertificateSerial) or its thumbprint / SHA-1 fingerprint (CertificateThumbprint). Only one of the two values is needed.
| Propiedad | Tipo | Descripción |
|---|
CertificateSerial | string | Número de serie del certificado tal como aparece en el almacén de certificados de Windows. VeriFactu lo utiliza para localizar y cargar el certificado correcto. |
CertificateThumbprint | string | Huella digital (SHA-1) del certificado. Alternativa al número de serie para identificar el certificado en el almacén de Windows. |
Seleccionar por número de serie
// Seleccionar el certificado por número de serie
Settings.Current.CertificateSerial = "3A7B2C1D0E9F8A6B5C4D3E2F1A0B9C8D";
Settings.Current.CertificatePath = ""; // No se usa carga desde archivo
Settings.Current.CertificatePassword = ""; // No aplica
Settings.Save();
Seleccionar por huella digital (thumbprint)
// Seleccionar el certificado por thumbprint (SHA-1)
Settings.Current.CertificateThumbprint = "A1B2C3D4E5F6A7B8C9D0E1F2A3B4C5D6E7F8A9B0";
Settings.Current.CertificatePath = ""; // No se usa carga desde archivo
Settings.Current.CertificatePassword = ""; // No aplica
Settings.Save();
You can find the serial number and thumbprint of an installed certificate in the Windows Certificate Manager (certmgr.msc) under the certificate’s Details tab.
Tabla resumen de propiedades
| Propiedad | Tipo | Cuándo se usa |
|---|
CertificatePath | string | Ruta al archivo .pfx / .p12. Necesario cuando se carga el certificado desde el sistema de archivos. |
CertificatePassword | string | Contraseña del archivo de certificado. Solo necesaria si CertificatePath está establecido y el archivo tiene protección con contraseña. |
CertificateSerial | string | Número de serie para seleccionar un certificado del almacén de Windows. Alternativo a CertificateThumbprint. |
CertificateThumbprint | string | Huella digital SHA-1 para seleccionar un certificado del almacén de Windows. Alternativo a CertificateSerial. |