LHDN error CV317: state code 17 used on a Malaysian address
Updated 18 October 2026
Short answer
CV317 means a Malaysian address on the document uses state code 17 (Not applicable). LHDN reserves code 17 for foreign addresses and consolidated e-invoices. Pick the real state, codes 01 to 16, on the buyer or shipping address and submit again.
What LHDN's message says
What it means
Every address on an e-invoice carries a code from LHDN's state code list. Codes 01 to 16 are the Malaysian states and federal territories, for example 10 for Selangor and 14 for Wilayah Persekutuan Kuala Lumpur. Code 17 means Not applicable: it is for an address outside Malaysia, or for the general public buyer on a consolidated e-invoice.
Why it happens
It can appear when a buyer's state was left blank and a system filled in 17 as a default, or when a placeholder address from a consolidated document was reused for a named buyer.
LHDN lists these causes:
- State Code 17 is reserved for non-Malaysian addresses and consolidated e-Invoice scenarios.
- The submitted document uses State Code 17 in an unsupported scenario.
How to fix it
- Open the rejected document and check the buyer address and, if there is one, the shipping address.
- For a Malaysian address, pick the real state (codes 01 to 16).
- Keep code 17 only for a foreign address or a consolidated e-invoice.
- Submit the corrected document as a new e-invoice.
LHDN's recommended resolution:
- Verify whether the transaction is a consolidated e-Invoice.
- For Malaysian addresses, use State Codes 01-16 as applicable.
- Use State Code 17 only for foreign addresses or approved consolidated invoice scenarios.
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.
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
- CV302: a unit or other code is not on LHDN's code list
- All LHDN rejection codes, explained
Frequently asked questions
What does LHDN error CV317 mean?
CV317 means a Malaysian address on the document uses state code 17 (Not applicable). LHDN reserves code 17 for foreign addresses and consolidated e-invoices. Pick the real state, codes 01 to 16, on the buyer or shipping address and submit again.
When can I use state code 17?
Only for an address outside Malaysia, or for a consolidated e-invoice. LHDN rejects code 17 on any Malaysian address.
Which address does CV317 point to?
LHDN's error includes the path of the field at fault. In envoice the rejection reason names it, for example Buyer state code or Shipping state code.