Cancel your invoices with the method that best fits your integration: by UUID (using the CSDs already uploaded to your account), by sending the CSD or the PFX directly, or by sending a signed XML — the latter supports bulk cancellation of several folios in a single request.
motivo field is required in all 4 methods, and folioSustitucion only applies with motivo = "01".
/cfdi33, this same endpoint accepts the current CFDI version.
Valid values for the motivo field
Required in all 4 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 4 methods return the same response — what changes is the information you send.
XML Example
Structure of the signed <Cancelacion> that is sent as a file in the request. Choose the case you need.
Request Example
Response
All 4 methods share exactly the same response shape. The API returns the message and messageDetail texts in Spanish, so they are shown here exactly as received.
status: "success" confirms that the cancellation request was received correctly — not that the invoice has already been cancelled with the SAT. Always check the value of data.uuid (see the codes table below) to learn the authority’s answer, and we also recommend running a separate status query.
📋 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. The Message column shows the literal text returned by the API (in Spanish).
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.