CFDI Cancellation specifying a cancellation reason

This service allows the request of cancellation for one or several CFDI to SAT. Keep in mind that any cancellation request to SAT does not mean that cancellation will be granted.

Content

General Features

On the scheme of Digital Fiscal Receipts through the Internet (CFDI), SAT keeps on its central database all the certified receipts from all of the Certification Service Providers for the full taxpayers registry. Because of this centralized model, the cancellation of a CFDI consists of directly requesting to SAT the cancellation of the receipt through Cancellation of the CFDI.

The Cancellation of a CFDI can be requested by the taxpayer directly in SAT's portal for electronic invoicing, or through a PAC (Authorized Certification Provider) such as Sovos. The Fiscal Code of the Federation (CFF) for 2017 had a reform on its article 29-A which enables the recipient's of the CFDI to be informed of the cancellation request and allow them to approve or reject the cancellation requests.

Under this scheme the cancellation process cannot be asynchronous anymore. When there's a cancellation request, a consultation of the CFDI status must be triggered in order to know if the recipient has accepted the cancellation, or if the CFDI fell in any of the scenarios where no cancellation approval was requested to the recipient. The scenarios for this assumption are:

  • When the cancellation is performed in the next 24 hours after its issuance.
  • When it's a Revenue CFDI (with no relationships)
  • When it's a Payroll CFDI (with no relationships)
  • When it's a Translation CFDI (with no relationships)
  • When it's a CFDI of Retentions and Payment information
  • CFDI of residents living abroad for fiscal effects according to rule 2.7.1.26.
  • CFDI of Incomes issued in operations with the general public, according to rule 2.7.1.24.
  • CFDI of Incomes issued to taxpayers of the RIF (Regimen de Incorporación Fiscal)
  • CFDI of Incomes up to an amount of $1,000.00 MXN

SAT can process a cancellation request when meeting the following:

  • The cancellation request of the UUID (fiscal folio) must be electronically signed with the Digital Seal Certificate (CSD) of the issuer.
  • The UUID (fiscal folio) must belong to the receipt's issuer.
  • The reason for the cancellation must be established.
    • When the reason for cancellation is the key 01 "Receipt issued with errors and contains relationship" the CFDI should be related to the fiscal folio of the receipt that substitutes the one being cancelled.

Offline Cancellation (asynchronous)

On this modality the taxpayer request Sovos to perform a cancellation procedure for up to 2,000 folios in a single operation. The result of this operation will be a tracking Identification that can be consulted anytime during the progress of sending the fiscal folios to SAT.

Requirements to cancel a CFDI

To Perform the cancellation of a fiscal folio of a CFDI it is necessary to have the following:

  • The fiscal folio (UUID) to be cancelled
  • The RFC of the issuer of the receipt or receipts to cancel. This data can be extracted from the CFDI, whether the XML or the printed form (PDF).
  • A valid Digital Seal Certificate (CSD) of the RFC of the receipt issuer.

The CSD usually consists of 3 parts:

1. The certificate, which is a file with the extension .CER
2. The private key, which is a file with the extension .KEY
3. The password of the private key

To obtain a Digital Seal Certificate (CSD) from SAT, please review the SAT site to generate a Request for a Digital Seal certificate to issue invoices.

Integration

There are two type of integration to perform cancellation requests via Sovos:

  • Cancellation Webservice
  • Flat text file through SFTP

In this article we explain the integration via webservice. If you wish to perform a cancellation through a flat text file, it is necessary to create the flat text file as indicated in the following link: Flat text file to cancel indicating the reason for cancellation. This file can be sent through the SFTP or uploading it in the Sovos Reachcore Portal.

For more information, please contact us or your executive account manager.

Cancellation Webservice

On this webservice you can perform the following operations:

  • Unplugged cancellation
  • Self-Signed cancellation

What do I need?

To use the cancellation webservice, you will need:

  • A service contract with Sovos. If you don't have one please send an email to sales-mexico@sovos.com
  • Generate an API key on your Sovos Mexico account, this is an identifier that authenticates the user on the platform's webservices. To generate an API key, check this article: Generating an API Key for web services.

Service Location

The URLs where the definition of Webservice (WSDL) is located for each of the environments are:

Environment WSDL Location
UAT https://oat.reachcore.com/api/ws/6.0/pacservices/Cancelacion.svc/basic?singleWsdl
Production https://go.reachcore.com/api/ws/6.0/pacservices/Cancelacion.svc/basic?singleWsdl


[Cancelar] Method: Offline cancellation

This method of the Webservice can receive a list of up to 2,000 fiscal folios to cancel. To use this method, the Digital Seal Certificate (CSD) must be registered in Sovos Mexico to be able to sign the cancel request. This is an Offline Cancellation therefore a second request is required to know the status of the cancellation.

Cancelar Request

