CryptoSys Home > FirmaSAT > Retenciones

Support for Retenciones e información de pagos


As of version 6.0 and above, FirmaSAT now supports the analysis and signing of Retenciones documents (Retenciones e información de pagos).

This works generally in the same way as for CFDi documents. Just pass the Retenciones file as input to the functions and FirmaSAT will deal with it.

Identifying a Retenciones document

To identify an XML file as a Retenciones document, use the Get XML ReceiptVersion Number functions. These will return 1010 for a Retenciones version 1.0 document (yes, we know this makes the name of the function less appropriate, but we'll live with it).

Differences in names of important attributes

Same information. Different names.

CFDiRetencionesComment
certificadoCertX.509 certificate contents in base64 form
noCertificadoNumCertSerial number of X.509 certificate in 20-digit S.A.T. form
selloSelloSignature in base64 form. Note lower- and upper-case letter 's'

Important difference

The big important difference is that the NumCert field is included in the signature for a Retenciones document, but the equivalent noCertificado field was not included for CFDi documents.

This means that you must set the value of the NumCert field in your input XML document before signing the file or computing the hash digest.

With a CFDi document you could set this to a 20-digit dummy value like "00000000000000000000" which would then be overwritten by the SignXML function. With a Retenciones document, you have to set this to the correct value of your signing certificate's serial number before using the FirmaSAT functions.

To get the serial number from your .CER file use the Get Certificate Serial Number functions.

Contact us

To contact us or comment on this page, please send us a message.

This page last updated 15 August 2025