---
title: "Correct or void an invoice | Timbro"
description: "Issue a credit or debit note, or replace an invoice the DGII rejected"
canonical: "https://timbro.do/en/docs/comprobantes/corregir-ecf/"
---

Invoice

# Correct or void an invoice

An invoice the DGII accepted cannot be edited or deleted. To void it or change its amounts, you issue a note that modifies it: a credit note (E34) to void it or reduce what was invoiced, or a debit note (E33) to increase it. Each note is one more invoice in `/v1/invoices`, with its own `invoiceId` and its own e-NCF.

## Issue a credit or debit note

The note states the original invoice in `originalInvoiceId`, the modification code, and the reason. Its items are the amounts the note corrects, not those of the original invoice:

- [TypeScript](https://timbro.do/en/docs/comprobantes/corregir-ecf/#tab-panel-0-0)
- [Python](https://timbro.do/en/docs/comprobantes/corregir-ecf/#tab-panel-0-1)

```ts
import { createTimbroInvoices } from "@timbro/invoices";

const timbro = createTimbroInvoices({ apiKey: process.env.TIMBRO_INVOICES_API_KEY! });
const creditNote = await timbro.invoices.create({
  invoiceReference: "sale-842-credit-note-1",
  type: "E34",
  originalInvoiceId: "f35b7ae4-c484-4c63-981e-4f0f15e913b5",
  modificationCode: "3",
  reason: "Partial return",
  currency: "DOP",
  incomeType: "01",
  paymentTerms: { type: "immediate" },
  items: [{
    description: "Returned service",
    quantity: "1",
    unit: "unit",
    kind: "service",
    unitPrice: "100.00",
    tax: { kind: "itbis_18", included: true },
  }],
});
```

```python
import os

from timbro_invoices import TimbroInvoices

timbro = TimbroInvoices(api_key=os.environ["TIMBRO_INVOICES_API_KEY"])
credit_note = timbro.invoices.create({
    "invoiceReference": "sale-842-credit-note-1",
    "type": "E34",
    "originalInvoiceId": "f35b7ae4-c484-4c63-981e-4f0f15e913b5",
    "modificationCode": "3",
    "reason": "Partial return",
    "currency": "DOP",
    "incomeType": "01",
    "paymentTerms": {"type": "immediate"},
    "items": [{
        "description": "Returned service",
        "quantity": "1",
        "unit": "unit",
        "kind": "service",
        "unitPrice": "100.00",
        "tax": {"kind": "itbis_18", "included": True},
    }],
})
```

| Code | What it is for                           | Types       |
| ---- | ---------------------------------------- | ----------- |
| `1`  | Void the whole invoice                   | E34         |
| `2`  | Correct a text, such as the buyer’s name | E33 and E34 |
| `3`  | Correct amounts                          | E33 and E34 |

The original invoice must be accepted. Timbro checks that a credit note does not exceed the balance left on the original invoice, counting earlier notes. The reason (`reason`) allows up to 90 characters.

Issuing a note does not return money. If the customer paid with Timbro, [refund the payment and link the note to the refund](https://timbro.do/en/docs/comprobantes/cobrar-una-factura/#refund-an-invoiced-sale).

## Correct an invoice you did not issue with Timbro

If the original invoice was issued with another invoicing system or on paper, Timbro does not have its `invoiceId`. Send `externalOriginal` instead, with its number and issue date:

```json
{
  "fiscalNumber": "E310000000123",
  "issuedOn": "2026-08-14"
}
```

`fiscalNumber` can be an e-NCF or a paper NCF. If the original is a Consumer Invoice (E32), also send its `total`, because the DGII requires the buyer’s data on a note against a Consumer Invoice of RD$ 250,000.00 or more. In that case, send the original invoice’s buyer in `externalOriginal.buyer`. If the original was issued under another RNC, for example before a merger, send that RNC in `issuerTaxId`.

## Replace a rejected invoice

If the API responds `422` and does not return an `invoiceId`, no invoice was created. Correct the fields the error points to and call `invoices.create` again.

If the DGII rejected the invoice (`authorityRejected`), or an administrator of the business closed it before it reached the DGII (`closed`), issue its replacement with `invoices.replace`. Send the rejected invoice’s `invoiceId` and the complete, already corrected request:

- [TypeScript](https://timbro.do/en/docs/comprobantes/corregir-ecf/#tab-panel-1-0)
- [Python](https://timbro.do/en/docs/comprobantes/corregir-ecf/#tab-panel-1-1)

```ts
const replacement = await timbro.invoices.replace(
  "f35b7ae4-c484-4c63-981e-4f0f15e913b5",
  {
    invoiceReference: "sale-842-invoice-2",
    type: "E32",
    currency: "DOP",
    incomeType: "01",
    paymentTerms: { type: "immediate" },
    items: [{
      description: "Service",
      quantity: "1",
      unit: "unit",
      kind: "service",
      unitPrice: "1250.00",
      tax: { kind: "itbis_18", included: true },
    }],
  },
);
```

```python
replacement = timbro.invoices.replace(
    "f35b7ae4-c484-4c63-981e-4f0f15e913b5",
    {
        "invoiceReference": "sale-842-invoice-2",
        "type": "E32",
        "currency": "DOP",
        "incomeType": "01",
        "paymentTerms": {"type": "immediate"},
        "items": [{
            "description": "Service",
            "quantity": "1",
            "unit": "unit",
            "kind": "service",
            "unitPrice": "1250.00",
            "tax": {"kind": "itbis_18", "included": True},
        }],
    },
)
```

The replacement has a new `invoiceId` and a new e-NCF, and `replacesInvoiceId` identifies the invoice it replaces. If you use `source`, keep its `id` and send a new `version`. If the response is lost, repeat the same request with the same `invoiceReference` to retrieve the same replacement. Some replacements need an authorization before they are issued; if that is the case, the API response says so.

A replacement is not a credit or debit note: it is for an invoice that was never accepted.

[Previous\
Download and send the invoice](https://timbro.do/en/docs/comprobantes/entregar-comprobante/)[Next\
Respond to your suppliers' invoices](https://timbro.do/en/docs/comprobantes/facturas-de-suplidores/)

Sell, serve your customers, and collect payments from your phone

© 2026 Timbro. All rights reserved

[Español](https://timbro.do/docs/comprobantes/corregir-ecf/)[English](https://timbro.do/en/docs/comprobantes/corregir-ecf/)

## Products

[Invoicing](https://timbro.do/en/facturacion-electronica/)[Serve](https://timbro.do/en/atiende/)[Collect](https://timbro.do/en/pagos/)[Portal Timbro](https://timbro.do/en/portal-timbro/)[Integrations](https://timbro.do/en/integraciones/)[Cuenta Timbro](https://timbro.do/en/cuenta-timbro/)[Pricing](https://timbro.do/en/precios/)

## Developers

[SDKs and API](https://timbro.do/en/desarrolladores/)[Documentation](https://timbro.do/en/docs/)[API reference](https://timbro.do/en/docs/reference/payments/)

## Company

[INDEXA, the company behind Timbro](https://indexa.do/)[Presentations](https://timbro.do/en/presentaciones/)

## Help

[How to start](https://timbro.do/en/como-empezar/)[Electronic invoicing guide](https://timbro.do/en/guias/facturacion-electronica-republica-dominicana/)[Contact](https://timbro.do/en/contacto/)<hola@timbro.do>

## Legal

[Business Terms](https://timbro.do/en/politicas/negocios/)[Terms of use](https://timbro.do/en/politicas/uso/)[Privacy](https://timbro.do/en/politicas/privacidad/)[Security](https://timbro.do/en/politicas/seguridad/)[All documents](https://timbro.do/en/politicas/)
