Skip to main content

Peru - Response Codes

Response Codes (SendDocumentToAuthority)
CodeSubCodeErrorDescriptionCommentsActions
0N/AInvoice number Series-Sequential has been accepted. Receipt number Series-Sequential has been accepted. Invoice number Series-Sequential has been accepted with observationsWhen the document was processed successfully in the synchronous submission.
500Q003ERROR Transforming FileWhen an error occurs during the process of transforming the DTE into the tax UBL.Interpret and correct the error provided in Messages before resending the document. If you cannot find the error or the problem persists after several resend attempts, the case can be escalated to Gosocket.
500Q004ERROR Parsing FileWhen an error occurs during the document parsing process.Interpret and correct the error provided in Messages before resending the document. If you cannot find the error or the problem persists after several resend attempts, the case can be escalated to Gosocket.
500Q005Company not active to issue documentsWhen the company does not have document issuance enabled.Contact Gosocket to check for a possible block due to financial reasons.
500Q009API-ERROR creating the XmlDocumentWhen the XML is loaded into the system to be processed and an error is generated.Wait a few minutes and resend the document. If the problem persists after several resend attempts, the case can be escalated to Gosocket.
500Q022Exception.When the process carried out between the API and the Tax Authority/OSE (a process called compliance) does not return an error code, but rather a handled exception.Wait a few minutes and resend the document. If the problem persists after several resend attempts, the case can be escalated to Gosocket.
401N/AYou are sending with the ApiUser {apiKey}, which is not authorized for your company ({senderCode}) in {country}.When the method is called using credentials that are not associated with the issuing company.Verify that you are using the correct ApiKey, which must correspond to the one authorized for the company issuing the document. If you cannot find the error or the problem persists after several resend attempts, the case can be escalated to Gosocket.
G001N/AThe document cannot be processed because it has a future date [Object]When the document is being issued with a future date.Verify the document's date and correct it before resending the document. If the problem persists after several resend attempts, the case can be escalated to Gosocket.
G002N/AERROR Number < 1 character or ERROR Number > 8 charactersWhen a document is being issued with a sequential number shorter than 1 character or longer than 8 characters.Verify the document's sequential number and correct it before resending the document. If the sequential number meets the expected length and the error still occurs, the case can be escalated to Gosocket.
1033N/AThe receipt was previously registered or The receipt was previously registered with different data.When the document being sent is a duplicate and already exists, previously accepted, in Gosocket's records.Verify that the approved document exists in Inbox. Correct the series, the sequential number, or the document type if necessary, and resend.
501N/AThe document's XML cannot be savedWhen a problem occurs during the XML storage process.Wait a few minutes and resend the document. If the problem persists after several resend attempts, the case can be escalated to Gosocket.
7N/AError processing the request. Error Id: [Object] Date: [Object]. Error message: [Object]When an unhandled exception occurs during the process.Interpret and correct the error provided in the message before resending the document. If you cannot find the error or the problem persists after several resend attempts, the case can be escalated to Gosocket.
PE001N/AAsynchronous Process - The document will be inserted into a summaryWhen a document is sent asynchronously and the document is received successfully by Gosocket.
PE002N/AIssue date > 1 calendar day from the receipt date. The document will be processed on DD/MM/YYYY.When a document is sent asynchronously and the issue date is the day after the receipt date in Gosocket, the document is processed on the issue date, that is, the following day.
PE004N/AVoid document sent for asynchronous processingWhen a void document is sent asynchronously and the document is received successfully by Gosocket.
PE005N/AVoid document without valid referencesWhen a void document is sent asynchronously and it does not have valid references.Verify the references and correct them before resending the document. If you cannot find the error or the problem persists after several resend attempts, the case can be escalated to Gosocket.
PE006N/AAsynchronous Process - The document will be sent asynchronouslyWhen a dispatch guide is sent and the document is received successfully by Gosocket.
PE010N/APayment receipt exceeds (XX days) the allowed period to send via Daily SummaryWhen a payment receipt is sent asynchronously and the issue date exceeds the allowed period for sending via the daily summary.Check the date and change it before resending the document. If you cannot find the error or the problem persists after several resend attempts, the case can be escalated to Gosocket.
PE002108N/ADocument exceeds the 15 calendar day limit for its issuance. The document will not be sent to the Tax Authority.When the document is sent with an issue date more than or less than 15 calendar days from the current date, the document is not sent to the OSE or Tax Authority because it would be rejected due to the date error.Check the date and change it before resending the document. If you cannot find the error or the problem persists after several resend attempts, the case can be escalated to Gosocket.
XXXX represents the SUNAT error codeN/ADescription specific to SUNAT's error codes.When the document is issued directly to SUNAT, the error code and message are obtained exactly as returned by SUNAT. Example: ```json "Code": "2800", "Description": "ExcepciónCódigo: 2800
XXXX represents the OSE error codeN/ADescription specific to the OSE's error codesWhen the document is issued with an OSE as the validator, the error code and message are obtained exactly as returned by the OSE. Example: ```json "Code": "2329", "Description": "ExcepciónCódigo: 2329
DNTN/ANon-tax documentWhen the document being sent corresponds to a Non-Tax Document.
DNT-REJECTEDN/AThe non-tax document could not be stored because one already exists on the platform that contains previous references.When a Non-Tax Document does not pass the validation of previous references.Verify the data mentioned in the response and make the necessary corrections before resending the document. If the problem persists after several resend attempts, the case can be escalated to Gosocket.
DNT-02N/AThe non-tax document could not be stored because it has the same date and the same consecutive number, since it already exists on the platform and is referenced to an invoice in Accepted status.When a Non-Tax Document does not pass the validation of same date, consecutive number, and being referenced to an approved invoice.Verify the data mentioned in the response and make the necessary corrections before resending the document. If the problem persists after several resend attempts, the case can be escalated to Gosocket.
DNT-03N/AThe non-tax document could not be stored because it is already referenced to an invoice in Rejected status.When a Non-Tax Document does not pass the validation of being referenced to a rejected invoice.Verify the data mentioned in the response and make the necessary corrections before resending the document. If the problem persists after several resend attempts, the case can be escalated to Gosocket.
DNT-06N/AThe non-tax document could not be stored because it has the same consecutive number, the year of the date is the same, since it already exists on the platform and is referenced to an invoice in Accepted status.When a Non-Tax Document does not pass the validation of same year, consecutive number, and being referenced to an approved invoice.Verify the data mentioned in the response and make the necessary corrections before resending the document. If the problem persists after several resend attempts, the case can be escalated to Gosocket.
DNT-07N/AThe non-tax document could not be stored because it has the same consecutive number, the year of the date is the same, since it already exists on the platform and is referenced to an invoice in Rejected status.When a Non-Tax Document does not pass the validation of same year, consecutive number, and being referenced to a rejected invoice.Verify the data mentioned in the response and make the necessary corrections before resending the document. If the problem persists after several resend attempts, the case can be escalated to Gosocket.
DNT-08N/AThe non-tax document could not be stored because it has the same consecutive number, the year of the date is the same, since it already exists on the platform and it is associated with an electronic invoice that is in an active Smart Supply validation process.When a Non-Tax Document does not pass the validation of same year, consecutive number, and being referenced to an invoice with an active process in Smart Supply validations.Verify the data mentioned in the response and make the necessary corrections before resending the document. If the problem persists after several resend attempts, the case can be escalated to Gosocket.

