1. Home
  2. Servicios
  3. Cancelaciones
  4. Aceptar o Rechazar cancelación Receptor

Aceptar o Rechazar cancelación Receptor

Servicio mediante el cual el receptor podrá manifestar la aceptación o rechazo de la solicitud de cancelación.

Documentación teórica

URL´s

🛠️ Pruebas:
🚀 Productivo:

Aceptar/Rechazar por CSD

Este método permite al receptor aceptar o rechazar solicitudes utilizando sus Certificados de Sello Digital (CSD), ya sea mediante el envío de una lista de UUID o uno solo.

🔗 Endpoint

MétodoRuta
POST/acceptreject/csd

🔐 Autenticación y Headers

HeaderValue
AuthorizationBearer Token
Content-Typeapplication/json

🧾 Parámetros JSON

PropiedadUsoDescripción
uuidsRequeridoArreglo de objetos donde se especifican los uuids y acción a realizar.
passwordRequeridoContraseña del certificado.
rfcopcionalRFC del receptor.
b64CerRequeridoCertificado del receptor en Base64.
b64KeyRequeridoKey del receptor en Base64.

Ejemplo Request

curl --request POST \
--url https://services.test.sw.com.mx/acceptreject/csd \
--header 'Authorization: Bearer $token' \
--header 'Content-Type: application/json' \
--data '{
"uuids": [{"uuid":"fd74d156-b9b0-44a5-9906-e08182e8363e", "action":"Aceptacion"}],
"password": "12345678a",
"rfc": "JUFA7608212V6",
"b64Cer": "MIIFmjCCA4KgAwIB....",
"b64Key": "MIIFDjBABgkqhkiG...."'

Ejemplo Response

{
    "codStatus": "1000",
    "status": "success",
    "data": {
        "folios": [
            {
                "uuid": "6424c644-abfd-4065-957f-78371ec66dbb",
                "estatusUUID": "1001",
                "respuesta": "Aceptacion"
            }
        ],
        "acuse": "<?xml version=\"1.0\" encoding=\"utf-8\"?><AcuseAceptacionRechazo xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" RfcReceptor=\"EKU9003173C9\" RfcPac=\"SPR190613I52\" CodEstatus=\"1000\" Fecha=\"2022-07-25T13:43:04.7860461\"><Folios Respuesta=\"Aceptacion\" xmlns=\"http://cancelacfd.sat.gob.mx\"><UUID>6424c644-abfd-4065-957f-78371ec66dbb</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>IKt+I3pLzUnTQ+7IeD7dNS9k5/j05AdjqIXemA8088b0iTr3ZUVlSiuYFjZJ1IzhxU2+rGD0d1zwHVnHDr9qlg==</DigestValue></Reference></SignedInfo><SignatureValue>9KDALB3/xu9qPAMN900Nwmf/4C6qzCaF1iteIlLHaNTUnCuM9iJ35driEqyAsGDmCu2/6/U+RE17qqk/Eg0xUQ==</SignatureValue><KeyInfo><KeyName>BF66E582888CC845</KeyName><KeyValue><RSAKeyValue><Modulus>n5YsGT0w5Z70ONPbqszhExfJU+KY3Bscftc2jxUn4wxpSjEUhnCuTd88OK5QbDW3Mupoc61jr83lRhUCjchFAmCigpC10rEntTfEU+7qtX8ud/jJJDB1a9lTIB6bhBN//X8IQDjhmHrfKvfen3p7RxLrFoxzWgpwKriuGI5wUlU=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue></KeyInfo></Signature></AcuseAceptacionRechazo>"
    }
}
{
    "message": "CACFDI33 - Error no controlado",
    "messageDetail": "Invalid length for a Base-64 char array or string.",
    "data": null,
    "status": "error"
}
AtributoTipoDescripción
messageStringCódigo regresado cuando existe un error.
messageDetailStringMensaje más descriptivo del error cuando existe uno.
dataobject/nullContiene información del acuse de aceptación o rechazo, incluyendo lista de folios y XML del acuse.
statusString“success” o “error”
codStatusStringCódigo “1000” cuando ha sido exitosa la solicitud.

Aceptar/Rechazar por PFX

Este método permite al receptor aceptar o rechazar solicitudes utilizando el archivo PFX resultado de su CSD convertido a B64, ya sea mediante el envío de una lista de UUID o uno solo.

💡Artículo de apoyo: ¿Cómo crear un PFX?

🔗 Endpoint

MétodoRuta
POST/acceptreject/pfx

🔐 Autenticación y Headers

HeaderValue
AuthorizationBearer Token
Content-Typeapplication/json

🧾 Parámetros JSON

PropiedadUsoDescripción
uuidsRequeridoArreglo de objetos donde se especifican los uuids y acción a realizar.
passwordRequeridoContraseña del certificado PFX.
rfcOpcionalRFC del receptor
b64PfxRequeridoArchivo Pfx en Base64

Ejemplo Request

