4-way matching: when to add the quality certificate to invoice-PO-delivery note matching
ininvoice: 4-way matching extends three-way (invoice, PO, delivery note) with a fourth document: the quality inspection result or batch certificate of analysis. The invoice is not approved while quality is pending or rejected. It is the standard when batch traceability is not optional: pharma, regulated chemicals, food under HACCP, aerospace and defence. In non-regulated sectors, three-way still suffices.
If you are CFO of a regulated SME
Why paying before batch release is direct exposure to recall and regulatory fines.
If you are quality manager
How the certificate of analysis cross-checks against the invoice line without slowing the legitimate payment flow.
If you are CEO of a SME
9-question checklist to know if you need 4-way or your current three-way already covers it.
Three-way matching covers most companies that receive invoices. You ordered, you received, you were billed. But there are sectors where receiving the material does not mean it is valid: quality is decided afterwards, in the lab or incoming inspection. While that decision is pending, the invoice should not be paid.
This article is for finance and quality managers of SMEs in pharma, chemicals, regulated food, aerospace and defence. When the delivery note does not prove acceptance, three-way stops protecting you.
What 4-way matching is
4-way matching cross-checks four sources before approving payment: purchase order (what you ordered), delivery note (what entered the warehouse), invoice (what you are billed) and quality inspection result (batch approval or rejection: internal record, supplier CoA or qualified-person release).
The difference with three-way is substantial. In three-way, the signed delivery note equals acceptance. In 4-way, receiving is just the beginning: the material enters pending inspection and the invoice is held until a verdict.
When to apply it
4-way is not a generic upgrade over three-way. It is the reasonable minimum when:
- There is a regulatory obligation to release the batch before use (pharma GMP, food HACCP, aerospace).
- There is a contractual requirement of batch-level documented traceability.
- The cost of a rejected batch far exceeds the administrative cost of holding the invoice for a few days.
- There is recall risk with reputational or safety impact.
In other cases, line-by-line three-way remains proportionate. The fourth lane adds operational cost and only makes sense where quality is decided after receipt.
4-way in pharma
In pharma it is the most natural application. Good Manufacturing Practices (GMP) require every batch of raw material, active substance or packaging material to undergo documented release before being incorporated into the product. The guidelines of the International Council for Harmonisation (ICH) place batch traceability as a structural element of the quality system.
In Spain, the AEMPS is the GMP inspection authority. Paying an invoice for a batch not yet released leaves an inconsistent documentary trail.
The fourth document here is usually the internal batch release record, the supplier's certificate of analysis (CoA) or the qualified person's signature in the QMS.
4-way in regulated chemicals
In industrial chemicals, the fourth document depends on the product. For reagents and raw materials, the certificate of analysis (CoA) is the central piece: it identifies the batch, the CAS number of each component, the analytical ranges and conformity with the specification. For hazardous substances, the safety data sheet (SDS) is added.
The invoice is blocked when the CoA does not accompany the batch, the batch number does not match the delivery note, analytical values fall outside spec or the SDS is outdated. The material may have entered the warehouse and still be unusable.
4-way in regulated food
In food, the HACCP system imposes full batch traceability from supplier to consumer. The international reference is Codex Alimentarius (FAO/WHO), transposed into European and Spanish regulation.
The fourth document is usually a certificate of origin, incoming control analytical results (microbiology, residues) and cold-chain verification when applicable. Companies serving large chains add private audits (BRC, IFS) requiring documentary evidence per batch. 4-way is the financial reflection of the quality process already in place on the production floor.
Formulas and matching
4-way does not change three-way formulas: line-by-line matching, pre-tax prices, units and unit prices against the PO. What changes is the quality status per line or per batch: APPROVED, REJECTED, INSPECTION PENDING or QUARANTINE.
Approval logic:
- All APPROVED and three-way ok → invoice ready for payment.
- Any line REJECTED → blocked, opens return and credit note.
- Any line PENDING → in queue until verdict.
- Mixed lines → partial payment, withholding the rest.
Matching is between batch number on the delivery note and on the quality document. If QMS and ERP do not share that key, 4-way cannot be automated and remains as manual verification.
Do your quality process and AP share batch numbers?
If the answer is no, someone is already doing 4-way with a spreadsheet. See how we trace it in ininvoice with your real invoices.
Risks of not doing it
In regulated sectors, not applying 4-way matching is not inefficiency. It is measurable exposure.
- Paying batches that are later rejected. Invoice already paid, slow and conflictive recovery via credit note.
- Recall overcosts. An unreleased batch reaching the market triggers a retrieval cost orders of magnitude above the administrative saving.
- Regulatory risk. GMP, HACCP or sector inspections detect inconsistencies between releases and financial records.
- Customer loss. Customer audits in aerospace, defence and large food chains review documentary traceability. An inconsistency costs the contract.
ininvoice and 4-way matching
ininvoice is pure AP automation software. It performs line-by-line three-way matching with configurable tolerance, automatic ingestion from Gmail or Outlook, reading of PDF and FacturaE/XML, duplicate detection and export to Holded, Sage and A3.
On 4-way: the invoice-PO-delivery note matching covers most of the logic. Quality status and matching against the inspection/CoA document is currently managed via exception routing: the invoice is held in a dedicated queue until a user with quality permissions confirms release.
In practice, ininvoice can be the financial piece of 4-way while your quality system remains the source of truth for batch release. The bottleneck stops being keying and becomes verdict.
Checklist to evaluate your process
Seven questions to decide whether you need 4-way or whether your three-way already covers the risk:
- Do you receive materials whose quality is decided after entering the warehouse?
- Do you have a regulatory obligation to release the batch (GMP, HACCP, aerospace, defence)?
- Does any customer audit you with line-level batch traceability criteria?
- Does the batch number travel on the delivery note and on the CoA with the same key?
- Do your QMS and your ERP share batch number in a comparable format?
- Do you today have invoices paid before quality releases the batch?
- Is there a clear "qualified person" role with release authority?
Three or more "yes" is a strong signal that 4-way is not optional, even if you are running it with a spreadsheet today.
How many invoices do you pay before batch release?
4-way matching becomes operational when the held-invoice queue is traceable. Try it with your real invoices and measure how many were approved without a verdict.
Frequently asked questions
- What is the difference between 3-way and 4-way matching?
- Three-way matches invoice, PO and delivery note. 4-way adds a fourth document: the quality inspection or certificate of analysis. The invoice is not approved while quality is pending or rejected.
- Is 4-way matching mandatory in pharma?
- It is not a direct accounting obligation, but it is the financial reflection of the GMP batch release process. Check your specific case with regulatory adviser and AEMPS.
- Can I do 4-way without a connectable QMS?
- Yes, via exception routing. The invoice is held in a dedicated queue and only a user with quality permissions releases it. Manual but traceable, much safer than "someone will check".
- What if the supplier delays delivering the CoA?
- Renegotiate the payment term so it starts from CoA delivery, not from invoice date. Standard practice in sectors where the batch requires release.
- Is 4-way useful if I have a single plant and few suppliers?
- If you are in a regulated sector, yes. The obligation is not driven by volume but by product nature and regulatory framework.
- Is 4-way compatible with touchless AP?
- Yes, if the quality document arrives structured (digital CoA, connectable QMS) and the batch number cross-matches automatically. Where not, part of the flow remains in exception routing.
Three things to remember
- In regulated sectors, receiving does not equal accepting. The invoice is not paid while quality has not released the batch.
- The fourth document (release record, CoA, certificate of origin) is matched by batch number against delivery note and PO line.
- If QMS and AP do not share batch key, 4-way is run with exception routing: traceable and auditable, even if not ideal.
Try ininvoice with your invoices. See pricing and features.
Related content
See a demo with my invoices
Connect Gmail or Outlook. ininvoice ingests, cross-checks line by line against PO and delivery note and holds those awaiting a quality verdict.
Get startedEUR 249/month · No lock-in · Plug and play, no implementation cost