Some response examples

Code: 0 Description: Processed Successfully How to replicate it? A/. By issuing a document that is processed successfully

{
"Success": true,
"GlobalDocumentId": "eb838eb3-c275-2ad9-549f-15f150a6ffb6",
"CountryDocumentId": "45ed9f4b-5394-404b-a67b-1751ac3e067e",
"OtherData": {
"Country": "pe",
"AuthorityTimeStamp": "16/07/2025 13:57:33",
"BarCodeText": "20556695548|01|FADR|41|18.00|118.00|2025-07-16|6|10460002571|fs4kjaC8SSf3QmMejRGfXreIArs=|",
"OseIdentifier": "digiflow"
},
"Messages": [],
"ResponseValue": "PD94bWwgdmVyc2lvbj...jYXRpb25SZXNwb25zZT4=",
"Code": "0",
"Description": "La factura numero 20556695548-01-FADR-41, ha sido aceptada",
"ErrorException": null
}

Code: 500 SubCodeError: Q003 Description: ERROR Transforming File How to replicate it? A/. By specifying a mapping in the request that does not exist, for example "11111111-1111-1111-1111-11111111111a"

{
"Success": false,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": null,
"OtherData": {
"SubCodeError": "Q003"
},
"Messages": [
"Regla: ERROR, Reintento: Error Transformando Archivo. Verifique el mapeo y reintente nuevamente.",
"Error Transformando Archivo, MSTransform.500 - Inicia proceso de transformación.No se encontro Xslt configurado.. Id error: 3299e81d-447b-41e8-99fd-5aad5ee82986 Fecha: 2025-07-16"
],
"ResponseValue": null,
"Code": "500",
"Description": "ERROR Transformando Archivo",
"ErrorException": null
}

