Invoice with several VAT rates in TicketBAI
An invoice with products at different VAT rates has one desglose_iva entry per rate, with its base and tax amount.
| Field | Value |
|---|---|
| API | TicketBAI API |
| Invoice type or key | Varias entradas en desglose_iva |
| Endpoint | /ticketbai/create |
| When to use it | Invoices with lines at different VAT rates. |
What changes in this case
The invoice lines (lineas) describe what is sold; VAT is summarised in desglose_iva, grouped by rate. The example has €200 at 21% and €100 at 10%, so there are two entries.
desglose_iva takes up to 12 entries. The rates the API accepts are 0, 2, 4, 5, 7.5, 10 and 21.
JSON request
Factura con varios tipos de IVA
{
"serie": "Ejemplos",
"numero": "1",
"fecha_expedicion": "19-11-2026",
"descripcion": "Factura con varios tipos de IVA",
"nif": "A15022510",
"nombre": "Nombre destinatario",
"cp": "48001",
"direccion": "Calle Ejemplo 1, Bilbao",
"lineas": [
{
"descripcion": "Producto al 21 %",
"cantidad": "1",
"importe_unitario": "200.00",
"importe_total": "242.00"
},
{
"descripcion": "Producto al 10 %",
"cantidad": "1",
"importe_unitario": "100.00",
"importe_total": "110.00"
}
],
"desglose_iva": [
{
"base_imponible": "200.00",
"tipo_impositivo": "21",
"cuota_impuesto": "42.00"
},
{
"base_imponible": "100.00",
"tipo_impositivo": "10",
"cuota_impuesto": "10.00"
}
],
"importe_total": "352.00"
}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.