Cancellation of CFDI with estatus

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.

✓ Before you start
1 Get a Bearer Token with your SW username and password. We recommend using an infinite token.
2 Before cancelling, we recommend checking the related CFDIs so that the process runs correctly.
3 If you are going to cancel by UUID, first upload the issuer’s CSDs to your account. If you are going to use PFX and do not have one, here is how to create a PFX. In testing you can use the SAT valid test CSDs.
4 Review the cancellation reasons table below: the motivo field is required in all 3 methods, and folioSustitucion only applies with motivo = "01".
5 Have the exact rfcReceptor and total of the invoice at hand — this service uses them to query the status with the SAT, in addition to cancelling.
🚨 Important: if 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).
💡 Important note: this service is not recommended for bulk cancellations or high cancellation volumes. For that kind of operation, use CFDI Cancellation (no status query, much lighter per request), or CFDI Cancellation V2 if you also want the folio code description.

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.

Code
Description
Requires folioSustitucion?
01
Invoice issued with errors with relation
✅ Yes, required
02
Invoice issued with errors, without relation
❌ Do not send
03
The transaction did not take place
❌ Do not send
04
Nominal transaction related to global invoice
❌ Do not send

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.

POST

Request Example


        
💡 Important note: these examples are the direct REST call.

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.


        
💡 Important note: 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.

Field
Possible values
statusSat
VigenteCancelado
statusCodeSat
N 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.
isCancelable
Cancelable con aceptaciónCancelable sin aceptaciónNo cancelable
statusCancelation
nullEn 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.

Code
Message
Description
201
Solicitud de cancelación exitosa.
Considered a successful cancellation request; however, this does not guarantee the cancellation.
202
Folio Fiscal Previamente Cancelado.
Considered a previously submitted cancellation request. Status: Cancelled with the SAT.
203
Folio Fiscal No Correspondiente al Emisor.
The fiscal folio does not belong to the issuer of the cancellation request.
204
Folio Fiscal No Aplicable a Cancelación.
The fiscal folio is not valid for cancellation.
205
Folio Fiscal No Existente.
The SAT allows a 48-hour grace period for the invoice to appear as Valid after stamping. Wait at least 48 hrs.
206
UUID no corresponde a un CFDI del Sector Primario.
The UUID does not correspond to a Primary Sector CFDI.
207
No se especificó el motivo o el motivo no es válido.
The substitution UUID does not exist, is cancelled, or has an issue date earlier than the original.
208
Folio Sustitución inválido.
The substitution folio is invalid.
209
Folio Sustitución no requerido.
The substitution folio is not needed for this reason.
210
Fecha de cancelación mayor a la de declaración.
The cancellation request date is later than the filing date.
211
Límite de cancelación de factura global.
The request date exceeds the limit allowed for a global invoice.
212
Relación no válida o inexistente.
The specified relationship is not valid or does not exist.
300
Usuario No Válido.
The user who made the request is not valid.
301
XML Mal Formado.
The request contains invalid information, e.g. an invalid receiver RFC.
302
Sello Mal Formado.
The digital signature of the cancellation receipt is invalid or malformed.
304
Certificado Revocado o Caduco.
The certificate is invalid due to its type, validity period or another reason.
305
Certificado Inválido.
The certificate is invalid due to its type, validity period or another reason.
309
Certificado Inválido.
The certificate is invalid due to its type, validity period or another reason.
310
CSD Inválido.
The Digital Seal Certificate (CSD) is invalid.
311
Motivo inválido.
Invalid cancellation reason code.
312
UUID no relacionado.
UUID not related according to the cancellation reason code.
This method does not send a body: all the information goes in the path.
This method does not take path parameters: all the information goes in the body.
This method does not take path parameters: all the information goes in the body.

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.

How useful was this post?

Click on a star to rate it!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Updated on octubre 14, 2026

Related Articles