Consulting CFDI Cancelation

This service allows the Receiver to accept or reject a receipt cancelation request.

Content

General Features

To use the CFDI cancelations Acceptance or Rejection web service, you will need:

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

For the response digital signature, you will require the Digital Seal Certificate (CSD) to send it to the SAT. This CSD must be valid and it has to be loaded into the Sovos platform.

The CSD usually has 3 parts:

  • The certificate that is a file with extension .cer
  • The private key which is a file with extension .key
  • The password of the private key

To obtain a SAT digital seal certificate (CSD) , consult the requisitions and the procedure in the SAT portal: How to process a digital seal certificate (CSD)

Service Location

The URLs for each of the environments are:

Environment WSDL Location
Tests https://oat.reachcore.com/api/ws/timbre-fiscal/AceptacionRechazo.svc/basic?wsdl
Production https://go.reachcore.com/api/ws/timbre-fiscal/AceptacionRechazo.svc/basic?wsdl


Method [ProcesaPeticion]

This Method is for the Receivers of an invoice that has a cancelation request. You can perform the Acceptance or Rejection of a cancelation request. This method requires the signature of the requisition with the Receiver’s CSD.

AceptacionRechazoCancelacion

Element Use Description
ApiKey Required Authentication Id generated in the Sovos Portal.
RfcReceptor Required Indicates the Receiver's RFC that will provide the response.
Respuesta Required Indicates the response to the cancelation. The only valued permitted are Aceptacion (no accent in this Spanish word) or Rechazo
UUID Required Fiscal folio of the receipt you want to consult.
The fiscal folio must have the GUID 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}
Ejemplo:

18982836-822c-417c-b235-1f596117fad8


Example of a Requisition:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cus="http://www.reachcore.com/CFDI/customHeaders" xmlns:tem="http://tempuri.org/">
   <soapenv:Header>
      <cus:ApiKey>000...999</cus:ApiKey>
   </soapenv:Header>
   <soapenv:Body>
      <tem:CancelacionAceptacionRechazoRequest>
         <tem:Rfc>CALJ581101M37</tem:Rfc>
         <tem:Folios>
            <tem:SolicitudAceptacionRechazoFolios>
               <tem:UUID>BB536C52-ED1B-44DE-B0C3-45410E4DD34B</tem:UUID>
               <tem:Respuesta>Aceptacion</tem:Respuesta>
            </tem:SolicitudAceptacionRechazoFolios>
         </tem:Folios>
      </tem:CancelacionAceptacionRechazoRequest>
   </soapenv:Body>
</soapenv:Envelope>

Response AceptacionRechazoCancelacion

Element Description
TransactionId Authentication Id generated in the Sovos Portal. If there are any errors, you must give it to the Sovos Support.
Error This node has errors in the request. The information in this node is:
  • Code: error code
  • Message: code error description
Result The XML response generated by the SAT, it also has a receipt signed by the SAT. This response is delivered inside an element <![CDATA[...]]>.


