Method: cancel
New cancellation process will come into effect on January 1, 2022, for more information see Cancelación CFDI 3.3, 4.0
The cancel method of the Webservice CFDI cancel one or more CFDI.
Emisión CFDI 4.0.CFDI 4.0 issuance can be used based on the following examples shown below.
-
The mandatory fields are represented as follows in the column “Required”:
- Sí: the value of this field must always be sent.
- No: The value of this field may or may not be sent.
- Condicional: this flied may be required or not, depending on other fields.
Parameters:
-
Name Description Required usuario xs:string
Username registered for the use of the Webservice.
Yes password xs:string
User password.
Yes solicitudesCancelacion Arrangement of SolicitudCancelacion
Data that serves as a parameter for searching for the CFDI to be cancelled.
Yes motivoCancelacion xs:string
The reason for cancellation is entered.
Yes
Attributes of the complex type SolicitudesCancelacion:Name Description Required folio xs:long
CFDI commercial folio
Conditional serie xs:string
CFDI Series
Conditional uuid xs:string
Cancellarion string that you specify
UUID: The document's fiscal folio (optional if the folio and series are sent)
Motivo :the key to the reason for cancellation of the SAT catalog
UUIDSustituye: Fiscal folio of the receipt that replaces the document being cancelled (can be omitted if FolioSustituye and SerieSustituye are specified).
FolioSustituye: Commercial folio of the receipt that replaces the document being cancelled (can be omitted if UUIDSustituye is specified).
SerieSustituye: Series of the receipt that replaces the document being cancelled (can be omitted if UUIDSustituyee is specified).In the format:
UUID|Motivo|UUIDSustituye|FolioSustituye|SerieSustituye
Conditional
Reasons for cancellation:
-
Code Description 01 Voucher issued with errors regarding. 02 Receipt issued with unrelated errors. 03 The operation was not carried out. 04 Nominative transaction related to a global invoice. When code 01 is selected, an additional field must be enabled to record the fiscal folio that replaces the receipt.
-
Cancel receipt 7812 of the FA series, which is replaced (motivo 01) by the related receipt 7813 of the same series.
Sample petition
-
Returns
- This method returns a composite type: RespuestaCancelacion the attributes are described in the following table.
-
Attributes of RespuestaCancelacionName Description Required status xs:int
The status code of the operation, for details of the status codes consult “General header response codes”
Yes mensaje xs:string
The response message details the status of the operation.
Yes resultados Arrangement of Resultados
An array of CFDIResultadoCancelacion, a composite type whose attributes are detailed in the table “Atributos de ResultadoCancelacion”
Conditional acuseSAT xs:string
Base64 message containing the cancellation acknowledgment.
Conditional Name Description Required detalle xs:string
The response message details the status of the operation.
Yes estatusUUID xs:string
SAT response status for the receipt that was sent for cancellation, for details of the cancellation status codes, consult “SAT response codes for CFDI cancellation".
Conditional folio xs:long
CFDI commercial folio
Conditional serie xs:string
CFDI Series
Conditional uuid xs:string
CFDI tax folio.
Conditional
Example answer
Example of response when ordering to cancel an already canceled CFDI
Example of response when a CFDI is NOT cancellable
Example of response when a CFDI requires authorization
Example of a retry response when the receipt requires authorization from the recipient
Example of response: Receipt not yet submitted to the SAT
General header response codes
General header response codes may contain more specific descriptions in the message. This status will be represented in the first node of the response.
- 201- Cancellable voucher without acceptance.
- 211- Cancellable voucher with acceptance or Cancellation is in process.
- 213- The cancellation request was rejected by the recipient.
- 500- Errors occurred that prevented the process from completing. Please try again.
Additional statusUUID codes for the new cancellation form
- 201- Canceled.
- 202- The voucher had already been cancelled.
- 203- Receipt to be cancelled does not correspond to the issuer.
- 204- The voucher cannot be cancelled.
- 205- Receipt not found.
- 208- The cancellation request date is greater than the declaration date.
UUIDs for proof of cancellation
UUIDs that can be used in the test environment that return this code 201, 202 and 204. |
E329DD15-7D0B-44E9-A204-51A7443D1FBE |
5B4B180D-5B6C-4392-B204-252215A1AB84 |
51D8A114-2BA6-40B8-C204-B9721791863B |
1BCA95C3-DA01-44C2-D204-59A9114F94BE |
F4621025-0864-4E62-E204-59EE41B1101E |
UUIDs that can be used in the test environment that return this code 211 and 213. |
C5E58106-6C1E-41C9-A211-FB8BAD1CABB0 |
38FB9AC9-DD3E-4601-B211-EB02C007C3BA |
CB917CA9-60D3-4A81-C211-76BD1A6B756D |
7C34D543-E6C9-4990-D211-3F767E0B5142 |
0D62B12C-BC6C-4626-E211-FC8FE727A5BC |
