Prevalidation of Tax Receipts

With the Sovos Prevalidation service, it is now possible to validate the information required for the issuance of CFDI 4.0 with which you can confirm the information that you will use before issuing and thus avoid rejection at the time of certification of your tax documents. The CFDI pre-validation service verifies that what is defined in Anexo 20 of the SAT is complied with, as well as with the Complements that are incorporated into the CFDI.

The minimum version of Digital Tax Receipts supported in the Prevalidation service is CFDI 3.3.
No validations are made on other versions of CFDI or Retenciones.

Contents

General characteristics

The Sovos Tax Receipt Prevalidation service verifies the requirements established by the SAT in Anexo 20 for: * CFDI version 3.3 * CFDI version 4.0

As part of the service response, the following is indicated:

  • The result indicating whether a CFDI could be issued with the information provided on the receipt.
  • In case the result indicates that it cannot be emitted: the rules that were evaluated to arrive at the result will be displayed. Only the rules that will prevent the issuance will be listed.

What do I need?

In order to use the service you need the following:

  • Have a service contract with Sovos. In case you don't have one, please send an email to sales-mexico@sovos.com
  • Have generated an API Key in your Sovos account, which authenticates you in the platform's Webservices. To see how to generate an API Key, see this article: Generate API Key for Webservices.
  • Invoke a SOAP webwervice published on the Internet with a secure connection (SSL).

Service location

The URLs where the definition of the Web Service (WSDL) is found for each of the environments are:

Environment WSDL Location
UAT https://oat.reachcore.com/api/ws/Validacion/PreValidationService.svc/basic?wsdl
Production https://go.reachcore.com/api/ws/Validacion/PreValidationService.svc/basic?wsdl

Method [PreValidate]: Prevalidation of the tax receipt

In this method, the request for pre-validation of a CFDI 4.0 can only be made.

PreValidate Request

Element Use Description
ApiKey Required Authentication identifier, which is generated in the Sovos portal.
Document Required Contains the voucher to validate in XML format. The token XML must be sent escaped or within the <![CDATA[...]]> envelope marks.
TransactionProperty Optional
NOT in use
Parameters that indicate to Sovos some special treatment in the validation of the receipt that is being pre-validated.
CustomData Optional
NOT in use
XML structure with data that needs to be displayed can be included in the printed representation of the receipt that has been pre-validated.


Example of request for the pre-validation of a CFDI 4.0:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cus="http://www.reachcore.com/CFDI/customHeaders" xmlns:urn="urn:schemas.reachcore.com:document-validation:5.0">
   <soapenv:Header>
      <cus:ApiKey>vtct...cuuc</cus:ApiKey>
   </soapenv:Header>
   <soapenv:Body>
      <urn:PreValidationRequest>
         <urn:Document><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<cfdi:Comprobante Version="4.0" Serie="PREVALIDACIONES" Folio="20220531090000" FormaPago="99" Fecha="2022-05-31T09:00:00" SubTotal="0.01" Descuento="0.01" Moneda="MXN" Total="0.00" TipoDeComprobante="I" Exportacion="01" MetodoPago="PUE" LugarExpedicion="10740" Sello="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cfdi="http://www.sat.gob.mx/cfd/4" xsi:schemaLocation="http://www.sat.gob.mx/cfd/4 http://www.sat.gob.mx/sitio_internet/cfd/4/cfdv40.xsd">
  <cfdi:Emisor Rfc="CACX7605101P8" Nombre="XOCHILT CASAS CHAVEZ" RegimenFiscal="601" />
  <cfdi:Receptor Rfc="XAXX010101000" Nombre="MI CLIENTE" DomicilioFiscalReceptor="10740" RegimenFiscalReceptor="616" UsoCFDI="S01" />
  <cfdi:Conceptos>
    <cfdi:Concepto ClaveProdServ="01010101" Cantidad="1" ClaveUnidad="XUN" Descripcion="Prevalidación de información" ValorUnitario="0.01" Importe="0.01" Descuento="0.01" ObjetoImp="01" >
	</cfdi:Concepto>
  </cfdi:Conceptos>
</cfdi:Comprobante>]]></urn:Document>
      </urn:PreValidationRequest>
   </soapenv:Body>