Element Usage Description
ApiKey Required Authentication Identifier generated in the Sovos Reachcore Portal.
RFC Required Indicates the RFC that issued the fiscal folios to be cancelled. The RFC must have a linked CSD that will be used for the electronic signature of the cancellation request.
Folios Required CancelFolio arrangement:
  • UUID (required): Fiscal folios of the receipts to be canceled. Every fiscal folio must have a UUID valid format described by the following regular expression: [a-f0-9A-F]{8}-[a-f0-9A-F]{4}-[a-f0-9A-F]{4}-[a-f0-9A-F]{4}-[a-f0-9A-F]{12}.
    Example: F9123206-D86C-49EE-80F3-C288CC948631
  • Reason (required): the reason for the cancellation of the fiscal folio.
  • UUIDSubstitute (conditional): This gives the fiscal folio that substitutes the fiscal folio of the one to be canceled. It is required if the reason for cancellation is key 01.
  • Total (optional): It allows to specify the Receipt Amount so the status of the receipt can be checked in SAT.
  • RecipientRFC (optional): it allows to specify the Recipient's RFC so the status of the receipt can be checked in SAT.


Cancellation Request example

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cus="http://www.reachcore.com/CFDI/customHeaders" xmlns:urn="urn:reachcore.com:services:api:ws:pacservices:6.0">
   <soapenv:Header>
      <cus:ApiKey>7F3FA21M61.....19E42D72E3</cus:ApiKey>
   </soapenv:Header>
   <soapenv:Body>
      <urn:CancelacionFiscalRequest>
         <urn:RFC>AAA010101AAA</urn:RFC>
         <urn:Folios>
            <urn:CancelFolio>
               <urn:UUID>d6855812-af48-4e8f-b30e-3dcb8bd0b40d</urn:UUID>
               <urn:Reason>02</urn:Reason>
            </urn:CancelFolio>
         </urn:Folios>
      </urn:CancelacionFiscalRequest>
   </soapenv:Body>
</soapenv:Envelope>

Cancellation Reasons Catalogue

Key Description
01 Receipt issued with errors. Receipt has relationship.
02 Receipt issued with errors. Receipt has no relationship.
03 Operation was not performed
04 Nominative operation related to a Global Invoice

Cancellation Response Example

Element Description
Error If the element OnError has the value true, the structure of the error will be shown through an XML structure with the nodes Code and Message. The errors are related to the cancellation request and not will not be related with the content of the request.
OnError
  • false: successful transaction
  • true: error processing the request
TrackingId Tracking transaction identifier. If Support is required, please share this value.


Response Example:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <CancelacionFiscalResponse xmlns="urn:reachcore.com:services:api:ws:pacservices:6.0">
         <OnError>false</OnError>
         <TrackingId>73cce105-aaa6-44ad-9d4e-01de09898b1c</TrackingId>
      </CancelacionFiscalResponse>
   </s:Body>
</s:Envelope>

Method [CancelarSolicitudFirmada]: Self-signed cancellation

This method is used to request the cancellation of the fiscal folio (or folios) of CFDI. The cancellation request is signed with the CSD that you have registered on the Sovos Mexico portal, however, when it's not possible to register the CSD in the Sovos Mexico portal, the XML of the cancellation request signed with the issuer's CSD can be sent with this webservice method: always abiding to definitions by SAT for cancellation requests. The response to this operation is identical to the one of the method Cancelar.

Self-signed Cancellation Request example:

