Skip to content
← LHDN e-invoice rejection codes: what they mean and how to fix them

LHDN error DR313: the referenced document's number does not match its UUID

Updated 18 October 2026

Short answer

DR313 means a note references a document UUID, but the internal ID (the invoice number) sent with it belongs to a different document. LHDN needs both to describe the same e-invoice. Take the UUID and the invoice number from the same original document and submit again.

What LHDN's message says

DR313 (Referenced Documents validator): “Internal ID for DocumentUUID {0} is mismatched.” Read LHDN's guidance for DR313

What it means

A note references its original e-invoice twice: by the UUID LHDN assigned, and by the internal ID, the document number you gave it. LHDN checks that both point to the same record.

Why it happens

They drift apart when the UUID and the number are copied from two different documents, or when the original was reissued under a new number.

LHDN lists these causes:

  • The Internal ID associated with the referenced document UUID does not match the document record maintained by the system.

How to fix it

  1. Open the original e-invoice and note its UUID and its internal document number.
  2. Make sure the note carries both values from that one document.
  3. Submit the corrected note.

LHDN's recommended resolution:

  • Ensure UUID and Internal ID belong to the same document record.

How envoice handles it

When LHDN rejects a document, envoice shows a Rejection reason box on it. Each line names the field at fault, explains the cause in plain language, gives the fix where envoice knows it, and quotes LHDN's own sentence with a link to LHDN's guidance for that code. The explanation is shown in English or Bahasa Melayu.

For this code, envoice's rejection reason reads: The document this note references is missing, mismatched or already cancelled. Reference the validated original invoice, make sure its UUID and internal number match, and check that it is not cancelled.

A note issued from an invoice in envoice carries that invoice's own number and UUID.

Click Fix & resubmit to open the invoice form prefilled from the rejected document, correct the field, and submit it as a new e-invoice. The shop owner also gets one email when a document is rejected, so a rejection is not discovered weeks later. See Why was my document rejected?

Related codes

Try envoice free, no credit card

Frequently asked questions

What does LHDN error DR313 mean?

DR313 means a note references a document UUID, but the internal ID (the invoice number) sent with it belongs to a different document. LHDN needs both to describe the same e-invoice. Take the UUID and the invoice number from the same original document and submit again.

What is the internal ID?

The document number you gave the original e-invoice, such as INV-0042. LHDN stores it next to the UUID it assigned.

I fixed the number. Do I need a new note?

Yes. A rejected note was never validated, so you submit the corrected note as a new document.

Sources