2.2.1.5. Timbrado.enviarSolicitudCancelacion Doc
Note: we recommend the webservice method: enviarSolicitudCancelacionAsincrono. be use instead.
Sends a cancelation requests according to the standard defined in the Annex 20 of the RMF.
By invoking this method it is implied that the invoice to be canceled is already signed and with the proper XML structure.
If you prefer that Solución Factible® be the one to handle the signing and the cancelation request creation, you should use the method cancelar.
- Parameters
-
Name Description Required usuario Username. Yes password User's password. Yes solicitudCancelacion Cancelation request in base64. Yes
Request example
Download this example
Cancelation request according to Annex 20
- Download the SAT's Annex 20
section II, item D for additional documentation.
- To see the specifications for the signing click
here.
- To validate the signature you can check the
Verificador de Firma digital XML (XML digital signature verifier)
.
Download this cancelation 3.2 example
Download this example for cancelation of withholdings and payment information 1.0 (Retenciones e información de Pagos 1.0)
Returns:
- This method returns the complex type: CFDICancelacion, with the following attributes:
-
Name Description. Required status Operation status' codes. See cancelation response codes. Yes mensaje Response message, a string detailing the operation status. Yes resultados A CFDIResultadoCancelacion array, with the following attributes. No
- CFDIResultadoCancelacionAttributes
-
Name Description Required status Invoice cancelation status. Yes mensaje Operation's detailed message or error description. Yes uuid Fiscal id (UUID) of the canceled invoice. Yes statusUUID SAT's response status for the invoice to be canceled. Conditional
Timbrado.enviarSolicitudCancelacion successful response:
Download this example
Timbrado.enviarSolicitudCancelacion error response:
Download this example
Response codes
Cancelation:
- 200 - The operation process completed successfully.
- 500 - An error ocurred. The proccess was not completed.
Invoice cancelation status
- 200 - The cancelation process completed successfully.
- 500 - An error ocurred. The cancelation proccess was not completed.
- 620 - Permission denied.
SAT's response status
- 201 - The invoice has been canceled successfully.
- 202 - The invoice had already been canceled.
- 203 - The UUID does not match the issuer (emisor).
- 205 - The UUID does not exists, or has not been processed by the SAT.
- 301 - The cancelation request structure is not valid.
- 302 - The digital signature of the cancelation request is not valid.
- 303 - The CSD used to generate the digital signature for this cancelation request does not match the issuer of the invoice to be canceled.
- 304 - The CSD used to generate the digital signature has either been revoked or expired.
enviarSolicitudCancelacion response codes
- 1801 - The cancelation request is malformed.
- 1802 - The cancelation request's signature is not valid.
- 1803 - The value is not a valid UUID.
- 1804 - The maximum number of UUIDs permitted per operation has been reached.
Additional codes for the new cancelation procedure
- 202 - The invoice had already been canceled
- 204 - The invoice cannot be canceled
- 211 - The cancelation is currently being processed
- 213 - The cancelation request was denied by the invoice's recipient
These UUIDs which can be used in the testing environment, return this code |
E329DD15-7D0B-44E9-A204-51A7443D1FBE |
5B4B180D-5B6C-4392-B204-252215A1AB84 |
51D8A114-2BA6-40B8-C204-B9721791863B |
1BCA95C3-DA01-44C2-D204-59A9114F94BE |
F4621025-0864-4E62-E204-59EE41B1101E |
These UUIDs which can be used in the testing environment, return this code |
C5E58106-6C1E-41C9-A211-FB8BAD1CABB0 |
38FB9AC9-DD3E-4601-B211-EB02C007C3BA |
CB917CA9-60D3-4A81-C211-76BD1A6B756D |
7C34D543-E6C9-4990-D211-3F767E0B5142 |
0D62B12C-BC6C-4626-E211-FC8FE727A5BC |