Inicio  |  Timbrado  |  2.2. WebServices  |  2.2.1. WS Timbrado  |  2.2.1.3. Timbrado.cancelar Doc
La LCO fue actualizada por última vez el 15/abr/2024

2.2.1.3. Timbrado.cancelar Doc

Note: we recommend the webservice method: cancelarAsincrono be use instead.

Cancel one or several invoices.

Cancelation examples in testing environment

If you prefer to avoid sending the certificates (files .cer & .key) you can invoke the method: enviarSolicitudCancelacion which receives the cancelation request already created and signed.

Parameters:

Name Description Required
usuario Username. Yes
password User's password Yes
uuids String array of fiscal ids (UUIDs) of each invoice. Yes
derCertCSD CSD to be use for the cancelation request, it must be the same used to generate the digital seal (sello digital) of the invoice. This value is expected to be base64-codified Yes
derKeyCSD CSD's private key, it must be the same used to generate the digital seal (sello digital) of the invoice. This value is expected to be base64-codified Yes
contrasenaCSD Private key's password, it must be the same used to generate the digital seal (sello digital) of the invoice. Yes

Request example :

Download this example

Returns:

This method returns a complex type: CFDICancelacion, with the following attributes:
Name Description Required
status Operation status' code. See the cancelation response codes. Yes
mensaje The response message, a string detailing the status. Yes
resultados Array of complex type: CFDIResultadoCancelacion , with the following attributes: No
CFDIResultadoCancelacion attributes
Name Description Required
status Invoice cancelation status' code. Yes
mensaje The response message, a string detailing the status. Yes
uuid Fiscal id of the canceled invoice. Yes
statusUUID SAT's response status for the invoice to be canceled. Conditional

Response example:

Download this example

Note: if you need the cancelation's notice of receipt in SOAP XML be present in the webservice's response please consult the webservice: Cancelar

Response codes

Cancellation response codes:

Response code for the validation of the cancellation request prior to sending the request to the SAT service

Code message
200 The cancellation process completed successfully.
211 The CFDI cancellation request with fiscal folio XXXXXXXXXX is in process.
500 An error occurred. The validation and certification process was not completed.
501 An internal database communication error has occurred, try again.
601 Authentication error, username and/or password are incorrect.
602 his user's account has been blocked.
603 This user's password has expired.
604 Maximum login attempts exceeded.
605 This user is inactive
611 Received data is incomplete or not where expected.
620 Permission denied.
621 Invalid argument format or structure for the data type.
630 The implementation has no folios available.
631 The user's account has no timbres available.
633 Improper use of production account in tests or test account in production.
640 Inactive application.
1701 The CSD's public & private keys do not match.
1702 The private key's password is incorrect.
1703 The private key does not have the proper structure.
1704 The private key is not a RSA key.
1710 The certificate's structure does not have a proper X509 structure.
1711 The certificate is not yet valid.
1712 The certificate has expired.
1713 The public key in this certificate is not a RSA key.

SAT cancellation request status codes:

They correspond to the CodEstatus in the response of the SAT cancellation service

Code message
CFDI Cancellation CodEstatus
300 Invalid User.
301 Malformed XML.
302 Malformed Seal.
304 Revoked or Expired Certificate.
305 Invalid Certificate.
310 Invalid CSD.
CodeStatus of Retentions CFDI cancellation
1300 Invalid authentication.
1301 Malformed XML.
1302 Invalid folios structure.
1303 Invalid RFC Structure.
1304 Invalid date structure.
1305 Certificate does not correspond to the issuer.
1306 Certificate not valid.
1307 Use of FIEL not permitted.
1308 Certificate revoked or expired.
1309 Malformed or invalid signature.
1313 Request outside the annual declaration.
1314 invalid relation.

SAT UUID Status Codes:

Corresponding to the status of each UUID for which cancellation has been requested, returned by the SAT cancellation service

Code message
201 Cancellation request received.
202 Folio Fiscal Previously Canceled
203 Folio Fiscal Not Corresponding to the Issuer.
204 Folio Fiscal Not Applicable to Cancellation.
205 Non-existent Folio Fiscal.
206 UUID does not correspond to a CFDI of the Primary Sector.
207 Folio substitution Invalid.
208 The Cancellation Request Date is greater than the declaration date.
209 The Cancellation Request Date limit for global invoice.
310 Invalid CSD.
311 Invalid Cancellation Reason Key.
312 Unrelated UUID according to cancellation reason key.
UUID Status of Retentions CFDI Cancellation
1201 Cancellation request received.
1202 UUID Previously Canceled
1203 UUID does not match the issuer
1205 UUID does not exist

Note: one can only be certain an invoice has been canceled when its statusUUID is 202 (The invoice had already been canceled).

Datos de contacto
comments powered by Disqus