Code: 500 SubCodeError: Q004 Description: ERROR Parsing File How to replicate it? A/. By sending the document's issue date in an invalid format, for example 2025/05/27

{
"Success": false,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": null,
"OtherData": {
"SubCodeError": "Q004"
},
"Messages": [
"Regla: ERROR, Reintento: Error en el ParserXML, verifique el XML y reintente nuevamente.",
"System.FormatException: Input string was not in a correct format.\r\n   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)\r\n   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)\r\n   at System.Convert.ToInt32(String value)\r\n   at Gosocket.Document.ApplicationServices.ParserServices.ParserPE_UBL_21(XmlDocument xmlDocument) in D:\a\1\s\L3 Application\Gosocket.Document.ApplicationServices\ParserServices.cs:line 3732\r\n   at Gosocket.Document.ApplicationServices.ParserServices.ParserPE(XmlDocument xmlDocument) in D:\a\1\s\L3 Application\Gosocket.Document.ApplicationServices\ParserServices.cs:line 3282\r\n   at Gosocket.Document.ApplicationServices.ParserServices.ParserXml(XmlDocument document, String country) in D:\a\1\s\L3 Application\Gosocket.Document.ApplicationServices\ParserServices.cs:line 44\r\n   at Gosocket.Document.ApplicationServices.CountryServices.PeruApplicationServices.MakeDocumentAndSend(String country, String mappingId, String data, String apiKey, Boolean sign, Boolean systemDefaultCertificate, Boolean async, Guid trackId, List`1 accountCodes, Boolean internalSystemUpload, String& senderCode, ProcessPerformanceLogData& procLogData, Dictionary`2 additionalData) in D:\a\1\s\L3 Application\Gosocket.Document.ApplicationServices\CountryServices\PeruApplicationServices.cs:line 217"
],
"ResponseValue": null,
"Code": "500",
"Description": "ERROR Parseando Archivo",
"ErrorException": null
}

Code: 500 SubCodeError: Q005 Description: Company not active to issue documents How to replicate it? A/. There is no technique that can be shared to replicate this error, since it depends on internal configurations that the user cannot modify.

{
"Success": false,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": null,
"OtherData": {
"SubCodeError": "Q005"
},
"Messages": [],
"ResponseValue": "Empresa no activa",
"Code": "500",
"Description": "Empresa no activa para emitir",
"ErrorException": null
}

Code: 401 Description: You are sending with the ApiUser {apiKey}, which is not authorized for your company ({senderCode}) in {country}. How to replicate it? A/. Calling the method with authentication credentials that are not associated with the issuing company.

{
"Success": false,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": "aaf678b3862cc0da8d85ee4ffb841c55d9f596e009d984f1355c1775cf737906",
"OtherData": {
"Country": "pe",
"AuthorityTimeStamp": "16/07/2025 15:54:44"
},
"Messages": [
"ApiUser no Autorizado para emisor [20551348041] en sbx"
],
"ResponseValue": null,
"Code": "401",
"Description": "Esta enviando con el ApiUser da038113-a90a-4313-9c2c-91c06b612649 el cual no esta autorizado para su empresa (20551348041) en pe.",
"ErrorException": null
}

