tefacturo

Issue credit note

Service to issue electronic credit notes. Credit notes are used to cancel, correct, or discount previously issued documents (invoices or receipts).

Important usage rules

  • tipoIntegracion: OFFLINE → your own ERP handles the correlative (series/number). ERP → tefacturo handles the correlative.
  • numero (in datosDocumento): it cannot be duplicated. If the number was already used, map/track the correlative so it is not resent.
  • fechaEmision: an electronic document (CPE) can be declared with at most 3 days of backdating.
  • Replace the fixed example RUC with the issuer RUC used in the URL and token; all three must match.
  • Response 200 values such as series, number, hash, signature, and identifier are illustrative; the API generates their actual values for each request.
Credit notes must reference an issued document from the same issuer and receiver. Keep the original document data consistent and do not issue a credit note for an amount greater than the referenced document. For AJUSTES_MONTOS_FECHA_PAGO, the referenced invoice must be a credit sale with installments.
PUThttps://jarvis.tefacturo.pe/notacredito-api/invoice2u/integracion/nota-credito/{ruc}

Service to issue electronic credit notes. Replace {ruc} with the issuer RUC. The credit note must reference a previously issued document.

Headers

HeaderValueDescription
AuthorizationBearer {token}Authentication token obtained from the login endpoint.
Content-Typeapplication/jsonContent type for the request body.

Request Body

The credit note includes a comprobanteAjustado object that references the original document. Use the tabs in the right panel to switch between the invoice-based case, the receipt-based case, and the payment date adjustment reason shown on the JSON examples page.

The full examples are in the right panel for quick copy.

Adjusted document (Original document)

El objeto comprobanteAjustado identifica el comprobante original al que se aplica la nota de crédito. Es obligatorio para vincular la nota con el documento que se está corrigiendo.

CampoTipoRequeridoDescription
seriestringOriginal document series
numeronumberNúmero del comprobante original
tipoComprobantestringTipo: "01" para Factura, "03" para Boleta
tipoDocumentostringFACTURA o BOLETA, coherente con tipoComprobante
fechaEmisionstringFecha de emisión del documento original (YYYY-MM-DD)

Credit note reasons

El campo motivo a nivel raíz define la razón de la emisión de la nota de crédito:

ValueDescription
ANULACION_OPERACIONAnulación total de la operación. Se emite por el monto completo del documento original.
ANULACION_ERROR_RUCAnulación por error en el RUC del receptor.
CORRECCION_DESCRIPCIONCorrección en la descripción de los items.
DESCUENTO_GLOBALDescuento global aplicado al documento.
DESCUENTO_ITEMDescuento aplicado a items específicos.
DEVOLUCION_TOTALDevolución total de los bienes.
DEVOLUCION_ITEMDevolución parcial de bienes específicos.

Successful Response (200)

La respuesta confirma que la nota de crédito fue emitida correctamente y retorna los datos generados del documento: firma, hash, identificador, serie, número, total, observación y tipo_documento.

Check the right panel to view and copy the sample response.

Error Handling

CodeStatusDescription
400Bad RequestErrores de validación. Verifique que el comprobante ajustado exista y los campos sean correctos.
401UnauthorizedInvalid or expired authentication token.
403ForbiddenYou do not have permission to issue credit notes with the provided RUC.
404Not FoundEl RUC o el comprobante original no está registrado en el sistema.
500Internal Server ErrorInternal server error. Try again or contact support.

Related Endpoints