Credit note in TicketBAI: example
In the TicketBAI API, a credit note is a corrective invoice by differences with negative amounts: rectificativa with codigo R1 and tipo I, and the original invoice in rectificadas_sustituidas.
| Field | Value |
|---|---|
| API | TicketBAI API |
| Invoice type or key | Rectificativa R1 por diferencias, en negativo |
| Endpoint | /ticketbai/create |
| When to use it | Returns and discounts after the invoice. |
What changes in this case
A credit note adjusts the balance of an earlier invoice, for example after a return or a later discount. Code R1 covers an error founded in law and sections One, Two and Six of article 80 of the Foral VAT Rule; tipo I means the invoice carries only the difference.
In the example one of the two products on the original invoice is returned: the line, desglose_iva and importe_total are negative. Like every corrective invoice other than R5, it carries a recipient (nif and nombre).
JSON requests
Original invoice
{
"serie": "Ejemplos",
"numero": "1",
"fecha_expedicion": "19-11-2026",
"descripcion": "Factura original",
"nif": "A15022510",
"nombre": "Nombre destinatario",
"cp": "48001",
"direccion": "Calle Ejemplo 1, Bilbao",
"lineas": [
{
"descripcion": "Producto",
"cantidad": "2",
"importe_unitario": "100.00",
"importe_total": "242.00"
}
],
"desglose_iva": [
{
"base_imponible": "200.00",
"tipo_impositivo": "21",
"cuota_impuesto": "42.00"
}
],
"importe_total": "242.00"
}Credit note
{
"serie": "ABONOS",
"numero": "1",
"fecha_expedicion": "19-11-2026",
"descripcion": "Devolución de un producto",
"nif": "A15022510",
"nombre": "Nombre destinatario",
"cp": "48001",
"direccion": "Calle Ejemplo 1, Bilbao",
"rectificativa": {
"codigo": "R1",
"tipo": "I"
},
"rectificadas_sustituidas": [
{
"serie": "Ejemplos",
"numero": "1",
"fecha_expedicion": "19-11-2026"
}
],
"lineas": [
{
"descripcion": "Devolución de producto",
"cantidad": "-1",
"importe_unitario": "100.00",
"importe_total": "-121.00"
}
],
"desglose_iva": [
{
"base_imponible": "-100.00",
"tipo_impositivo": "21",
"cuota_impuesto": "-21.00"
}
],
"importe_total": "-121.00"
}Related cases
Try this case in the test environment
Create your free account and ask soporte@verifacti.com for a TicketBAI test NIF; then copy the request and send it with its test API key.