</soapenv:Envelope>

Prevalidate Response

Element Description
TrackingId Unique transaction number assigned by Sovos. It may be used in the future to refer to a particular transaction, for technical support purposes.
TransactionDate Date and time the transaction was made; it is in the UTC time zone
IsValid Indicator that answers the question: Can the information on the voucher that was prevalidated be used for issuance? It can only have two values:
  • true - The information that was provided in the receipt can be used to issue the CFDI.
  • false - The information that was provided in the receipt cannot be used to issue a CFDI.
Errors In case the IsValid element comes with the value false, an array of ErrorMessageCode nodes will be displayed with the detected errors. Each ErrorMessageCode has the following XML structure:
  • Code - Error key (when possible: the key according to the SAT error matrix is ​​used).
  • Message - Error message (when possible: the same message that is defined in the SAT error matrix is ​​used).
  • Target (optional) - The location in the XML where the error was found.
  • Details (optional) - Additional details associated with the error found.
TransactionProperty
NOT in use
If a TransactionProperty was used in the prevalidation request, a TransactionProperty is also returned in the response.


In the response, within the TransactionProperties element, a series of TransactionProperty elements will be displayed containing a pair of attributes:
  • Key to set the name of the TransactionProperty.
  • Value to set the corresponding value.

Example of successful response

<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">
      <PreValidationResponse xmlns="urn:schemas.reachcore.com:document-validation:5.0">
         <TrackingId>f3ee7e9f-3bd0-4dd0-a997-dd7e2a97b0c0</TrackingId>
         <TransactionDate>2022-05-31T18:48:50.0945745-05:00</TransactionDate>
         <IsValid>true</IsValid>
      </PreValidationResponse>
   </s:Body>
</s:Envelope>

Example response where errors were identified

<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">
      <PreValidationResponse xmlns="urn:schemas.reachcore.com:document-validation:5.0">
         <TrackingId>f2e23d1a-5292-440e-a63a-2276a1d46773</TrackingId>
         <TransactionDate>2022-05-31T18:51:04.1024698-05:00</TransactionDate>
         <IsValid>false</IsValid>
         <Errors>
            <ErrorMessageCode>
               <Code>CFDI40130</Code>
               <Message>El campo Rfc del nodo receptor debe contener valor "XAXX010101000" y el valor del campo Nombre del nodo Receptor debe contener el valor "PUBLICO EN GENERAL".</Message>
               <Target>cfdi:Comprobante/cfdi:InformacionGlobal</Target>
               <Details>Cuando el valor del atributo (cfdi:Comprobante/cfdi:Receptor[@RFC]) es igual a "XAXX010101000" y el valor del atributo (cfdi:Comprobante/cfdi:Receptor[@Nombre]) es "PUBLICO EN GENERAL", el nodo (cfdi:Comprobante/cfdi:InformacionGlobal) debe existir, en caso contrario, se debe omitir.</Details>
            </ErrorMessageCode>
            <ErrorMessageCode>
               <Code>CFDI40146</Code>
               <Message>El campo RFC del receptor debe contener el valor "XAXX010101000".</Message>
               <Target>/cfdi:Comprobante/cfdi:Receptor/@Nombre</Target>
               <Details>Cuando el valor registrado en este atributo Nombre (cfdi:Comprobante/cfdi:Receptor[@Nombre]) es "PUBLICO EN GENERAL", el valor del atributo RFC del receptor debe ser "XAXX010101000".</Details>
            </ErrorMessageCode>
            <ErrorMessageCode>
               <Code>CFDI40158</Code>
               <Message>La clave del campo RegimenFiscalR debe corresponder con el tipo de persona (física o moral).</Message>
               <Target>/cfdi:Comprobante/cfdi:Receptor/@RegimenFiscalReceptor</Target>
               <Details>El valor del atributo (cfdi:Comprobante/cfdi:Receptor[@RegimenFiscalReceptor]) [616] debe corresponder con el tipo de persona (fisica o moral) del receptor.</Details>
            </ErrorMessageCode>
         </Errors>
      </PreValidationResponse>
   </s:Body>
</s:Envelope>

For more information or clarification of doubts related to this guide, please send an email to MEX-soporte@sovos.com


Regresar