Inicio  |  Timbrado  |  2.2. WebServices  |  2.2.1. WS Timbrado  |  2.2.1.1. Timbrado.timbrar Doc
La LCO fue actualizada por última vez el 16/ago/2022

2.2.1.1. Timbrado.timbrar

Receives an invoice (CFDI) for validation, if all validations pass, it is stamped (timbrar).
Returns the invoice (CFDI) with the Timbre Fiscal Digital complement.

Parameters:

Name Description Required
usuario Username. Yes
password User's password. Yes
cfdi Invoice's Byte array (binary) in XML format or, a zip with one or several Invoices(CFDI). Yes
ZIP Boolean value indicating whether the invoices are contained in a .zip file or not. No

Maximum request's size

The webservice's request cannot exceed 5MB. If it is greater the REST webservices must be used.

Request examples

Download this example.

Returns

This method returns the complex type: CFDICertificacion, with the following attributes:
Name Description Required
status Status' code of the operation. See here the available status codes. Yes
mensaje The response message, a string detailing the status. Yes
resultados Array of CFDIResultadoCertificacion, a complex type with the following attributes: No
CFDIResultadoCertificacion's attributes
Name Description Required
status Validation and stamping (timbrado) status of the invoice (CFDI). For more information See the Validation status codes. Yes
mensaje Message detailing the operation performed, or an error. Yes
uuid Fiscal ID of the invoice (CFDI) successfully stamped (timbrado). Conditional
versionTFD Version of the Timbre Fiscal Digital complement of the invoice. Conditional
fechaTimbrado Date and time of stamping (timbrado) of the invoice (CFDI).

Note: the time is expressed in GMT, if this value is used to construct the node: tfd:TimbreFiscalDigital the time must be converted to the Mexico's city time (Central Time Zone).

We do not recommend to construct the node: tfd:TimbreFiscalDigital with this value.

Recommendations

Conditional
selloSAT SAT's stamp, the Timbre Fiscal Digital stamp. Conditional
certificadoSAT Serial number of the SAT's certificate used to stamp (timbrar) the invoice (CDFI). Conditional
cadenaOriginal Orignal character string of the Timbre Fiscal Digital, or the Certificaciones complement. Conditional
cfdiTimbrado The stamped invoice, codified in base64. Conditional
qrCode QR code of the invoice. The binary data of a .png image file. Conditional

Response examples

Download this example.

Status codes

Timbrado:

200 - The operation was completed successfully.
500 - An error ocurred. The validation and certification proccess was not completed.
501 - Data Base conection error.
502 - Error while retrieving or saving data to the Data Base.
503 - It was not possible to guarantee the uniqueness of the voucher.
504 - Operation temporarily unavailable.
601 - Authentication error, username and/or password are incorrect.
602 - This user's account has been blocked.
603 - This user's password has expired.
604 - Maximum login attempts exceeded.
605 - This user is inactive.
640 - Inactive application.
1402 - The issuer's (emisor) information is not specified in this invoice.

Validating status codes:

200 - Invoice validated and stamped successfully.
301 - This invoice does not have a proper XML structure.
302 - The issuer's (emisor) seal (sello digital) is not valid.
303 - The certificate of the digital seal (Certificado de Sello Digital) does not belong to this issuer.
304 - The certificate is either revoked or expired.
305 - The invoice's date-time is out of the valid range in the certificate.
306 - The certificate used to create the digital seal (sello digital) is not a digital seal certificate (Certificado de Sello Digital).
308 - The certificate used to create the digital seal (sello digital) was not issued by the SAT.
401 - The invoice's stamping date-time (fecha timbrado )is out of the valid range.
402 - The issuer is not in a fiscal regime proper for invoice issuing.
403 - The invoice's issuing date cannot be before January 1st 2011.
405 - The date of issuance of the voucher is outside the validity of this version of CFDI.
611 - One or several parameters are missing or misplaced.
612 - The XML file or some of its attributes is/are malformed.
620 - Permission denied.
621 - Invalid data. The specified invoice's XML format is not valid.
630 - This implementation is out of stamps (timbres) for invoice stamping (timbrado de cfdi).
631 - The issuer is out of stamps (timbres) for invoice stamping (timbrado de cfdi).
632 - Maximum permited usage per transaction reached.
633 - Either a production account is being used in the testing environment, or a testing account is being used in the production environment.

Primary sector status codes

311 - Unauthorized.
312 - Error while retrieving data from the SAT.

Recommendations regarding invoice stamping (timbrado de comprobantes)

  • Note: If you try to stamp (timbrar) an invoice, which had already been processed by Solución Factible®, no further validation on the digital seal (sello digital) will be made. Therefore the error code
    307 - The CFDI has already been stamped
    is nullified.

  • When due to a connection error or problem with the webservice a retry to stamp an invoice is performed, you should always send the very same invoice. An invoice's uniqueness is defined by its orginal character string.
    Therefore if you send an invoice with the commercial folio number 14 and series 'F' twice but with different issuing date-times, or any other value changed, wich alters the original character string (the commercial folio number and series do not affect it) both attempts will be considered different and valid.

  • The namespaces and schemaLocation declarations of the complements must be declared in the parent node of each complement. If they are declared in the root node of the invoice, the webservice will try to 'normalize' it, assigning each declaration in its proper place, however you can speed this process up if you declare them as per our recommendation.

  • The timbrar method's response is comprised by several status responses, a general/header one, and another for each invoice to be processed.

  • The invoice UUID is considered its own notice of receipt

Datos de contacto
comments powered by Disqus