Cancellation of CFDI V2

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. This version returns a richer response: each folio includes its code, message and description, instead of the code alone. V2 coexists with V1 — adopting it is entirely optional.

✓ 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 invoice status and 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 (ADT portal or certificates API). In testing you can use the SAT valid test CSDs.
4 Review the cancellation reasons table below: the motivo field is required in all 4 methods, and folioSustitucion only applies with motivo = "01".
5 Already using CFDI Cancellation (V1)? There is no need to migrate: V2 only adds detail to the response; the rest of the contract is identical.
💡 Important note: 👉 For compatibility reasons, even though the path of our services says /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.

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 4 methods return the same response — what changes is the information you send.

POST

XML Example

Structure of the signed <Cancelacion> that is sent as a file in the request. Choose the case you need.

XML

        

Request Example


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

Response

All 4 methods share exactly the same response shape. The API returns the texts of message, description and messageDetail in Spanish, so they are shown here exactly as received.


        
💡 Important note: status: "success" confirms that the cancellation request was received correctly — not that the invoice has already been cancelled with the SAT. Always check the code inside data.uuid (see the codes table below) to learn the authority’s answer — in V2 you no longer need to cross-reference it against the table yourself, because message and description are included in the same response. We still 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. 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.
Cancellation request previously sent. 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.
This method does not take path parameters: all the information goes in the XML file.

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