Response Example:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <CancelacionAceptacionRechazoResponse xmlns="http://tempuri.org/">
         <TransactionId>02cdb8c9-e40f-4cef-8e3c-b455c2c7ed6d</TransactionId>
         <Error i:nil="true" xmlns:a="http://schemas.datacontract.org/2004/07/RC.Core.Entities.ValidationResults" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/>
         <Result><![CDATA[<?xml version="1.0"?>
<AcuseAceptacionRechazo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" CodEstatus="1000" Fecha="2018-08-15T10:59:08.6138124" RfcReceptor="CALJ581101M37" RfcPac="DAL050601L35">
  <Folios Respuesta="Aceptacion" xmlns="http://cancelacfd.sat.gob.mx">
    <UUID>BB536C52-ED1B-44DE-B0C3-45410E4DD34B</UUID>
    <EstatusUUID>1001</EstatusUUID>
  </Folios>
  <Signature Id="SelloSAT" 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/2001/04/xmldsig-more#hmac-sha512" />
      <Reference URI="">
        <Transforms>
          <Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
            <XPath>not(ancestor-or-self::*[local-name()='Signature'])</XPath>
          </Transform>
        </Transforms>
        <DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha512" />
        <DigestValue>0KV4bY0HuhEcXnLQnikNqDvJq7rwZswbMrgKbi1wSKcYsBEaMzGAuM85OWlVj7h5HRvDn+2fgXWPEzIYusUjlA==</DigestValue>
      </Reference>
    </SignedInfo>
    <SignatureValue>psgI/8hkcacXp5PuzP953xHbEM+7LysWq7W+YBRcmJpQgCg49xtYzR5hqwaNX4H8ehXqvnQ5Y8lvs4kiaeFFvA==</SignatureValue>
    <KeyInfo>
      <KeyName>BF66E582888CC845</KeyName>
      <KeyValue>
        <RSAKeyValue>
          <Modulus>n5YsGT0w5Z70ONPbqszhExfJU+KY3Bscftc2jxUn4wxpSjEUhnCuTd88OK5QbDW3Mupoc61jr83lRhUCjchFAmCigpC10rEntTfEU+7qtX8ud/jJJDB1a9lTIB6bhBN//X8IQDjhmHrfKvfen3p7RxLrFoxzWgpwKriuGI5wUlU=</Modulus>
          <Exponent>AQAB</Exponent>
        </RSAKeyValue>
      </KeyValue>
    </KeyInfo>
  </Signature>
</AcuseAceptacionRechazo>]]></Result>
         <SATDetailResponse xmlns:a="http://schemas.datacontract.org/2004/07/TimbreFiscalServices.Entities.Cancelacion2" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <a:SATDetailResponse>
               <a:FolioFiscal>BB536C52-ED1B-44DE-B0C3-45410E4DD34B</a:FolioFiscal>
               <a:ResultCode>1001</a:ResultCode>
               <a:ResultMessage>No existen peticiones de cancelación en espera de respuesta para el uuid</a:ResultMessage>
            </a:SATDetailResponse>
         </SATDetailResponse>
         <TransactionProperties xmlns:a="http://schemas.datacontract.org/2004/07/RC.Core.Entities.Servicios" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/>
      </CancelacionAceptacionRechazoResponse>
   </s:Body>
</s:Envelope>

Method [ProcesaPeticionFirmada]

This method is focused to the receivers of a receipt that is requested to be canceled. You can perform the Aceptacion (acceptance) or Rechazo (rejection) of a Cancelation Request, however, unlike the method ProcesaPeticion, when the Receiver's CSD is not registered in Sovos, the XML response to cancelation signed with the Receiver's CSD is sent with this method requisition, following the SAT's rules for this consultation request. The response of this procedure is identical to the method ProcesaPeticion: the received response receipt from the SAT.

CancelacionAceptacionRechazoRequestFirmado

Element Use Description
ApiKey Required Authentication Id generated in the Sovos Portal.
SolicitudFirmada Required XML with the consultation requisition according to the SAT specifications, indicating:
  • Receiver's RFC corresponding to the invoice being consulted.
  • PAC's RFC that sent the consultation requisition (should always be ASE0201179X0).
  • Date and hour the requisition was generated (must include time zone).
  • UUID or fiscal folio of the receipt that is being canceled.
  • A response that can only be Aceptacion (acceptance) or Rechazo (rejection).

Those data must be electronically signed with the Receiver's private key. For reference on how to sign you can check the article: How to sign a cancelation request with the issuer’s private key?


