Verifactu invoice examples with the API
Here are 26 Verifactu invoice examples, one per invoice type or case (simplified, full, corrective R1–R5, intra-EU, exports, exempt, IGIC, IPSI, credit notes, exchange, cancellation and amendment), with the JSON request to the Verifacti Verifactu API ready to copy.
Invoice types and examples
| Case | Invoice type or key | When to use it |
|---|---|---|
| Simplified invoice | F2 | Receipts and small amounts, with no tax details of the recipient. |
| Full invoice | F1 | Invoice with the recipient’s tax details. |
| Several VAT rates | F1 · varios tipo_impositivo | One entry in lineas per VAT rate. |
| Intra-EU B2B goods | F1 · E5 · id_otro tipo 02 | Sale of goods to EU businesses or professionals with a valid VAT number in VIES. |
| Intra-EU B2B services | F1 · N2 · id_otro tipo 02 | Services to EU businesses or professionals. |
| Intra-EU B2C below the threshold | F1 · S1 · id_otro tipo 03, 04 o 06 | Distance sales and electronic services to EU consumers below €10,000 a year. |
| Intra-EU B2C above the threshold (OSS) | F1 · clave_regimen 17 · N2 | Distance sales and electronic services to EU consumers above €10,000 a year. |
| Export of goods | F1 · clave_regimen 02 · E2 | Sale of goods leaving the EU. |
| Services outside the EU | F1 · N2 | Services to customers outside the EU. |
| VAT-exempt invoice | F1 · E1 | Operations exempt under the VAT Law. |
| Invoice with IGIC | F1 · impuesto 03 | Operations in the Canary Islands. |
| Invoice with IPSI | F1 · impuesto 02 | Operations in Ceuta and Melilla. |
| Disbursements and withholding | — | Income tax withholding and disbursements: as a rule, not in the record. |
| Non-taxable operation | F1 · N1 | Operations outside the scope of VAT. |
| Credit note | F1 con importes negativos | Full refund of what was invoiced: F1 with negative amounts. |
| Exchange invoice | F3 · facturas_sustituidas | Replace a simplified invoice with a full one. |
| Corrective invoices | R1 a R5 | Correct an invoice already issued: types R1 to R5. |
| ↳ Corrective invoice by substitution | R1–R5 · tipo_rectificativa S | Replace the original invoice, in one or two steps. |
| ↳ Corrective invoice by difference | R1–R5 · tipo_rectificativa I | Correct only the difference, in one step. |
| Equivalence surcharge | F1 · clave_regimen 18 · tipo_recargo_equivalencia | Sales to retailers under the equivalence surcharge. |
| Issued by a third party | F1 · emitida_por_tercero_o_destinatario T | A third party issues the invoice on the seller’s behalf. |
| Self-billing | F1 · emitida_por_tercero_o_destinatario D | The customer issues the invoice (self-billing). |
| REBU (used goods) | F1 · clave_regimen 03 | Sale of used goods, art or antiques on the margin. |
| Reverse charge | F1 · S2 | The buyer self-assesses the VAT (construction, gold, phones…). |
| Cancellation | /verifactu/cancel | Cancel an invoice issued by mistake. |
| Amendment (subsanación) | /verifactu/modify · rechazo_previo | Changes with no tax effect to a record already sent. |
How to use these examples
The examples start with simplified invoices, continue with full invoices, corrective invoices and exchanges, and end with cancellation and amendment.
Each case comes with the JSON request to the Verifactu API, with tabs for cURL, Python, JavaScript, Node.js, PHP, Go, Java, C# and VB6. Copy it and try it with the test API key of your free account: the issue date is already today's. The Verifactu XML example (the record the API generates) and the response will be added to each case later.
Questions about the examples
FAQ VerifactuWhen and how should corrective invoices and credit notes be used?
- Whenever you want to modify any aspect of an invoice (accepted, partially accepted, or rejected) that involves a change in fiscally relevant data (such as recipient, amount, tax rate, etc.), you must always use a corrective invoice.
- Corrective invoices are types R1, R2, R3, R4, or R5.
- Corrective invoices are new invoices with a different series from the original, and with their own QR.
- These additional invoices must be delivered to the recipient.
- When you issue a corrective invoice (including F3), you reference the original invoice. However, the AEAT does not appear to verify whether the original invoice was previously sent or anything of the sort.
- The only exception is when you issue an invoice for goods that are subsequently returned in full. In that case, it is sufficient to issue a normal "negative" invoice. This is an ordinary invoice with a negative total amount that can go in the same series.
- It would be a standard F1 invoice.
- The fact that a negative F1 can be issued is made very clear in the AEAT examples, which can be found at the following link.
- These additional invoices must be delivered to the recipient.
- Credit notes do not require their own series; they can go in the same series as the original invoice.
How do I include disbursements (suplidos)?
How do I include IRPF (income tax) withholdings?
What is the QR code and how do I obtain it?
- Issuer NIF
- Series
- Number
- Date
- Amount
Try the examples in the test environment
Create your free account and send any of these requests with the test API key of your test NIF.