Code: G001 Description: The document cannot be processed because it has a future date How to replicate it? A/. Setting an issue date more than 2 years in the future

{
"Success": false,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": null,
"OtherData": {
"Country": "pe",
"AuthorityTimeStamp": "16/07/2025 16:11:44"
},
"Messages": [],
"ResponseValue": null,
"Code": "G001",
"Description": "El documento no puede ser procesado debido a que tiene una fecha futura 20-09-2027",
"ErrorException": null
}

Code: G002 Description: ERROR Number < 1 character How to replicate it? A/. Sending the document without a sequential number.

{
"Success": false,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": null,
"OtherData": null,
"Messages": [
"El documento informado  no cuenta con el mínimo de 1 dígito en su correlativo"
],
"ResponseValue": null,
"Code": "G002",
"Description": "ERROR Number &lt; 1 caracter",
"ErrorException": null
}

Code: G002 Description: ERROR Number > 8 characters How to replicate it? A/. Sending a sequential number longer than 8 characters.

{
"Success": false,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": null,
"OtherData": null,
"Messages": [
"El documento informado 000000045 excede el máximo 8 de dígitos en su correlativo"
],
"ResponseValue": null,
"Code": "G002",
"Description": "ERROR Number &gt; 8 caracteres",
"ErrorException": null
}

Code: 1033 Description: The receipt was previously registered/The receipt was previously registered with different data. How to replicate it? A/. Sending the same document (series-sequential number) already approved again without changing anything, or changing some data such as the date.

{
"Success": false,
"GlobalDocumentId": "18564bff-9a31-e230-ad83-010634f6aaab",
"CountryDocumentId": "b11e1f2ab621ba4088a53cd8b3a79c501f2b8cf29436b475eb081658f3da4b19",
"OtherData": {
"Country": "pe",
"AuthorityTimeStamp": "16/07/2025 16:25:12"
},
"Messages": [
"Regla: 1033, Error: El comprobante fue registrado previamente."
],
"ResponseValue": "PD94bWwgdmVy...saXphZG9zPjwvSW52b2ljZT4K",
"Code": "1033",
"Description": "El comprobante fue registrado previamente",
"ErrorException": null
}
///////////
{}
"Success": false,
"GlobalDocumentId": "a4aef3aa-72d9-615f-c45e-9c1725ee99bd",
"CountryDocumentId": "3f8f1a2ecfe9d3b3b4fc756584b8ee93a213418c5574562c64e89e190460a68e",
"OtherData": {
"Country": "pe",
"AuthorityTimeStamp": "16/07/2025 16:27:07"
},
"Messages": [
"Regla: 1033, Error: El comprobante fue registrado previamente con otros datos.."
],
"ResponseValue": "PD94bWwgdmVyc2lvb...zb25hbGl6YWRvcz48L0ludm9pY2U+Cg==",
"Code": "1033",
"Description": "El comprobante fue registrado previamente con otros datos.",
"ErrorException": null
}

Code: 7 Description: Error processing the request. Error Id: {trackId}. Date: {logDate}. Error message: {e.Message}. How to replicate it? A/. Sending a document for a company without a certificate or with an expired certificate.

{
"Success": false,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": null,
"OtherData": null,
"Messages": [],
"ResponseValue": "",
"Code": "7",
"Description": "Error al procesar la solicitud. Id de error: a5366500-a8f4-4b16-8253-93fae085fd25 Fecha: 2025-07-16. Mensaje de error: MSSign.10000 - El certificado no existe.",
"ErrorException": null
}

Code: P004 Description: Void document sent for asynchronous processing How to replicate it? A/. Sending a void document asynchronously.

{
"Success": true,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": null,
"OtherData": {
"Country": "pe",
"VoidDocument1": "27f3a4af-c32a-c6af-04ed-0bfbf8a4cf42"
},
"Messages": [],
"ResponseValue": null,
"Code": "PE004",
"Description": null,
"ErrorException": null
}

