Service that allows the cancellation of Retenciones CFDI (the Mexican withholding and payments-information tax document), including their complements, by sending a signed XML or the issuer’s certificates (CSD or PFX).
motivo field is required in all 3 methods, and folioSustitucion only applies with motivo = "01".
Valid values for the motivo field
Required in the CSD and PFX 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 shape — what changes is how you send the cancellation data.
Response
The API returns the texts of message and messageDetail in Spanish, so they are shown here exactly as received.
status: "success" confirms that the cancellation request was received correctly — not that the document has already been cancelled with the SAT. Always check the code in data.uuid (see the codes table below) to learn the authority’s answer.
📋 Retenciones cancellation folio response codes
The data.uuid field of a 200 response returns one of these codes for each folio sent.
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.