CFDI Cancellation

Ruby
PHP
Javascript
.Net >= 4.5
Java
Phyton
  1. The issuers must send the request for cancellation of the invoice through Facturama.
  2. When acceptance for cancellation is required, the recipient of the invoice will receive a notification through the WebHook Informing that there is a petition for a cancellation
  3. ​ The recipient must indicate acceptance or rejection of the cancellation through the corresponding request Within
  4. In case the request for cancellation does not require acceptance by the recipient, the invoice will be canceled immediately.

You can check the invoices pending acceptance by:

* The value of "status" should be pending

Request the cancellation of a CFDI:

Structure of the URL

DELETE


    https://api.facturama.mx/cfdi/{cfdiId}?type={type}
     
    Example:
    https://api.facturama.mx/cfdi/jhQS4AaCO4bIwqcv5UHYCw2?type=issued
CFDI identifier

Example: jhQS4AaCO4bIwqcv5UHYCw2

Type of the CFDI (Select one of the available ones)

Available values for Web API:

  • issued = issued invoice
  • received = received invoice
  • payroll = payroll invoice

Cancellation request response

The response to "HTTP Response" if the request was successful returns a 200
Including the status of the invoice

Example of canceled invoice

    {
        "Status": "canceled",
        "Uuid": "41A49A5E-7E57-4339-88F9-DEEE9B901B55",
        "RequestDate": "2018-11-14T10:21:43",
        "ResponseDate": "2018-11-17T10:21:43",
        "ExpirationDate": "2018-11-17T10:21:43",
        "AcuseXmlBase64": "PD94bWwgdmVyc2lvbj0iMS...3VzZT4="
    }

The details of the cancellation status are:

CFDI UIID
Cancellation request date
Response date of the cancellation request
Deadline for the recipient to issue a response
Acuse XML in Base64 format, only has an acknowledgment when it is already canceled (and not canceled directly with the SAT)
CancellationStatus :
  • canceled = Cancelada
  • active = Active, you can not cancel, because you have related documents
  • pending = Pending acceptance, requires a response from the receiver (you have up to 72 hours to respond)
  • acepted = Application for cancellation accepted (by the receiver)
  • rejected = Request for cancellation rejected (by the receiver)
  • expired = Response time of 72 hours finished
Cases in which a CFDI is canceled: canceled, acepted, expired