Element Use Description
ApiKey Required Authentication Identifier generated at the Sovos Portal.
SignedApplication Required XML with the cancellation request standard according to what has been established by SAT on Anexo 20. The standard indicates the folio or list of folios to request cancellation, the issuer's RFC, timestamp of the operation, and a reason for cancellation according with catalogue. This XML structure must be signed electronically with the private key of the issuer. For reference to the signing, check: How to sign a cancellation request with the private key of the issuer?
UUIDs Optional Array of FoliosToQuery objects. If you are using the FoliosToQuery you have to report the following data:
  • UUID (required): For future use. Fiscal folio of the receipt to cancel included on the signed XML.

  • RecipientRFC (required): For future use. Specifies the Recipient's RFC in order for Sovos Mexico to be able to check the UUID status on SAT.
  • Total (required): For future use. Specifies the Total of the receipt in order for Sovos Mexico to be able to check the UUID status on SAT.
  • TransactionProperties|Optional|Array that indicate Sovos how to process the request. In this moment there are no supported Transaction Properties for the self-signed cancellation.

    Request Example:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cus="http://www.reachcore.com/CFDI/customHeaders" xmlns:urn="urn:reachcore.com:services:api:ws:pacservices:6.0">
       <soapenv:Header>
          <cus:ApiKey>7F3FA21M61.....19E42D72E3</cus:ApiKey>
       </soapenv:Header>
       <soapenv:Body>
          <urn:CancelarSolicitudFirmadaRequest>
             <urn:SignedApplication><![CDATA[<Cancelacion Fecha="2022-01-06T20:00:00" RfcEmisor="EKU9003173C9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://cancelacfd.sat.gob.mx"><Folios><Folio UUID="7E57607A-AB62-4E34-90AF-D5FA73221BE1" Motivo="01" FolioSustitucion="48318D72-8AA0-4497-8081-0DA3D8B6BB9D" /></Folios><Folios><Folio UUID="F96052BF-1EF7-48FE-9836-0B2CBD6F7C0D" Motivo="03" /></Folios><Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>vBJlbXR9xVDB1TxZ77B6DLaRMDg=</DigestValue></Reference></SignedInfo><SignatureValue>hTiPnWZTWGW6Z4emZMvUkVpZ0VechiTvrAxuaSgpqKXlBiyTSN44e1O2uKUcEomlANwOQM5UcQVKuO80HaiiOyC/X5t4c3fefQrP086dD/q8TryV3cSQKP/iRvdEHi/wtL0u0ylhARud4kS1/bDn0q5If4NKox6KLM4O/M4ReMHTUErpVyzXHGMzO7kRONyf7vPDtG46ap+rhu6Ien8DxgZCOHFF7cXy0zTqsKHCMhOoWG95s0HnJ6OVPqOFiqvwIBviWKKtNInN6dH/h1hVYCH8jWoorbK89TSOQLoktkonxvrkl267Tq+wiIwHZnDo6srLTDjkWqbeL9WFjpcjRQ==</SignatureValue><KeyInfo><X509Data><X509IssuerSerial><X509IssuerName>OID.1.2.840.113549.1.9.2=responsable: ACDMA-SAT, OID.2.5.4.45=2.5.4.45, L=COYOACAN, S=CIUDAD DE MEXICO, C=MX, PostalCode=06370, STREET=3ra cerrada de cadiz, E=oscar.martinez@sat.gob.mx, OU=SAT-IES Authority, O=SERVICIO DE ADMINISTRACION TRIBUTARIA, CN=AC UAT</X509IssuerName><X509SerialNumber>292233162870206001759766198444326234574038512436</X509SerialNumber></X509IssuerSerial><X509Certificate>MIIFuzCCA6OgAwIBAgIUMzAwMDEwMDAwMDA0MDAwMDI0MzQwDQYJKoZIhvcNAQELBQAwggErMQ8wDQYDVQQDDAZBQyBVQVQxLjAsBgNVBAoMJVNFUlZJQ0lPIERFIEFETUlOSVNUUkFDSU9OIFRSSUJVVEFSSUExGjAYBgNVBAsMEVNBVC1JRVMgQXV0aG9yaXR5MSgwJgYJKoZIhvcNAQkBFhlvc2Nhci5tYXJ0aW5lekBzYXQuZ29iLm14MR0wGwYDVQQJDBQzcmEgY2VycmFkYSBkZSBjYWRpejEOMAwGA1UEEQwFMDYzNzAxCzAJBgNVBAYTAk1YMRkwFwYDVQQIDBBDSVVEQUQgREUgTUVYSUNPMREwDwYDVQQHDAhDT1lPQUNBTjERMA8GA1UELRMIMi41LjQuNDUxJTAjBgkqhkiG9w0BCQITFnJlc3BvbnNhYmxlOiBBQ0RNQS1TQVQwHhcNMTkwNjE3MTk0NDE0WhcNMjMwNjE3MTk0NDE0WjCB4jEnMCUGA1UEAxMeRVNDVUVMQSBLRU1QRVIgVVJHQVRFIFNBIERFIENWMScwJQYDVQQpEx5FU0NVRUxBIEtFTVBFUiBVUkdBVEUgU0EgREUgQ1YxJzAlBgNVBAoTHkVTQ1VFTEEgS0VNUEVSIFVSR0FURSBTQSBERSBDVjElMCMGA1UELRMcRUtVOTAwMzE3M0M5IC8gWElRQjg5MTExNlFFNDEeMBwGA1UEBRMVIC8gWElRQjg5MTExNk1HUk1aUjA1MR4wHAYDVQQLExVFc2N1ZWxhIEtlbXBlciBVcmdhdGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCN0peKpgfOL75iYRv1fqq+oVYsLPVUR/GibYmGKc9InHFy5lYF6OTYjnIIvmkOdRobbGlCUxORX/tLsl8Ya9gm6Yo7hHnODRBIDup3GISFzB/96R9K/MzYQOcscMIoBDARaycnLvy7FlMvO7/rlVnsSARxZRO8Kz8Zkksj2zpeYpjZIya/369+oGqQk1cTRkHo59JvJ4Tfbk/3iIyf4H/Ini9nBe9cYWo0MnKob7DDt/vsdi5tA8mMtA953LapNyCZIDCRQQlUGNgDqY9/8F5mUvVgkcczsIgGdvf9vMQPSf3jjCiKj7j6ucxl1+FwJWmbvgNmiaUR/0q4m2rm78lFAgMBAAGjHTAbMAwGA1UdEwEB/wQCMAAwCwYDVR0PBAQDAgbAMA0GCSqGSIb3DQEBCwUAA4ICAQBcpj1TjT4jiinIujIdAlFzE6kRwYJCnDG08zSp4kSnShjxADGEXH2chehKMV0FY7c4njA5eDGdA/G2OCTPvF5rpeCZP5Dw504RZkYDl2suRz+wa1sNBVpbnBJEK0fQcN3IftBwsgNFdFhUtCyw3lus1SSJbPxjLHS6FcZZ51YSeIfcNXOAuTqdimusaXq15GrSrCOkM6n2jfj2sMJYM2HXaXJ6rGTEgYmhYdwxWtil6RfZB+fGQ/H9I9WLnl4KTZUS6C9+NLHh4FPDhSk19fpS2S/56aqgFoGAkXAYt9Fy5ECaPcULIfJ1DEbsXKyRdCv3JY89+0MNkOdaDnsemS2o5Gl08zI4iYtt3L40gAZ60NPh31kVLnYNsmvfNxYyKp+AeJtDHyW9w7ftM0Hoi+BuRmcAQSKFV3pk8j51la+jrRBrAUv8blbRcQ5BiZUwJzHFEKIwTsRGoRyEx96sNnB03n6GTwjIGz92SmLdNl95r9rkvp+2m4S6q1lPuXaFg7DGBrXWC8iyqeWE2iobdwIIuXPTMVqQb12m1dAkJVRO5NdHnP/MpqOvOgLqoZBNHGyBg4Gqm4sCJHCxA1c8Elfa2RQTCk0tAzllL4vOnI1GHkGJn65xokGsaU4B4D36xh7eWrfj4/pgWHmtoDAYa8wzSwo2GVCZOs+mtEgOQB91/g==</X509Certificate></X509Data></KeyInfo></Signature></Cancelacion>]]></urn:SignedApplication>
          </urn:CancelarSolicitudFirmadaRequest>
       </soapenv:Body>
    </soapenv:Envelope>

    About the optional section UUIDs

    The UUIDs section will allow Sovos Reachcore to check the status of the fiscal folios that were sent to cancel. This functionality will be added soon to the platform and will help to obtain the detail of the fiscal folio requested to be cancelled through the GetTransactionStatus method. If you use this optional section, you must provide details of the 3 attributes requested. UUID to link the information of the Recipient's RFC and the Total with the fiscal folio requested to be canceled. If any of this data is missing: there won't be an automatic status check.

    Self-signed cancellation response

    Element Description
    Error If the element OnError has the value true, the structure of the error will be shown through an XML structure with the nodes Code and Message.
    OnError
    • false: Successful transaction.
    • true: Error processing the request.
    TrackingId If the element OnError has the value false, a tracking Id of the operation will be shown.


    Response Example:

    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
       <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
          <CancelarSolicituFirmadaResponse xmlns="urn:reachcore.com:services:api:ws:pacservices:6.0">
             <OnError>false</OnError>
             <TrackingId>68818c13-ac25-4367-8713-5e6ac7fe8234</TrackingId>
          </CancelarSolicituFirmadaResponse>
       </s:Body>
    </s:Envelope>

    [GetFolioStatusDetail] Method: Get the Status of a fiscal folio previously sent to be canceled

    This method allows to know the status of a UUID previously certified by Sovos and that has a cancellation request whether through our Webservice or via Integration file.

    Example of a Fiscal Folio Status Request

    Element Use Description
    ApiKey Requered Authentication identifier generated at the Sovos Mexico portal.
    UUID Requered The fiscal folio of the receipt to be checked.

    Example of a Request:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cus="http://www.reachcore.com/CFDI/customHeaders" xmlns:urn="urn:reachcore.com:services:api:ws:pacservices:6.0">
       <soapenv:Header>
          <cus:ApiKey>51e9d1097f634f20b....9e405d933f769303391008</cus:ApiKey>
       </soapenv:Header>
       <soapenv:Body>
          <urn:FolioStatusRequest>
             <urn:UUID>3895094A-5681-4363-8C4A-BE15A17200AA</urn:UUID>
          </urn:FolioStatusRequest>
       </soapenv:Body>
    </soapenv:Envelope>

    Example of Status Request of a Fiscal Folio Response

    Element Description
    OnError
    (required)
    • false: Successful transaction.
    • true: Error processing the request.
    Error
    (conditional)
    If the element Error has the value true, the description of the error will be shown.
    SatSentRequest
    (required)
    • false: The cancellation request of the fiscal folio has not yet been sent to SAT.
    • true: The cancellation request of the fiscal folio has been sent to SAT.
    UUID
    (required)
    Detail of the Fiscal Folio.
    UUIDStatus
    (optional)
    List structure:
    • StatusCode to indicate the status code of the receipt at SAT. Possible values: S (receipt successfully obtained) and N receipt not found.
    • IsCancellable to indicate if the receipt can be canceled or not (and if it requires acceptance or not).
    • State indicates the Status of the receipt at SAT: Not found, Current, or Canceled.
    • CancellationStatus indicates the status of the cancellation request.
    • QueryDate Timestamp to indicate when was the last status consultation.
    RelatedUUIDs
    (optional)
    FolioFiscalDetail Structure, where you can get a recursive detail to inform.
    • UUID with the related fiscal folio.
    • RequestSentToSAT to indicate if the cancellation request of the fiscal folio has been sent to SAT.
    • ResultCode with the response code from SAT.
    • ResultMessage with the message associated with the result code.
    • UUIDStatus with the status of the consulted fiscal folio, and finally
    • Once again, the RelatedUUIDs structure for each related fiscal folio.


    Response example:

    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
       <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
          <FolioStatusResponse xmlns="urn:reachcore.com:services:api:ws:pacservices:6.0">
             <OnError>false</OnError>
             <SatSentRequest>true</SatSentRequest>
             <ResultCode>202</ResultCode>
             <ResultMessage>Petición de cancelación recibida anteriormente.</ResultMessage>
             <UUID>3895094A-5681-4363-8C4A-BE15A17200AA</UUID>
             <UUIDStatus>
                <StatusCode>S - Comprobante obtenido satisfactoriamente.</StatusCode>
                <IsCancellable>Cancelable con aceptación</IsCancellable>
                <State>Cancelado</State>
                <QueryDate>2021-12-27T18:00:00</QueryDate>
             </UUIDStatus>
             <RelatedUUIDs/>
          </FolioStatusResponse>
       </s:Body>
    </s:Envelope>
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
       <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
          <FolioStatusResponse xmlns="urn:reachcore.com:services:api:ws:pacservices:6.0">
             <OnError>false</OnError>
             <Error>
                <Code/>
             </Error>
             <SatSentRequest>true</SatSentRequest>
             <ResultCode>201</ResultCode>
             <ResultMessage>Petición de cancelación recibida</ResultMessage>
             <UUID>74e4b36d-e4b5-4ee2-9e5b-64c5362dd56e</UUID>
             <UUIDStatus>
                <State>SIN ELEMENTOS PARA LLEVAR A CABO LA CONSULTA EN EL SAT</State>
                <QueryDate>0001-01-01T00:00:00</QueryDate>
             </UUIDStatus>
             <RelatedUUIDs/>
          </FolioStatusResponse>
       </s:Body>
    </s:Envelope>
    The date 0001-01-01 is not an error. It is the minimum value that can be returned for this required field in the response. This value will be replaced once the status query process starts.

    [GetTransactionStatusDetail] Method: Result of Batch Status cancellation

    This method lets you know the Status of a previously request for cancellation, whether it may have been requested through web service or per integration file.

    Example of Result of Batch Status cancellation Request

    Element Use Description
    ApiKey Required Authentication identifier generated at the Sovos Reachcore Portal.
    TrackingId Required Tracking identifier for the transaction, obtained through a prior call to the Cancelar method or obtained as a result of a flat text exchenge with the Cancellation structure.


    Request Example:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cus="http://www.reachcore.com/CFDI/customHeaders" xmlns:urn="urn:reachcore.com:services:api:ws:pacservices:6.0">
       <soapenv:Header>
          <cus:ApiKey>51e9d1097f634f20b.......406d9e405d933f769303391008</cus:ApiKey>
       </soapenv:Header>
       <soapenv:Body>
          <urn:TransactionStatusRequest>
             <urn:TrackingId>e6123fb8-723b-4d9a-8ff0-e4a69803e380</urn:TrackingId>
          </urn:TransactionStatusRequest>
       </soapenv:Body>
    </soapenv:Envelope>

    Example of Result of Batch Status cancellation Response

    Element Description
    OnError
    • false: Successful transaction.
    • true: Transaction procedure error.
    ErrorMessage If the element OnError has the value true, the error message will be shown through an XML structure with the nodes Code and Message.
    TotalUUIDs Total of fiscal folios in the batch.
    UUIDsSentToSAT Total of different fiscal folios with an acknowledgment of received from SAT.
    UUIDsRejectedSAT Total fiscal folios from the cancellation batch that do not have an acknowledgment of received from SAT.
    Finished
    • true - indicates if the request is already finished.
    • false - indicates if the request is still on process.
    UUIDs Arrange of the object FolioFiscalDetail, which consist of:
    • UUID: Consulted fiscal folio
    • RequestSentToSAT: Indicates if the cancellation request has been sent to the SAT.
    • UUIDStatus: Structure with information about the request to the SAT:
      • ResultCode: Status code at SAT.
      • ResultMessage: If available, description of the ResultCode according to what is established on Anexo 20.
      If Sovos Reachcore knows the Total and RFC Receptor (due to certifying the CFDI with the specified fiscal folio in the last 6 months), the response will also include the node code>UUIDStatus where you can see the following information:
      • StatusCode – Indicates if the receipt was found on the SAT.
      • IsCancellable - true if SAT considers it can be canceled, false if it is considered as non-cancellable.
      • State – Status of the UUID at SAT.
      • CancellationStatus – Cancellation Status.
      • QueryDate – Date of the last consultation to check the UUID status in the SAT.


    A batch will be on Finished Status when each of the receipts that were requested to be canceled are shown on one of the following statuses: * Successfully canceled. * Could not be canceled at SAT and the reason correspond with certain codes. These codes are considered as non-retriable on the SAT Response Codes for Cancellation.

    Response Example

    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
       <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
          <TransactionStatusResponse xmlns="urn:reachcore.com:services:api:ws:pacservices:6.0">
             <OnError>false</OnError>
             <TotalUUIDs>5</TotalUUIDs>
             <UUIDsSentToSAT>5</UUIDsSentToSAT>
             <UUIDsRejectedSAT>0</UUIDsRejectedSAT>
             <Finished>true</Finished>
             <UUIDs>
                <FolioFiscalDetail>
                   <UUID>17ed0948-a4ae-4ebd-b581-522bbc800e73</UUID>
                   <RequestSentToSAT>true</RequestSentToSAT>
                   <ResultCode>202</ResultCode>
                   <ResultMessage>Petición de cancelación recibida anteriormente.</ResultMessage>
                   <UUIDStatus>
                      <StatusCode>S - Comprobante obtenido satisfactoriamente.</StatusCode>
                      <IsCancellable>Cancelable sin aceptación</IsCancellable>
                      <State>Cancelado</State>
                      <CancellationStatus>Cancelado sin aceptación</CancellationStatus>
                      <QueryDate>2022-01-31T19:29:27.367</QueryDate>
                   </UUIDStatus>
                </FolioFiscalDetail>
                <FolioFiscalDetail>
                   <UUID>19d18962-e614-4c7a-8a7c-80bd9e0d2af6</UUID>
                   <RequestSentToSAT>true</RequestSentToSAT>
                   <ResultCode>202</ResultCode>
                   <ResultMessage>Petición de cancelación recibida anteriormente.</ResultMessage>
                   <UUIDStatus>
                      <StatusCode>S - Comprobante obtenido satisfactoriamente.</StatusCode>
                      <IsCancellable>Cancelable sin aceptación</IsCancellable>
                      <State>Cancelado</State>
                      <CancellationStatus>Cancelado sin aceptación</CancellationStatus>
                      <QueryDate>2022-01-31T19:29:26.817</QueryDate>
                   </UUIDStatus>
                </FolioFiscalDetail>
                <FolioFiscalDetail>
                   <UUID>1b640b2d-e218-4230-b309-e25d1c2404c0</UUID>
                   <RequestSentToSAT>true</RequestSentToSAT>
                   <ResultCode>202</ResultCode>
                   <ResultMessage>Petición de cancelación recibida anteriormente.</ResultMessage>
                   <UUIDStatus>
                      <StatusCode>S - Comprobante obtenido satisfactoriamente.</StatusCode>
                      <IsCancellable>Cancelable sin aceptación</IsCancellable>
                      <State>Cancelado</State>
                      <CancellationStatus>Cancelado sin aceptación</CancellationStatus>
                      <QueryDate>2022-01-31T19:29:27.083</QueryDate>
                   </UUIDStatus>
                </FolioFiscalDetail>
                <FolioFiscalDetail>
                   <UUID>1ca30c9c-3a38-47bc-b399-ebd4596516a1</UUID>
                   <RequestSentToSAT>true</RequestSentToSAT>
                   <ResultCode>201</ResultCode>
                   <ResultMessage>Petición de cancelación recibida</ResultMessage>
                   <UUIDStatus>
                      <StatusCode>S - Comprobante obtenido satisfactoriamente.</StatusCode>
                      <IsCancellable>Cancelable sin aceptación</IsCancellable>
                      <State>Cancelado</State>
                      <CancellationStatus>Cancelado sin aceptación</CancellationStatus>
                      <QueryDate>2022-01-31T19:29:26.223</QueryDate>
                   </UUIDStatus>
                </FolioFiscalDetail>
                <FolioFiscalDetail>
                   <UUID>1f82ee83-3860-4e35-81e5-6a24401cb693</UUID>
                   <RequestSentToSAT>true</RequestSentToSAT>
                   <ResultCode>201</ResultCode>
                   <ResultMessage>Petición de cancelación recibida</ResultMessage>
                   <UUIDStatus>
                      <StatusCode>S - Comprobante obtenido satisfactoriamente.</StatusCode>
                      <IsCancellable>Cancelable sin aceptación</IsCancellable>
                      <State>Cancelado</State>
                      <CancellationStatus>Cancelado sin aceptación</CancellationStatus>
                      <QueryDate>2022-01-31T19:29:28.197</QueryDate>
                   </UUIDStatus>
                </FolioFiscalDetail>
             </UUIDs>
          </TransactionStatusResponse>
       </s:Body>
    </s:Envelope>


    The cancellation process has two phases: Send the cancellation request to SAT and if Reachcore has information to get the status of the receipts: Ask SAT about the status of the receipts in the batch. The Finished element with value true indicates that the cancellation service has finished the process of sending the cancellation request and the attempts to obtain the status in SAT of the receipts in the batch. While in the cancellation process, a status query to the cancellation batch will look like this:

    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
      <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <TransactionStatusResponse xmlns="urn:reachcore.com:services:api:ws:pacservices:6.0">
          <OnError>false</OnError>
          <TotalUUIDs>1</TotalUUIDs>
          <UUIDsSentToSAT>0</UUIDsSentToSAT>
          <UUIDsRejectedSAT>1</UUIDsRejectedSAT>
          <Finished>false</Finished>
          <UUIDs>
            <FolioFiscalDetail>
              <UUID>0952bfa9-ae90-4c01-a7a9-ba19698cfcd8</UUID>
              <RequestSentToSAT>true</RequestSentToSAT>
              <ResultCode>201</ResultCode>
              <ResultMessage>Petición de cancelación recibida</ResultMessage>
              <UUIDStatus>
                <State>EN PROCESO DE CONSULTA DE ESTADO EN EL SAT</State>
                <CancellationStatus>DESCONOCIDO</CancellationStatus>
                <QueryDate>0001-01-01T00:00:00</QueryDate>
              </UUIDStatus>
            </FolioFiscalDetail>
          </UUIDs>
        </TransactionStatusResponse>
      </s:Body>
    </s:Envelope>
    The date 0001-01-01 is not an error. It is the minimum value that can be returned for this required field in the response. It will be replaced once the query for status begins.

    If Sovos Reachcore doesn't have the elements to query the status, the response will look like this:

    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
      <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <TransactionStatusResponse xmlns="urn:reachcore.com:services:api:ws:pacservices:6.0">
          <OnError>false</OnError>
          <TotalUUIDs>1</TotalUUIDs>
          <UUIDsSentToSAT>0</UUIDsSentToSAT>
          <UUIDsRejectedSAT>1</UUIDsRejectedSAT>
          <Finished>false</Finished>
          <UUIDs>
            <FolioFiscalDetail>
              <UUID>054d6de1-5b86-42db-a475-c748f3bbba38</UUID>
              <RequestSentToSAT>true</RequestSentToSAT>
              <ResultCode>201</ResultCode>
              <ResultMessage>Petición de cancelación recibida</ResultMessage>
              <UUIDStatus>
                <State>SIN ELEMENTOS PARA LLEVAR A CABO LA CONSULTA EN EL SAT</State>
                <QueryDate>0001-01-01T00:00:00</QueryDate>
              </UUIDStatus>
            </FolioFiscalDetail>
          </UUIDs>
        </TransactionStatusResponse>
      </s:Body>
    </s:Envelope>

    SAT Cancellation Response Codes

    For each receipt cancellation request, SAT authorizes or rejects specifying an status code. On the following table describes the status codes and what they mean.

    From November 1, 2018 the new cancellation scheme came into effect, where the Recipient must authorize the cancellation of the receipts. You can obtain more information about this new cancellation scheme on our blog or at SAT's website.
    From January 1, 2022 an update to the new cancellation scheme came into effect. In this update you should give the reason for cancellation, and if appliable: the fiscal folio that substitutes the one being canceled. The error keys will not change, but new ones will be added to support the new error scenarios related to invalid invalid cancellation request specifying a wrong cancellation reason, and errors due relating a CFDI that has no relationship with the one requested to be canceled.
    Code Description Meaning Retry? What to do?
    201 Cancellation request received Cancellation request has been received. Does not mean the receipt has been canceled. No Review the status of the receipt at SAT. If the receipt could be canceled its status changes to Cancelado.
    202 Cancellation request previously received The cancellation request has been previously received. This does not mean that the receipt has been canceled. No Review the status of the receipt at SAT. If the receipt could be canceled its status changes to Cancelado.
    203 UUID not found or does not match the issuer The fiscal folio requested to be canceled could not be found, or it was found but was not issued by the specified RFC. No Verify if the issuer's RFC is correct for that receipt and make a new request.
    204 UUID is not applicable for cancellation The fiscal folio cannot be canceled. SAT is not clear on which criteria triggers this code. No Look directly at SAT's webpage (in the section for Assistance to the Taxpayer) the reason for the cancellation of the receipt is not being authorized. Sovos can't do anything about it.
    205 UUID does not exist SAT has not published the receipt on its portal therefore it cannot be canceled yet. Yes Ensure the receipt is already delivered to SAT and retry the cancellation request.
    207 The reason for cancellation is not specified or is not valid This happens when you use the reason 01 (Receipt issued with errors and contains relationship), and the UUIDSubstitute does not fulfill the established structure or it is indicating the same CFDI folio to cancel. No Review the UUID format sent on the UUIDSubstitute and verify that the UUID is in capital letters and that it's different from the one requested to be canceled.
    208 The cancellation request date is greater than the receipt's statement date The issuance date of the fiscal folio is greater than the cancellation date allowed for the annual declaration period of the exercise of the receipt. No The RMF for 2022 which came into effect on January 1, 2022 established the terms for a CFDI cancellation through the rule 2.7.1.47, which says that a CFDI cancellation can be requested no later than the month where the annual declaration of the ISR, corresponding to the fiscal exercise in which that receipt was issued, should be performed.
    209 Replacement Folio not required The cancellation request sent a reason for cancellation that does not require a replacement folio. No Modify the cancellation request and don't specify the replacement folio.
    211 Deadline cancellation request date for global invoice The global invoice to cancel is on its date deadline for request a cancellation. No
    212 Relationship not valid or non-existent The cancellation request does not have a relationship, or the specified relationship is not valid. No Review the information on the cancellation request and try again.
    301 XML wrong formatted The request XML sent to SAT is not properly formatted. This is only relevant to the self-signed cancellation request. No Verify that the cancellation request was created according to SAT's specifications.
    302 Wrong formatted Seal (or invalid) The seal used to generate the cancellation request is incorrect. No Verify the self-signed cancellation request that was sent to Sovos Reachcore.
    303 Seal does not match the issuer The Digital Seal Certificate (CSD) used to sign the request does not match the Issuer's RFC of the CFDI. No Verify that the digital seal certificate corresponds to the RFC of the receipt's issuer.
    304 Seal revoked or expired The digital seal used to sign the cancellation request has been revoked or is no longer valid. No Request to SAT for a new digital seal certificate and send a new cancellation request with this new certificate.
    305 Invalid certificate A certificate issued by the SAT was not used to sign the cancellation request. No Verify that the digital seal certificate was issued by SAT for the RFC of the receipt's issuer and request the cancellation again with that certificate.
    310 Use of e.firma certificate An e.firma certificate is being used instead of a Digital Seal Certificate (CSD) No Sign again the cancellation request delivered to Sovos Reachcore with a CSD method. Only relevant for self-signed cancellation requests.
    311 The cancellation reason key is not valid The key on the attribute MotivoCancelacion is not valid according to the permitted values. No Check that the given key is among the values 01, 02, 03, or 04 only.
    312 UUID is not related to the cancellation reason key The UUID used as a replacement folio is not related to the UUID requested to be canceled. No Check the relationship between the replacement CFDI and the one you are requesting to cancel.


    For more information or to clarify any doubt related to this implementation guide on the cancellation service, please send an email to MEX-soporte@sovos.com. You can aldo see the FAQ about cancellation on this link: cancellation FAQ.

    Frequent Asked Questions

    1. What can I do if my RFC has special characters such as &?

    Unlike the issuance service where the XML is encapsulated in a CDATA envelope, the RFC on this method travels without this envelope so there should be escape sequences for special characters inside the node RFC.
    In the case of the character & we have to use the sequence &amp; so if the RFC is &&&010101000 it should be sent as &amp;&amp;&amp;010101000.

    2. Inconsistencies on the CFDI cancellation service when using cancellation reason "01"

    Sometimes there are inconsistencies over cancellations using the reason for cancellation 01 (Receipt issued with errors. Receipt has relationship.) where cancellation requests are processed sometimes according to what is established sometimes not. About this, the authority says:

    1. CFDIs related to the receipt that you want to cancel must be canceled first. Including the replacement CFDI, using the reason for cancellation 02 (Receipt issued with errors. Receipt has no relationship).
    2. Proceed with the cancellation request of the related CFDI, registering the key `02` (Receipt issued with errors. Receipt has no relationship).
    3. Once the receipts mentioned in steps 1 and 2 are canceled, a new receipt will be issued with the correct information and the relationship with key 04 replacement of previous CFDI related to the fiscal folio of the receipt being replaced.

    Frequently Asked Questions and cancellation scenarios according to the Fiscal Reform of 2022

    The following is an extract of the questions and answers published on the PDF named "Frequent questions and cancellation scenarios according to the Fiscal Reform 2022" published on the SAT Portal through the page Updates on Electronic Invoice- Fiscal Reform 2022 on the Related Content section published on December 2021.

    1.- If I issued an invoice or CFDI with version 3.3, when I request the cancellation, is it necessary to indicate the reason for cancellation or this just applies to version 4.0?

    From January 1st 2022, it will be required to display the reason for cancellation. This applies to every version of the invoice or CFDI.
    Legal basis: Article 29-A sixth paragraph of the Fiscal Code of the Federation.

    2.- In which cases we should select as a reason for cancellation the option "01" - Receipt issued with errors. Receipt has relationship?

    This scenario applies when the generated receipt has an error on the product key, unit value, discount, or any other data; so it should be issued again. In this case, first you replace the invoice, and then request for the cancellation, you will add the invoice folio that will replace the canceled one.

    3.- In which cases we should select as a reason for cancellation the option "02" – Receipt issued with non-related errors?

    This scenario applies when the generated invoice has an error on the product key, unit value, discount, or any other data and it’s not necessary to relate it with another generated invoice.

    4.- In which cases we should select as a reason for cancellation the option "03" – The operation was not performed?

    This scenario applies when you generated an invoice for a transaction that was not finished.

    5.- In which cases we should select as a reason for cancellation the option "04" – Nominative procedure related to the global invoice?

    This scenario applies when a sale is included in the global invoice for procedures with the general public and afterwards, the client requests a nominative invoice, this leads to canceling the global invoice and issuing it again, and then generating the nominative invoice for the client.

    6.- I issued an invoice, but now my client is asking to cancel it because it has errors on the description, how should I perform the cancellation of that receipt?

    When performing the cancellation request, you should follow these steps:

    1. You should issue the receipt with the correct data and register the key "04" (Substitution of Previous CFDI) linking the fiscal folio of the receipt that is being replaced.
    2. You can request the cancellation by entering the sat.gob.mx portal in the "Cancellation and recovery of invoices" service, or through the services of a PAC (Authorized Certification Provider).
    3. When registering the cancellation request you should select the option "01" (Receipt issued with errors. Receipt has relationship.) and include the fiscal folio of the receipt issued on step 1.
    4. When sending the cancellation request you will see if the acceptance of the recipient is needed to perform the cancellation.

    Legal basis: Article 29-A sixth paragraph of the Fiscal Code of the Federation

    7.- In the event that an invoice has been issued for a sale or the provision of a service which was not carried out, what reason for cancellation should be indicated in the corresponding cancellation request?

    The issuer of the invoice must register the code "03" The operation was not carried out in the Reason for cancellation section.
    Legal basis: Article 29-A sixth paragraph of the Fiscal Code of the Federation

    8.- I issued an invoice with an error on the RFC of my client, it has not been delivered to the client yet. To cancel it, should I first link it to the replacement invoice?

    The cancellation request may be made by registering in the reason for cancellation section the code "02" (Receipt issued with errors. Receipt has no relationships.).
    Subsequently, the fiscal receipt must be issued with the correct data and register the key "04" (Replacement of previous invoices or CFDI) relating the fiscal folio of the receipt that is replaced.
    Legal basis: Article 29-A sixth paragraph of the Fiscal Code of the Federation

    9.- My client is asking for the invoice of a product that is related to the global invoice issued on the public general operations for the monthly period, what should I do to issue the requested receipt?

    The issuer should ask for the cancellation of the global invoice and register the cancellation reason with code "04" (nominative operation related to the global invoice).
    Then, he should issue the fiscal global receipt without considering the receipt for the public general operations that was issued in a nominative way.
    Finally, you can generate the nominative invoice requested by your client.


    Regresar