Submit the cancellation request for an invoice by UUID, CSD or PFX and then query its status with the SAT; both results are returned in a single response.
motivo field is required in all 3 methods, and folioSustitucion only applies with motivo = "01".
rfcReceptor and total of the invoice at hand — this service uses them to query the status with the SAT, in addition to cancelling.
rfcReceptor and/or total do not exactly match the CFDI you are cancelling, the cancellation is still processed, but the status validation will return the error “No encontrado” (not found; see the possible SAT status values below).
Valid values for the motivo field
Required in all 3 methods. folioSustitucion is only sent when motivo = "01"; for any other value, omit it entirely.
URLs
Select your active environment. The copy buttons and the code examples below are built with the base URL you choose here.
🔗 Endpoint
All 3 methods return the same response — what changes is the information you send.
Response
The API returns the texts of message, messageDetail and the status fields (statusSat, statusCodeSat, isCancelable, statusCancelation) in Spanish, so they are shown here exactly as received.
data.statusSat is what actually confirms what happened with the SAT. A status: "success" only indicates that the request was processed — always check that field (and data.uuid, with the folio code) before treating an invoice as cancelled.
📋 Possible values of the status query
The statusSat, statusCodeSat, isCancelable and statusCancelation fields of data can return the following values. The API returns these values in Spanish, exactly as listed.
VigenteCanceladoN 601 The printed expression provided is not valid. This response code is returned when the validation request did not follow the defined format.N 602 Invoice not found. This response code is returned when the invoice UUID is not found in the SAT database.S Invoice successfully retrieved.Cancelable con aceptaciónCancelable sin aceptaciónNo cancelablenullEn procesoPlazo vencidoSolicitud rechazadaCancelado sin aceptaciónCancelado con aceptación📋 Cancellation folio response codes
The data.uuid field of a 200 response returns one of these codes for each folio sent. The 8 most common are shown; 13 more are available below. In the API response, Message and Description come in Spanish: the Message column shows the literal text, and Description is translated here for reference.
In SW® we strive to be the best for You, wich is why your opinion is very important. Please help us by rating this article and leaving your comments.