curl --request POST \
--url https://services.test.sw.com.mx/acceptreject/pfx \
--header 'Authorization: Bearer $token' \
--header 'Content-Type: application/json' \
--data '{
"uuids": [{"uuid":"fd74d156-b9b0-44a5-9906-e08182e8363e", "action":"Aceptacion"}],
"password": "12345678a",
"rfc": "JUFA7608212V6",
"b64Pfx": "MIIFmjCCA4KgAwIB...."

Ejemplo Response

{
    "codStatus": "1000",
    "status": "success",
    "data": {
        "folios": [
            {
                "uuid": "6424c644-abfd-4065-957f-78371ec66dbb",
                "estatusUUID": "1001",
                "respuesta": "Aceptacion"
            }
        ],
        "acuse": "<?xml version=\"1.0\" encoding=\"utf-8\"?><AcuseAceptacionRechazo xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" RfcReceptor=\"EKU9003173C9\" RfcPac=\"SPR190613I52\" CodEstatus=\"1000\" Fecha=\"2022-07-25T11:53:24.424164\"><Folios Respuesta=\"Aceptacion\" xmlns=\"http://cancelacfd.sat.gob.mx\"><UUID>6424c644-abfd-4065-957f-78371ec66dbb</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>tVBq9vchHbNBxZEvhmE1gpq23Nnawp42M3+2Z4h68h0dBGuj0lmHwJF5USejOjN7ij8MNMEmeU7GpkXDWYw46Q==</DigestValue></Reference></SignedInfo><SignatureValue>FaF4nSk7qthiMY06IwhA3qpQ9ccXR9vz4R+FPoYTu/XMXsAX+WJW0WrhKNAVrsFStNm/hOvN0cZk1j79RmwPsw==</SignatureValue><KeyInfo><KeyName>BF66E582888CC845</KeyName><KeyValue><RSAKeyValue><Modulus>n5YsGT0w5Z70ONPbqszhExfJU+KY3Bscftc2jxUn4wxpSjEUhnCuTd88OK5QbDW3Mupoc61jr83lRhUCjchFAmCigpC10rEntTfEU+7qtX8ud/jJJDB1a9lTIB6bhBN//X8IQDjhmHrfKvfen3p7RxLrFoxzWgpwKriuGI5wUlU=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue></KeyInfo></Signature></AcuseAceptacionRechazo>"
    }
}
{
    "message": "CACFDI33 - Error no controlado",
    "messageDetail": "Invalid length for a Base-64 char array or string.",
    "data": null,
    "status": "error"
}
AtributoTipoDescripción
messageStringCódigo regresado cuando existe un error.
messageDetailStringMensaje más descriptivo del error cuando existe uno.
dataobject/nullContiene información del acuse de aceptación o rechazo, incluyendo lista de folios y XML del acuse.
statusString“success” o “error”
codStatusStringCódigo “1000” cuando ha sido exitosa la solicitud.

Aceptar/Rechazar por XML

En este método se requiere de un XML previamente sellado con los datos de los UUID a rechazar o a aceptar, visita nuestra herramienta para generar y sellar el XML.

🔗 Endpoint

MétodoRuta
POST/acceptreject/xml

🔐 Autenticación y Headers

HeaderValue
AuthorizationBearer Token
Content-Typemultipart/form-data

🧾 Parámetros Form

PropiedadUsoDescripción
xmlRequeridoXML con datos requeridos para la aceptacion/rechazo de la cancelación

Ejemplo Request

curl --request POST \
  --url https://services.test.sw.com.mx/acceptreject/xml \
  --header 'Authorization: Bearer $token' \
  --header 'Content-Type: multipart/form-data; boundary=--
-011000010111000001101001' \
  --form 'xml=cfdi.xml'

Ejemplo Response

{
    "codStatus": "1000",
    "status": "success",
    "data": {
        "folios": [
            {
                "uuid": "FD74D156-B9B0-44A5-9906-E08182E8363E",
                "estatusUUID": "1001",
                "respuesta": "Aceptacion"
            }
        ],
        "acuse": "<?xml version=\"1.0\" encoding=\"utf-8\"?><AcuseAceptacionRechazo xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" RfcReceptor=\"EKU9003173C9\" RfcPac=\"SPR190613I52\" CodEstatus=\"1000\" Fecha=\"2022-07-28T16:26:15.098388\"><Folios Respuesta=\"Aceptacion\" xmlns=\"http://cancelacfd.sat.gob.mx\"><UUID>FD74D156-B9B0-44A5-9906-E08182E8363E</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>+SVWUAxbjAfaN6nGA/Kfm1U2PA3tYAFt6msbI5JPlUa2d3siFq2FYV5sLuwilzkiu2zIUsAvwogEN0AQnWHKmg==</DigestValue></Reference></SignedInfo><SignatureValue>tseopZlpbSDJNMx52qdRYSI1DxPFy76H9cXmrI6rZR8FLjDh9OYNGL59/v5Ohq2rivRdBulGHoKZ/yUpbuvREQ==</SignatureValue><KeyInfo><KeyName>BF66E582888CC845</KeyName><KeyValue><RSAKeyValue><Modulus>n5YsGT0w5Z70ONPbqszhExfJU+KY3Bscftc2jxUn4wxpSjEUhnCuTd88OK5QbDW3Mupoc61jr83lRhUCjchFAmCigpC10rEntTfEU+7qtX8ud/jJJDB1a9lTIB6bhBN//X8IQDjhmHrfKvfen3p7RxLrFoxzWgpwKriuGI5wUlU=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue></KeyInfo></Signature></AcuseAceptacionRechazo>"
    }
}
{
    "codStatus": "302",
    "message": "CA302 - Sello mal formado o inválido.",
    "data": null,
    "status": "error"
}
AtributoTipoDescripción
messageStringCódigo regresado cuando existe un error.
messageDetailStringMensaje más descriptivo del error cuando existe uno.
dataobject/nullContiene información del acuse de aceptación o rechazo, incluyendo lista de folios y XML del acuse.
statusString“success” o “error”
codStatusStringCódigo “1000” cuando ha sido exitosa la solicitud.

