A duplicate invoice is the same invoice recorded or paid twice. You detect it before payment by comparing, all at once, the supplier’s tax ID, the normalised number, the date, the amount and the file hash. The number is a good key because invoice numbers must be sequential: in Spain, Article 6 of Royal Decree 1619/2012 requires consecutive numbering within each series.
What a duplicate invoice is (and what it is not)
In accounts payable, a duplicate invoice is the same supplier invoice entering the system twice and at risk of being paid twice. The problem is not the repeated paper: it is the second payment.
Do not confuse it with the legal invoice duplicate. In Spain, Article 14 of the Invoicing Regulation says that only one original of each invoice may be issued, allows duplicates in specific cases, such as loss of the original, and requires each copy to bear the word “duplicado” (duplicate). That duplicate is correct. What you need to avoid is recording and paying the same transaction twice.
Corrective invoices and credit notes are not duplicates either, even though they look like the original. We tell them apart further down.
Why invoices get paid twice: the 7 usual causes
It is almost never one person’s oversight. These are gaps in the process that let the same invoice through by different routes:
- Several input channels. The invoice arrives by email, on paper and through the supplier portal, and each channel records it separately.
- The supplier’s reminder. The supplier resends the same invoice when they see it has not been paid, and it is recorded as if it were new.
- The number keyed in two ways. “FRA-0012”, “FRA 12” and “12” are the same invoice to a person, but three different numbers to an exact comparison.
- Supplier set up twice. If the same supplier has two records in the master file, with slightly different names, the invoice does not match itself.
- Pro forma and final invoice. The pro forma is paid to speed up an order, then the final invoice arrives and is paid again in full.
- The corrective invoice treated as a new one. If the corrective invoice fully replaces the original and both are paid, the amount goes out twice.
- The urgent payment outside the process. Someone pays by hand because the supplier is pushing, and the invoice carries on along its normal path to the payment run.
There is an eighth cause that is not a mistake: fraud, with fake invoices or a change of bank account. It has its own section.
Time pressure makes all of the above worse. In Spain, Law 3/2004 on late payment sets a 30-day payment term, which can be extended by agreement to a maximum of 60. If invoices are approved late, they are paid in a hurry, and in a hurry nobody checks anything.
Which keys to compare to detect duplicates
No single key is enough: you need to combine exact comparisons, which block, with approximate comparisons, which warn. The invoice number is the backbone across Europe, because the EU VAT Directive (2006/112/EC, Article 226, point 2) requires every invoice to carry a sequential number, based on one or more series, which uniquely identifies it. This table summarises what each control detects and what it misses.
| Control | What it detects | What it misses | Action |
|---|---|---|---|
| Tax ID + number + year | The same invoice recorded twice | Numbers keyed in differently | Block |
| Normalised number | “FRA-0012” versus “12”: strips spaces, hyphens, prefixes and zeros | A supplier with two records in the master file | Block |
| File hash | The same PDF or XML uploaded twice, through any channel | A fresh scan of the same paper | Block |
| Document tax key | E-invoices with a unique identifier, such as the fiscal folio of the Mexican CFDI | Paper or PDF invoices without an identifier | Block |
| Supplier + amount + nearby date | The same invoice with the number misread or mistyped | Nothing serious, but it gives false positives (identical monthly fees) | Review |
| Amount + IBAN, different supplier | A supplier duplicated in the master file or possible fraud | Legitimate payments to a shared group account | Review |
Two practical tips. First, the approximate control has to recognise legitimate recurring charges, such as rent or a monthly fee of the same amount; that is why it warns instead of blocking. Second, many duplicates are born in the supplier master file, not in the invoice. If you set up each supplier only once, with a validated tax ID, half the problem disappears.
When to check: the three control points
Duplicate checks work better the earlier they happen, but they need a final filter before the money leaves. That means three control points and a review afterwards:
- On receipt. Before anyone approves it, the invoice is compared with everything already recorded. This is the cheapest point: nobody has spent any time on it yet.
- On approval. Matching with the purchase order and the delivery note catches what the invoice comparison misses: if the order has already been fully invoiced, the second invoice is surplus even if it has a different number.
- Before the payment run. The final filter: no invoice goes into the payment run if there is already a payment to the same supplier for the same amount and description. This is where urgent manual payments get caught.
- Periodic payment review. Once a quarter, cross-check the payments made against the keys in the table. Whatever turns up is claimed back from the supplier and used to fix the process.
Purchase order matching is the piece that prevents the most duplicates and the one most companies skip. We cover it in detail in how to automate supplier invoice approval.
Duplicate, corrective invoice or pro forma: how to tell them apart
These documents look like a repeated invoice but are not, and each one is handled differently. Confusing them is the most common way to overpay or to block something that should have been paid.
| Document | How to recognise it | What to do |
|---|---|---|
| Legal duplicate | Bears the word “duplicado” (in Spain, Article 14 of the Invoicing Regulation) | File it with the original; do not record or pay it again |
| Corrective invoice | Its own series and identifies the invoice it corrects (Article 15) | Pay or deduct only the difference, or replace the original if it cancels it entirely |
| Pro forma | States that it is a pro forma; it is not an invoice | If a payment is made in advance, link it to the order so it is deducted from the final invoice |
| Supplier resend | Same number, same date and same amount as one already recorded | Block it and reply to the supplier with the actual status of their invoice |
If you receive many invoices from Latin America, each country has its own tax identifier and its own way of cancelling or replacing an invoice; see how the Dokuflex supplier portal validates e-invoices country by country.
Fraud: fake invoices and bank account changes
The most expensive duplicate is not a mistake: it is an invoice copied from a real one, with a different account number, or an email impersonating the supplier asking you to pay “from now on” into a new account. Duplicate checks bring it to the surface, because the fake invoice looks very similar to one already recorded.
Spain’s National Cybersecurity Institute (INCIBE), in its guide on business email compromise fraud, recommends two checks that fit into any accounts payable process:
- Verify through another channel. Any request to change bank account is confirmed through a channel other than email, with a contact you already had.
- Check the account. Make sure the account number belongs to the supplier issuing the invoice.
If the payment has already been made, the same guide says the first step is to contact the bank. In practice, this means each supplier’s IBAN has to live in the master file, with its change history and an approval to modify it, and not in the footer of each invoice.
What to do if you have already paid an invoice twice
First recover the money, then correct the accounts and, finally, fix the cause. In that order:
- Claim it back from the supplier. Ask for a refund or agree to offset it against the next payment, and put the agreement in writing. A regular supplier will usually accept without any problem; with an occasional one, the sooner you ask, the better.
- Correct the accounts. If the invoice was recorded twice in the received invoices register, the VAT was also deducted twice. Review it with your tax adviser so it can be corrected in the relevant return.
- Find the cause. Work out which of the seven routes the duplicate came through and close that gap. If it was an urgent payment, the problem is the process, not the person.
What changes with mandatory e-invoicing
Business-to-business e-invoicing will reduce duplicates, but it will not eliminate them during the transition. In Spain, Royal Decree 238/2026 makes it mandatory for companies with turnover above €8 million 12 months after the ministerial order comes into force, on 6 October 2026, and for everyone else after 24 months.
- Data without reading errors. The number, tax ID and amount arrive as structured data, not as text that has to be read. Exact comparison becomes much more reliable.
- Reported statuses. The recipient will have to report the acceptance, rejection and actual payment of each invoice. A double payment will leave a trace outside your company.
- Mixed channels for years. Until 2028, XML, PDF by email, paper and portals will coexist. The same invoice will still be able to come in through two routes.
The full timeline and what you need to prepare are in mandatory B2B e-invoicing in Spain and receiving supplier e-invoices.
How Dokuflex solves it: the duplicate is stopped on arrival
Dokuflex, the AI low-code BPM platform, treats the supplier invoice as a process: it comes in through any channel, is read, validated, approved, posted and marked as paid. Duplicate checks are built into that journey, not kept in a separate spreadsheet.
- A single point of entry for email, scanner, mobile and ERP: wherever the invoice comes from, it goes through the same check.
- Three duplicate checks in the supplier portal: the same number from the same supplier in the same year, the same file by its hash and the same country tax key, such as the CFDI fiscal folio.
- Validation against the purchase order and approval by amount, cost centre or project, with doubtful cases sent to human review.
- Matching with bank transactions to know which invoices have been paid, without manual reconciliation.
The full flow, with AI reading and posting to SAP, Sage, A3 or Holded, is in Dokuflex supplier invoice management. If you would rather see it with your own invoices, bring us your invoice flow and we will review it in 30 minutes.
Frequently asked questions
How do you detect duplicate invoices?
By comparing each new invoice with those already recorded using several keys at once: the supplier’s tax ID, the normalised invoice number (without spaces, hyphens or leading zeros), date and amount, and the file hash. An exact match is blocked; a partial match, such as the same supplier and amount with a different number, is sent for review.
What is the difference between a duplicate invoice and a legal invoice duplicate?
In Spain, an invoice duplicate is a legal concept: Article 14 of the Invoicing Regulation allows a duplicate to be issued, for example if the original is lost, and requires it to bear the word “duplicado” (duplicate). A duplicate invoice, in accounts payable, is the same invoice recorded or paid twice by mistake. The first is correct; the second is what you need to avoid.
Why do invoices get paid twice?
The most common causes are that the same invoice arrives through several channels, the supplier resends it as a reminder, the number is keyed in differently, the supplier is set up twice, the pro forma is paid and then the final invoice, a corrective invoice is treated as a new one, or an urgent payment is made outside the normal process.
What should I do if I have paid a supplier invoice twice?
Ask the supplier for a refund or offset it against the next payment, and put the agreement in writing. If you also recorded the invoice twice in your received invoices register, review the VAT deduction with your tax adviser, because it will have been deducted twice. Then find the cause in the process so it does not happen again.
Will mandatory e-invoicing put an end to duplicates?
It will reduce them, because the data arrives structured and free of reading errors, and because in Spain Royal Decree 238/2026 requires the acceptance, rejection and payment of each invoice to be reported. But while PDF, paper and portals coexist, the same invoice can still come in through two routes, so duplicate checks remain necessary.
When should you check whether an invoice is a duplicate?
At three points: on receipt, before anyone approves it; on approval, by matching it with the purchase order; and just before the payment run, as a final filter. On top of that, it is worth periodically reviewing payments already made to recover anything that slipped through.
Sources
Consulted on 4 December 2026.
- Council Directive 2006/112/EC on the common system of value added tax: Article 226, point 2, a sequential number, based on one or more series, which uniquely identifies the invoice.
- Spanish Royal Decree 1619/2012, Invoicing Regulation (consolidated text): Article 6, consecutive numbering within each series; Article 14, duplicates; Article 15, corrective invoices.
- Spanish Law 3/2004 of 29 December on combating late payment in commercial transactions: Article 4, payment terms.
- Spanish Royal Decree 238/2026 of 25 March: electronic invoicing between businesses and professionals and reporting of invoice statuses.
- INCIBE, Spain’s National Cybersecurity Institute: business email compromise fraud (in Spanish): verify through a channel other than email and check that the account belongs to the invoice issuer.
Make sure no invoice is ever paid twice
Bring your supplier invoice flow. In 30 minutes we look at where duplicates get in and how to stop them before the payment run. Or create a free account and try the flow with your own invoices.