Code: P006 Description: Asynchronous Process - The document will be sent asynchronously How to replicate it? A/. Sending a document asynchronously.

{
"Success": true,
"GlobalDocumentId": "521c8f36-52e6-aaf4-6bc3-4e6eecf9d14b",
"CountryDocumentId": "841c57234756c3cf6f123d85f96310e28f53b8663c00612acd19660a47611c50",
"OtherData": {
"Country": "pe",
"AuthorityTimeStamp": "11/07/2025 12:15:52",
"BarCodeText": "20556695548|09|TKER|107|0||2025-07-11|6|10482963493|psbVMEoBI1Dz0bKcSpmXUtmYZv8=|",
"OseIdentifier": "SUNAT"
},
"Messages": [],
"ResponseValue": null,
"Code": "PE006",
"Description": "Proceso Asíncrono - El documento será enviado asyncronamente",
"ErrorException": null
}

Code: PE002108 Description: Document exceeds the 15 calendar day limit for its issuance. The document will not be sent to the Tax Authority. How to replicate it? A/. Sending a document with a date more than or less than 15 calendar days from the current date.

{
"Success": false,
"GlobalDocumentId": "e3eba371-0a67-35f3-c70e-ca9678cc1cc4",
"CountryDocumentId": "affea5768adca7a8c38f2de8402d6ce7b723d40baf2f991ada56e626267c7656",
"OtherData": {
"Country": "pe",
"AuthorityTimeStamp": "16/07/2025 16:33:26",
"BarCodeText": "20556695548|01|FADR|46|18.00|118.00|2025-06-01|6|10460002571|p5kWzVVDKqE+s1b4DEDZfnmVplY=|",
"OseIdentifier": "digiflow"
},
"Messages": [
"PE002108,Documento supera el límite de 15 días calendario para su emisión. Documento no sera enviado a la Entidad Tributaria."
],
"ResponseValue": null,
"Code": "PE002108",
"Description": "Documento supera el límite de 15 días calendario para su emisión. Documento no sera enviado a la Entidad Tributaria.",
"ErrorException": null
}

Code: XXXX Description: Description specific to the OSE's or SUNAT's error codes. How to replicate it? A/. Sending a document that is rejected by the OSE/SUNAT, or that generates an error in the OSE/SUNAT validation.

{
"Success": false,
"GlobalDocumentId": "e3eba371-0a67-35f3-c70e-ca9678cc1cc4",
"CountryDocumentId": "affea5768adca7a8c38f2de8402d6ce7b723d40baf2f991ada56e626267c7656",
"OtherData": {
"Country": "pe",
"AuthorityTimeStamp": "16/07/2025 16:47:32",
"BarCodeText": "20556695548|01|FADR|46|18.00|118.00|2025-07-31|6|10460002571|96368FOH5oSOvyW4E45+1S3fudo=|",
"OseIdentifier": "digiflow"
},
"Messages": [
"2329,Excepción | Código: 2329 | Descripción: La fecha de emision se encuentra fuera del limite permitido\r\nDetalle: \r\n' ticket: 20250000000000217185665 error: Documento fuera de fecha Posterior [2025-07-31] '"
],
"ResponseValue": "",
"Code": "2329",
"Description": "Excepción | Código: 2329 | Descripción: La fecha de emision se encuentra fuera del limite permitido\r\nDetalle: \r\n' ticket: 20250000000000217185665 error: Documento fuera de fecha Posterior [2025-07-31] '",
"ErrorException": null
}

Code: DNT Description: Non-tax document. How to replicate it? A/. Sending a non-tax document, for example a purchase order.

{
"Success": true,
"GlobalDocumentId": "10c088c0-11c6-ba2b-6764-216840b01a30",
"CountryDocumentId": null,
"OtherData": {
"Country": "pe",
"AuthorityTimeStamp": "16/07/2025 17:31:57",
"BarCodeText": "",
"OseIdentifier": "digiflow"
},
"Messages": [],
"ResponseValue": "PD94bWwgdmVyc2lv...G9zPgo8L0RURT4=",
"Code": "DNT",
"Description": "Documento no tributario",
"ErrorException": null
}