Method: cancelar
(cancel)A new process for canceling invoices will come into effect on September 1 2018, for more information on this see page: Cancelación CFDI 3.3
The Webservice CFDI33 cancelar cancels one or several Invoices.
-
A field is required if thus stated in column "Required":
- Yes: this field is required.
- No: this field is not mandatory.
- Conditional: this field may be required or not, depending on other fields.
- Parameters:
-
Name Description Required usuario xs:string
Registered username.
Yes password xs:string
User's password.
Yes solicitudesCancelacion Compound type solicitudesCancelacion
Searching criteria for the invoice to be canceled.
Yes
solicitudesCancelacion's fields- Search criteria may be:
- UUID only or
- Commercial folio and serie
Name Description Required folio xs:long
The commercial number of this invoice.
Conditional serie xs:string
The serie fo this invoice.
Conditional uuid xs:string
The fiscal identifier of this invoice.
Conditional motivoCancelacion xs:string
Reason of cancellation.
No
Request example
Returns
- The method returns a compound type: RespuestaCancelacion, whose fields are described in the following table.
-
RespuestaCancelacion's fieldsName Description Required status xs:int
Operation-status code, for more detail check the table Operation's status codes.
Yes mensaje xs:string
Detailed message of the operation's success/error.
Yes resultadosCancelacion Compound type ResultadoCancelacion
Compound type, one for each canceled invoice's result.
Yes acuseSAT xs:string
SAT's cancellation acknowledgement in 64base encoding.
Yes Name Description Required detalle xs:string
Message detailing the current status of the invoice. ("Canceled", "This invoice had already been canceled", etc).
Yes estatusUUID xs:string
Invoice's current status code
Conditional folio xs:long
Canceled invoice commercial folio
Conditional serie xs:string
Canceled invoice series
Conditional uuid xs:string
Canceled invoice fiscal folio
Conditional
Response example
Response example of a cancelation attempt of an already canceled invoice
Name | Description | Required |
estatus | xs:string Operation-status code. |
Yes |
mensaje | xs:string Detailed message of the operation's success/error. |
Yes |
Response example of an invoice which CANNOT be canceled
Name | Description | Required |
estatus | xs:string Operation-status code. |
Yes |
mensaje | xs:string Detailed message of the operation's success/error. |
Yes |
Response example for an invoice that requires authorization
Name | Description | Required |
estatus | xs:string Operation-status code. |
Yes |
mensaje | xs:string Detailed message of the operation's success/error. |
Yes |
Respones example - Retry of cancelation attempt for an invoce that requires authorization
Name | Description | Required |
estatus | xs:string Operation-status code. |
Yes |
mensaje | xs:string Detailed message of the operation's success/error. |
Yes |
Ejemplo de respuesta Comprobante aún no entregado al SAT
Name | Description | Required |
estatus | xs:string Operation-status code. |
Yes |
mensaje | xs:string Detailed message of the operation's success/error. |
Yes |
-
Operation's status codes
More detailed descriptions may appear in mensaje field
- 200 — Process successful.
- 500 — The process could not be finished due to errors. Please retry.
- 501 — Failed attempting to connect to Database. Please retry.
- 502 — Failed attempting to store or retrieve data from Database.
- 503 — The maximum number of concurrent Database access attempts has been reached.
- 601 — Authentication error, please verify your credentials.
- 602 — This account is blocked.
- 603 — The account's password has expired.
- 604 — The maximum number of retry attempts due to failed authentication has been reached. The account will be blocked.
- 610 — The requested action is not supported in you implementation because either the implementation is not yet configured for such an action or is not possible its accomplishment. For the importar method this means your implementation has no connector configured yet.
- 611 — One or several required fields are missing in the request.
- 612 — Malformed file. The file format is different to the one expected.
- 613 — The numeric sequence has reached the end.
- 620 — You do not have permission to do this action.
- 621 — Invalid field.
- 622 — Unsupported action.
- 623 — Data not found.
- 624 — Uniqueness restriction violation.
- 625 — This action cannot be completed because it requires a previous action to complete.
- 626 — Implementation's configuration error.
- 630 — Your implementation's contract has expired.
- 631 — Your contract's payment date has passed.
- 632 — The maximum number of usage attempts for this implementation has been reached.
- 633 — This implementation is inactive.
3.3 cancelation's additional status codes
- 201 - Could not cancel the invoice. SAT has responded with error code: [205]
- 202 - The invoice had already been canceled
- 204 - The invoice cannot be canceled
- 211 - The cancelation is still in process
- 213 - The cancelation request was denied by the invoice's receiver
UUIDs that can be used in the testing environment that return this status code |
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 testing environment that return this status code |
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 |