Aceptar/Rechazar por UUID

Este método Acepta o Rechaza un solo UUID, es necesario que los CSD sean cargados.

🔗 Endpoint

MétodoRuta
POST/acceptreject/{rfc}/{uuid}/{accion}

🔐 Autenticación y Headers

HeaderValue
AuthorizationBearer Token

📍 Parámetros Path

PropiedadUsoDescripción
uuidRequeridoUUID de la factura que se requiere aceptar/rechazar
rfcRequeridoRFC del receptor
accionRequeridoAcción que se requiera realizar Aceptacion/Rechazo

Ejemplo Request

curl --request POST \
  --url https://services.test.sw.com.mx/acceptreject/EKU9003173C9/362efe1f-c0b4-47dd-9979-91d068a2bc75/Aceptacion \
  --header 'Authorization: Bearer $token' \

Ejemplo Response

{
    "codStatus": "1000",
    "status": "success",
    "data": {
        "folios": [
            {
                "uuid": "FD74D156-B9B0-44A5-9906-E08182E8363E",
                "estatusUUID": "1001",
                "respuesta": "Aceptacion"
            }
        ],
        "acuse": "<?xml version=\"1.0\" encoding=\"utf-8\"?><AcuseAceptacionRechazo xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" RfcReceptor=\"EKU9003173C9\" RfcPac=\"SPR190613I52\" CodEstatus=\"1000\" Fecha=\"2022-07-28T16:26:15.098388\"><Folios Respuesta=\"Aceptacion\" xmlns=\"http://cancelacfd.sat.gob.mx\"><UUID>FD74D156-B9B0-44A5-9906-E08182E8363E</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>+SVWUAxbjAfaN6nGA/Kfm1U2PA3tYAFt6msbI5JPlUa2d3siFq2FYV5sLuwilzkiu2zIUsAvwogEN0AQnWHKmg==</DigestValue></Reference></SignedInfo><SignatureValue>tseopZlpbSDJNMx52qdRYSI1DxPFy76H9cXmrI6rZR8FLjDh9OYNGL59/v5Ohq2rivRdBulGHoKZ/yUpbuvREQ==</SignatureValue><KeyInfo><KeyName>BF66E582888CC845</KeyName><KeyValue><RSAKeyValue><Modulus>n5YsGT0w5Z70ONPbqszhExfJU+KY3Bscftc2jxUn4wxpSjEUhnCuTd88OK5QbDW3Mupoc61jr83lRhUCjchFAmCigpC10rEntTfEU+7qtX8ud/jJJDB1a9lTIB6bhBN//X8IQDjhmHrfKvfen3p7RxLrFoxzWgpwKriuGI5wUlU=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue></KeyInfo></Signature></AcuseAceptacionRechazo>"
    }
}
{
    "message": "CACFDI33 - Error no controlado",
    "messageDetail": "El uuid proporcionado es inválido. Favor de verificar.",
    "data": null,
    "status": "error"
}
AtributoTipoDescripción
messageStringCódigo regresado cuando existe un error.
messageDetailStringMensaje más descriptivo del error cuando existe uno.
dataobject/nullContiene información del acuse de aceptación o rechazo, incluyendo lista de folios y XML del acuse.
statusString“success” o “error”
codStatusStringCódigo “1000” cuando ha sido exitosa la solicitud.

Códigos de respuesta

El servicio puede devolver los siguientes errores, te compartimos una pequeña descripción del motivo por el cual suceden:

CódigoMensaje
300Usuario no válido
301XML mal formado
302Sello mal formado
304Certificado revocado o caduco
305Certificado inválido
309Patrón de folio inválido
310CSD Inválido
1000Se recibió la respuesta de la petición de forma exitosa
1001No existen peticiones de cancelación en espera de respuesta para el uuid
1002Ya se recibió una respuesta para la petición de cancelación del uuid
1003Sello No Corresponde al RFC Receptor
1004Existen más de una petición de cancelación para el mismo uuid
1005El uuid es nulo no posee el formato correcto
1006Se rebaso el número máximo de solicitudes permitidas

  En SW® somos mejores para TI,  es por ello que tu opinión es muy importante,  por favor ayúdanos calificando este articulo y dejando tus comentarios.

How useful was this post?

Click on a star to rate it!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Updated on agosto 1, 2025

Article Attachments

Related Articles