LHDN error CV302: a unit or other code is not on LHDN's code list
Updated 18 October 2026
Short answer
CV302 means a value on the document is not in the LHDN code table it belongs to. LHDN's message names the code and the code type. Under CV302 the usual culprit is the unit of measurement, for example a unit typed as "pcs" instead of LHDN's code H87 for piece. Pick a listed code and submit again.
What LHDN's message says
What it means
Many fields on an e-invoice must hold a code from one of LHDN's published code tables: units of measurement, classification codes, tax types, currencies, countries, states and payment modes. CV302 is LHDN's Code validator saying a value is not in its table.
Why it happens
Units are the usual cause because POS and store systems let you name units freely, while LHDN accepts only the codes in its unit types list.
LHDN lists these causes:
- The submitted code value is not found within the allowed code list for the specified Code Type. The system is unable to validate the submitted value against the master reference data maintained by MyInvois.
How to fix it
- Read LHDN's message. It names the code that failed and the code type it was checked against.
- Look up the right value in LHDN's code table for that type. For units, H87 is piece, KGM is kilogram and C62 is one.
- Change the value on the item, and in your product catalogue so future sales use it too.
- Submit the corrected document as a new e-invoice.
LHDN's recommended resolution:
- Verify the submitted code against the latest MyInvois SDK code tables.
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.
envoice ships LHDN's own code lists, copied from LHDN's published files, so units and classifications are picked from LHDN's list rather than typed. For CV302, envoice names the field at fault, so you can see whether it is the unit, country, currency or another code.
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
- CV317: state code 17 used on a Malaysian address
- All LHDN rejection codes, explained
Frequently asked questions
What does LHDN error CV302 mean?
CV302 means a value on the document is not in the LHDN code table it belongs to. LHDN's message names the code and the code type. Under CV302 the usual culprit is the unit of measurement, for example a unit typed as "pcs" instead of LHDN's code H87 for piece. Pick a listed code and submit again.
Does CV302 only mean the unit is wrong?
No. CV302 covers any value missing from an LHDN code table. The unit of measurement is the most common case, but LHDN's message tells you which code type failed.
Where is LHDN's list of unit codes?
In the MyInvois SDK code tables, under Unit Types. Each entry has a code, such as H87, and a name, such as piece.