Request Example

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cus="http://www.reachcore.com/CFDI/customHeaders" xmlns:tem="http://tempuri.org/" xmlns:rc="http://schemas.datacontract.org/2004/07/RC.Core.Entities.Servicios">
   <soapenv:Header>
      <cus:ApiKey>8AFD...05A4</cus:ApiKey>
   </soapenv:Header>
   <soapenv:Body>
      <tem:CancelacionAceptacionRechazoRequestFirmado>
         <tem:SolicitudFirmada><![CDATA[<SolicitudAceptacionRechazo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" RfcReceptor="BAJF541014RB3" RfcPacEnviaSolicitud="ASE0201179X0" Fecha="2018-11-20T01:02:03" xmlns="http://cancelacfd.sat.gob.mx"><Folios><UUID>6B4D1E48-0FF3-49BF-A84B-4B2AA6397F94</UUID><Respuesta>Rechazo</Respuesta></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>tT10N3HKOGfU3ZQLywgLLHsBJm4=</DigestValue></Reference></SignedInfo><SignatureValue>YWoP+chazpH4YrAXtMiS9tP2asfc9nPfzwy9YHFF8y0vWv1aY+raz5Lq4vBbc3dG0wIhtc8dCTe56c8jFqPbJKLuKg5xZEOSG5sNnzZKFRuYX1ETD0QsmavW/TtUsc65isT5ho+l9XOcBo9thChEmx8kjRfCU94bTyOm0DvRQ+eZr0k0QasWGZI5/D6cMBvaHeoGnos4vxcFOfuYIH+Kx38f/XmZTDnyHPT/LbT9UdpgcudiNZoia/Yst4GAyhpr68vdRkr2Z15BVAURpwPrqONkiW3d6YA7AzzUrSnVud7qLLR8K6oiAG1EBb2Nb1p68AR5wklTntv78LvtOySaRQ==</SignatureValue><KeyInfo><X509Data><X509IssuerSerial><X509IssuerName>OID.1.2.840.113549.1.9.2=Responsable: ACDMA, OID.2.5.4.45=SAT970701NN3, L=Coyoacán, S=Distrito Federal, C=MX, PostalCode=06300, STREET="Av. Hidalgo 77, Col. Guerrero", E=asisnet@pruebas.sat.gob.mx, OU=Administración de Seguridad de la Información, O=Servicio de Administración Tributaria, CN=A.C. 2 de pruebas(4096)</X509IssuerName><X509SerialNumber>286524172099382162235533054548081509963388106035</X509SerialNumber></X509IssuerSerial><X509Certificate>MIIFzzCCA7egAwIBAgIUMjAwMDEwMDAwMDAzMDAwMjI3NTMwDQYJKoZIhvcNAQELBQAwggFmMSAwHgYDVQQDDBdBLkMuIDIgZGUgcHJ1ZWJhcyg0MDk2KTEvMC0GA1UECgwmU2VydmljaW8gZGUgQWRtaW5pc3RyYWNpw7NuIFRyaWJ1dGFyaWExODA2BgNVBAsML0FkbWluaXN0cmFj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sAwDQYJKoZIhvcNAQELBQADggIBAI8bWcahBYsG6MsJMRgNxayDcRlhmOmkaE3r0Xrv9+MCtPayEzT7ip9JdK6vS4y3Se/9ORK1yQXVbUzcBkZkbEAR04z9aRVqzOCTADUx+VM7ecREq/F4de3tQFiHSUsX86zuwG2CAqkP1JSaxEUEgrqLOO2YgYvwe3fpHVNoffOBNa01WC2uRhI0h/kShQDiA+1IBzDCg6a6hK7XyZRWs1pVnmpZiAvXaCSdn4DdURNjYAPKba/vvigmnBfkntgqiO/541pgbIwmacT270LLgN5//6fH11brsILLjCqdK/A9xTmZqXTYanIEBgkBQpp/Q7BophzBvh8wvKmr7H631qw50OEL9L25Y77cCOuF0n1bzQtVddHafnlG3lvdWIhOiutcdDPmrP837cySOOsPWOmYRzEruH+6sahsllxF7Za8wOh5Criqoa/Vc5aNThW4OgwlAfJjroQj3s3XHRZCRwfozmOPmSds6W3hOBm9rF4Dtq41TDDLYZYz/+cY5CW449oH2dH6HUL/szoe7p+PrunPiYPM6876viMyqt+i+CwEn3sGCyNXqnJIDxs+kZ9/6bdsNcu+pduAIxKmI8Gr9EMHPz2//KvLtHMPK6FTaAgITNxZ5VvGc8nw/EvBcZS6SlGszp8+wPNcLWce3cmGmDOJMGDQ1ruXt2oddZbH6jth</X509Certificate></X509Data></KeyInfo></Signature></SolicitudAceptacionRechazo>]]></tem:SolicitudFirmada>
      </tem:CancelacionAceptacionRechazoRequestFirmado>
   </soapenv:Body>
</soapenv:Envelope>

RespuestaAceptacionRechazoCancelacion

Elemento Descripción
TransactionId Authentication Id generated in the Sovos Portal. If there are any errors, you must give it to the Sovos Support.
Error This node has errors in the request. The information in this node is:
  • Code: error code
  • Message: code error description
AcuseAceptacionRechazo The XML response generated by the SAT, it also has a receipt signed by the SAT. This response is delivered inside an element <![CDATA[...]]>
SATDetailResponse XML structure with analyzed information from the SAT receipt. This structure contains the following:
  • FolioFiscal with the UUID that sent a response
  • ResultCode with the result of the response
  • ResultMessage with the description of the received code

  • Example of a response:

    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
       <s:Body>
          <CancelacionAceptacionRechazoResponse xmlns="http://tempuri.org/">
             <TransactionId>3a515665-f546-4a61-8a0a-57e5eb555e94</TransactionId>
             <Error i:nil="true" xmlns:a="http://schemas.datacontract.org/2004/07/RC.Core.Entities.ValidationResults" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/>
             <Result><![CDATA[<?xml version="1.0"?>
    <AcuseAceptacionRechazo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" CodEstatus="1000" Fecha="2018-08-17T13:32:46.3336952" RfcReceptor="BAJF541014RB3" RfcPac="ASE0201179X0">
      <Folios Respuesta="Rechazo" xmlns="http://cancelacfd.sat.gob.mx">
        <UUID>6B4D1E48-0FF3-49BF-A84B-4B2AA6397F94</UUID>
        <EstatusUUID>1001</EstatusUUID>
      </Folios>
      <Signature Id="SelloSAT" 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/2001/04/xmldsig-more#hmac-sha512" />
          <Reference URI="">
            <Transforms>
              <Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
                <XPath>not(ancestor-or-self::*[local-name()='Signature'])</XPath>
              </Transform>
            </Transforms>
            <DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha512" />
            <DigestValue>HUhfMxkoJVT/KNvxLrw981e45sqFSQhdsmuFmLeAOhMMOnuqiahe+6leWbNxgi0pRKlezdP9v+OoDFHK1jYlRw==</DigestValue>
          </Reference>
        </SignedInfo>
        <SignatureValue>0LMTaLzoR0YcMTK3Nxr9bmRMnbvkh4sf7fbBRkCJAkNrFNENjFQicWgtJ638sCP/gZMRaan0AqlBeBiBqcVvvw==</SignatureValue>
        <KeyInfo>
          <KeyName>BF66E582888CC845</KeyName>
          <KeyValue>
            <RSAKeyValue>
              <Modulus>n5YsGT0w5Z70ONPbqszhExfJU+KY3Bscftc2jxUn4wxpSjEUhnCuTd88OK5QbDW3Mupoc61jr83lRhUCjchFAmCigpC10rEntTfEU+7qtX8ud/jJJDB1a9lTIB6bhBN//X8IQDjhmHrfKvfen3p7RxLrFoxzWgpwKriuGI5wUlU=</Modulus>
              <Exponent>AQAB</Exponent>
            </RSAKeyValue>
          </KeyValue>
        </KeyInfo>
      </Signature>
    </AcuseAceptacionRechazo>]]></Result>
             <SATDetailResponse xmlns:a="http://schemas.datacontract.org/2004/07/TimbreFiscalServices.Entities.Cancelacion2" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
                <a:SATDetailResponse>
                   <a:FolioFiscal>6B4D1E48-0FF3-49BF-A84B-4B2AA6397F94</a:FolioFiscal>
                   <a:ResultCode>1001</a:ResultCode>
                   <a:ResultMessage>No existen peticiones de cancelación en espera de respuesta para el uuid</a:ResultMessage>
                </a:SATDetailResponse>
             </SATDetailResponse>
          </CancelacionAceptacionRechazoResponse>
       </s:Body>
    </s:Envelope>

    SAT Codes for Acceptance or Rejection

    For every response to a receipt’s cancelation, the SAT authorize or rejects specifying a status code. On the following table those known status codes are described and their meaning.

    Code Description Comment
    300 User not valid You will get this error code when the user authentication was not successful.
    301 XML wrong formatted You will get this error code when the requisition has invalid information, e.g.: a Receiver’s RFC is not valid.
    302 Seal wrong formatted or invalid  
    304 Certificate revoked or expired The certificate can be invalid for multiple reasons such as type, validity, etc.
    305 Invalid certificate The certificate can be invalid for multiple reasons such as type, validity, etc.
    309 The pattern of the folio is not valid The folio pattern for fiscal registration does not match. Applicable only to RFI CFDI cancelations.
    310 The CSD is invalid. The folio pattern for fiscal registration does not match. Applicable only to RFI CFDI cancelations.  
    1000 The response was received in a successful way  
    1001 There are no cancelation requests waiting for a UUID response The response was successfully received, but there is no pending cancelation request.
    1002 A response was already received for the UUID cancelation requisition  
    1003 The seal does not match the Receiver's RFC  
    1004 There's more than 1 cancelation request for the same UUID
    1005 The UUID is null, it does not have the correct format
    1006 The number of allowed requisitions was exceeded You have an amount of 500 pending request for petition. Each 500 requisition must belong to the same Receiver.


    Sovos Error Codes

    Code Description Comment
    100 API Key is required The element ApiKey is empty or has blanks.
    101 API Key is not valid The ApiKey does not exist in sovos.
    102 API Key does not have privileges The Sovos account does not have the cancelation response issuance service activated. Please contact Sovos to request this functionality.
    201 Requisition is required The element SolicitudFirmada is empty.
    202 Requisition is not a valid XML You can't read as an XML the content of the element SolicitudFirmada.
    205 Receiver's RFC is not valid The Receiver's RFC does not fulfill the regular expression.
    206 Namespace is not valid The namespace for the root node is not correct.
    207 Prefix not valid The prefix can for the receipt's namespace was not used.
    300 Authentication not valid This response code will load when the consultation request comes from an authentication not valid inside the SAT.
    301 Certificate does not match the Receiver's RFC The receiver's RFC does not match the CSD's RFC.
    302 The certificate is not a CSD The receipt is sealed with a FIEL certificate.
    303 The certificate was not issued by the SAT The CSD is not signed by a SAT root certificate.
    304 The certificate is not registered in the LCO The receiver's certificate is not registered in the List of Taxpayers with liability (Lista de Contribuyentes con Obligación LCO)
    305 The receiver's certificate does not exist The CSD number does not exist for that Receiver's RFC
    306 Receipt out of the certificate validation The expedition date of the receipt is out of the certificate's validity range
    307 Receiver's certificate is not valid The expedition date of the receipt is out of the certificate's validity range
    308 Receiver's certificate revoked The certificate is currently revoked in the SAT’s LCO
    999 Internal error of the service Sovos platform error


    For more information or to clarify any doubt related to this implementation guide on the cancelation service, please send an email to MEX-soporte@sovos.com.


    Regresar