La LCO fue actualizada por última vez el 04/dic/2024
Timbrado.cancelarPorNotaCredito
Cancel an invoice via the creation of a credit note.
Any invoice to be canceled via this methods must comply with:
- The invoice must be an income invoice.
- Cannot be already canceled.
- Parameters
-
Name Description Required usuario xs:string
Username.Yes password xs:string
User's passwordYes uuid xs:string
UUID of invoice to be canceled.Yes derCertCSD xs:string
CSD to be use for the cancelation request, it must be the same used to generate the digital seal (sello digital) of the invoice.Yes derKeyCSD xs:string
Private key.Yes contrasenaCSD xs:string
Private key's password.Yes
Request example:
Download this example
Returns:
- This method returns a complex type: CFDIResultadoCertificacion, with the following attributes:
- CFDIResultadoCertificacion's attributes
-
Name Description Required status Operation status' code. See the cancelation response codes. Yes mensaje The response message, a string detailing the status. Yes uuid Fiscal id of the canceled invoice. Conditional versionTFD Version of the Timbre Fiscal Digital complement of the invoice. Conditional fechaTimbrado Date and time of stamping (timbrado) of the invoice (CFDI). Condicional 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. Conditional qrCode QR code of the invoice. The binary data of a .png image file. Conditional
Response example:
Download this example
Response 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.
- 311 - Unauthorized.
- 312 - Error while retrieving data from the SAT.