Specialized web service for stamping digital tax invoices over the Internet, to which the issuer sends the signed CFDI and with the structure required by the SAT.
The application validates that the invoice meets the technical specifications and carries out the stamping process. As a result the TFD (Digital Tax Stamp) is returned to be incorporated into the CFDI XML.
Navigation menu
Documentación en español
The following is the link for CFDI stamping in the production environment.
Productive environment
Digital certificate that guarantees the authenticity of the website. It has the function of activating the HTTPS protocol and enabling a secure connection from the server to the client. We share the certificate with you in case you need to install it in your trusted certificates directory.
This web service counts on the following methods to execute the required functions:
TimbrarCFDi
It receives the XML to be stamped as an input parameter.
It delivers the TFD complement (Digital Fiscal Stamp) for the CFDI.
RecuperarTFD
It receives the stamped CFDI's identifier and its UUID.
It delivers the TFD complement (Digital Fiscal Stamp) of a previously stamped CFDI.
ObtenerHoraServidor
No input parameters required.
It delivers the stamping server's hour (Mexico central standard time)
ObtenerClaveConfirmacion
It receives the issuer's RFC (Mexican tax id) as an input parameter.
It delivers the confirmation code to be able to issue a CFDI with big amounts or exchange rates that are out of the established range.
RecuperarAcuseEnvio
It receives the UUID (fiscal number) of the stamped invoice.
It delivers the acknowledgment of receipt that the SAT returns when a stamped CFDI is delivered.
They describe the flow, URL, methods, parameters, and examples of the web service:
Due to the configuration of the web service, it is necessary to include the "WS-Addressing" and "wsa:To" options in the request header.
Additionally, it is required to activate secure protocol management and the "Endpoint Reference" option.
The way to build or declare the SOAP header varies depending on the programming language used.
The configuration of the SoapUI - program with which test requests can be made to the stamping WS - is shown as an example.
The TimbrarCFDi method will return a code in the ErrCode parameter in case of error.
301 XML syntax error
302 Malformed or invalid signature
303 Certificate does not correspond to the issuer
304 Certificate revoked or expired
305 The invoice issue date is not within the validity of the Issuer's certificate
306 The certificate is not of type CSD
307 The CFDI has been previously stamped
308 Certificate not issued by the SAT
401 Issuing date and time out of range
402 The RFC of the issuer is not in the taxpayer regime list
403 The issue date is not later than January 1, 2012
Additionally, a message will be returned with the specific description of the error based on the validation matrix of the CFDI and/or the corresponding complement.
The XML files sent to the stamping web service must comply with the specifications and validations for CFDI.
In the following link you will find the corresponding technical documentation by the SAT.
Additionally you can find here a translation of the CFDI structure.
CFDI 4.0 stamped examples
The following are code examples to invoke the stamping WS: