Corrective invoice by substitution in Verifactu

A corrective invoice by substitution can be done in two steps (negative invoice plus corrective invoice) or in one, filling in base_rectificada and cuota_rectificada.

FieldValue
APIVerifactu API
Invoice type or keyR1–R5 · tipo_rectificativa S
Endpoint/verifactu/create
When to use itReplace the original invoice, in one or two steps.

What changes in this case

As with the exchange invoice, we have the option to perform the correction in two different ways: in two steps, or in one step.

  • Two steps: two invoicing records are issued to perform the correction. In the first, a negative invoice is issued and in the second a corrective one.
  • One step: in this option, a single invoicing record is issued to perform the correction of the original invoice.

It might seem more convenient to perform the correction in a single step since you save one invoicing record. However, the advantage of performing the correction in two steps is that the sum of the importe_total field of all invoicing records gives the final total balance. With the one-step correction, it is necessary to take into account the values of the fields base_rectificada and cuota_rectificada to obtain the total balance, which can complicate the implementation. In any case, both methods are possible and equally valid for the AEAT.

Below we show several examples of corrective invoices by substitution. In all of them we will provide the JSON corresponding to the correction using both methods described above: the two-step correction and the one-step correction.

JSON requests

EXAMPLE 1: Change of the taxable base

Suppose a standard invoice is issued with a taxable base of €1,000 and a tax rate of 21%, with a transaction date of 01-04-2025. That is, using the Verifactu API, the invoice is registered with the following JSON:

Factura original
{
  "serie": "A",
  "numero": "1",
  "fecha_expedicion": "19-11-2026",
  "fecha_operacion": "01-04-2025",
  "tipo_factura": "F1",
  "descripcion": "Factura original",
  "nif": "A15022510",
  "nombre": "Nombre destinatario",
  "lineas": [
    {
      "base_imponible": "1000",
      "tipo_impositivo": "21",
      "cuota_repercutida": "210"
    }
  ],
  "importe_total": "1210"
}

After issuing this invoice, a correction is desired consisting of a decrease of the taxable base of 200 euros. Below we show the JSONs needed to perform the substitution using both options: two-step correction and one-step correction.

Change of the taxable base – Two-step correction

Using the two-step correction option, two additional invoicing records are issued to perform the correction. In the first, a negative invoice is issued with a taxable base of -€1,000:

Factura en negativo
{
  "serie": "A",
  "numero": "2",
  "fecha_expedicion": "19-11-2026",
  "tipo_factura": "F1",
  "descripcion": "Factura en negativo",
  "nif": "A15022510",
  "nombre": "Nombre destinatario",
  "lineas": [
    {
      "base_imponible": "-1000",
      "tipo_impositivo": "21",
      "cuota_repercutida": "-210"
    }
  ],
  "importe_total": "-1210"
}

In the second invoicing record, a corrective invoice is issued with a taxable base of €800. Note that the fields base_rectificada and cuota_rectificada are zero.

Rectificacion por sustitucion en dos pasos
{
  "serie": "RECTIFICATIVA",
  "numero": "1",
  "fecha_expedicion": "19-11-2026",
  "fecha_operacion": "01-04-2025",
  "tipo_factura": "R1",
  "tipo_rectificativa": "S",
  "descripcion": "Rectificacion por sustitucion en dos pasos",
  "nif": "A15022510",
  "nombre": "Nombre destinatario",
  "lineas": [
    {
      "base_imponible": "800",
      "tipo_impositivo": "21",
      "cuota_repercutida": "168"
    }
  ],
  "importe_total": "968",
  "importe_rectificativa": {
    "base_rectificada": "0",
    "cuota_rectificada": "0"
  },
  "facturas_rectificadas": [
    {
      "serie": "A",
      "numero": "1",
      "fecha_expedicion": "19-11-2026"
    }
  ]
}

As can be seen, the sum of the three invoicing records is 1210 + (-1210) + 968 = 968, which corresponds to the desired total amount. This is the advantage of performing the correction in two steps — its interpretation is very clear.

Change of the taxable base – One-step correction

Suppose that, instead of issuing a negative invoice followed by the corrective invoice, we wanted to perform the correction with a single invoicing record. This can be done simply by issuing a corrective invoice with a taxable base of €800 and with the fields base_rectificada and cuota_rectificada equal to the value of the invoice being corrected.

Rectificacion por sustitucion en un paso
{
  "serie": "RECTIFICATIVA",
  "numero": "2",
  "fecha_expedicion": "19-11-2026",
  "fecha_operacion": "01-04-2025",
  "tipo_factura": "R1",
  "tipo_rectificativa": "S",
  "descripcion": "Rectificacion por sustitucion en un paso",
  "nif": "A15022510",
  "nombre": "Nombre destinatario",
  "lineas": [
    {
      "base_imponible": "800",
      "tipo_impositivo": "21",
      "cuota_repercutida": "168"
    }
  ],
  "importe_total": "968",
  "importe_rectificativa": {
    "base_rectificada": "1000",
    "cuota_rectificada": "210"
  },
  "facturas_rectificadas": [
    {
      "serie": "A",
      "numero": "1",
      "fecha_expedicion": "19-11-2026"
    }
  ]
}

In this case, as can be seen, it is necessary to take into account the fields base_rectificada and cuota_rectificada to calculate the final balance of the operation.

EXAMPLE 2: Decrease of the taxable base due to non-payment

Suppose a standard invoice is issued with a taxable base of €1,000 and a tax rate of 21%, with a transaction date of 01-04-2025. That is, using the Verifactu API, the invoice is registered with the following JSON:

Factura original
{
  "serie": "A",
  "numero": "1",
  "fecha_expedicion": "19-11-2026",
  "fecha_operacion": "01-04-2025",
  "tipo_factura": "F1",
  "descripcion": "Factura original",
  "nif": "A15022510",
  "nombre": "Nombre destinatario",
  "lineas": [
    {
      "base_imponible": "1000",
      "tipo_impositivo": "21",
      "cuota_repercutida": "210"
    }
  ],
  "importe_total": "1210"
}

After issuing this invoice, it will be subject to correction due to non-payment, eliminating the entirety of the output tax. Non-payment (bad debt, Article 80.Four of the VAT Law) is corrected with an R3 corrective invoice. Below we show the JSONs needed to perform the substitution using both options: two-step correction and one-step correction.

Decrease of the taxable base due to non-payment – Two-step correction

Using the two-step correction option, two additional invoicing records are issued to perform the correction. In the first, a negative invoice is issued with a taxable base of -€1,000 and a tax rate of 21%:

Factura en negativo
{
  "serie": "A",
  "numero": "2",
  "fecha_expedicion": "19-11-2026",
  "tipo_factura": "F1",
  "descripcion": "Factura en negativo",
  "nif": "A15022510",
  "nombre": "Nombre destinatario",
  "lineas": [
    {
      "base_imponible": "-1000",
      "tipo_impositivo": "21",
      "cuota_repercutida": "-210"
    }
  ],
  "importe_total": "-1210"
}

In the second invoicing record, a corrective invoice is issued with a taxable base of €1,000. Note that the fields base_rectificada and cuota_rectificada are zero.

Rectificacion por sustitucion en dos pasos
{
  "serie": "RECTIFICATIVA",
  "numero": "3",
  "fecha_expedicion": "19-11-2026",
  "fecha_operacion": "01-04-2025",
  "tipo_factura": "R3",
  "tipo_rectificativa": "S",
  "descripcion": "Rectificacion por sustitucion en dos pasos",
  "nif": "A15022510",
  "nombre": "Nombre destinatario",
  "lineas": [
    {
      "base_imponible": "1000",
      "tipo_impositivo": "0",
      "cuota_repercutida": "0"
    }
  ],
  "importe_total": "1000",
  "importe_rectificativa": {
    "base_rectificada": "0",
    "cuota_rectificada": "0"
  },
  "facturas_rectificadas": [
    {
      "serie": "A",
      "numero": "1",
      "fecha_expedicion": "19-11-2026"
    }
  ]
}

Decrease of the taxable base due to non-payment – One-step correction

Suppose that, instead of issuing a negative invoice followed by the corrective invoice, we wanted to perform the correction with a single invoicing record. This can be done simply by issuing a corrective invoice with a taxable base of €1,000, output tax equal to zero and with the fields base_rectificada and cuota_rectificada equal to the value of the invoice being corrected.

Rectificacion por sustitucion en un paso
{
  "serie": "RECTIFICATIVA",
  "numero": "4",
  "fecha_expedicion": "19-11-2026",
  "fecha_operacion": "01-04-2025",
  "tipo_factura": "R3",
  "tipo_rectificativa": "S",
  "descripcion": "Rectificacion por sustitucion en un paso",
  "nif": "A15022510",
  "nombre": "Nombre destinatario",
  "lineas": [
    {
      "base_imponible": "1000",
      "tipo_impositivo": "0",
      "cuota_repercutida": "0"
    }
  ],
  "importe_total": "1000",
  "importe_rectificativa": {
    "base_rectificada": "1000",
    "cuota_rectificada": "210"
  },
  "facturas_rectificadas": [
    {
      "serie": "A",
      "numero": "1",
      "fecha_expedicion": "19-11-2026"
    }
  ]
}

Try this case in the test environment

Create your free account, copy the request and send it with the test API key of your test NIF.

Test environment and test NIF includedRead the documentation