LHDN credentials not working
envoice connects to MyInvois with the Client ID and Client Secret from the ERP you registered in MyInvois. When Save and verify fails, the message tells you which part is wrong.
"LHDN rejected this Client ID and Secret"
The full message reads: "LHDN rejected this Client ID and Secret for the production (or sandbox) environment." It has three common causes.
1. Test and production credentials are mixed up
LHDN runs two separate systems, and each gives its own credentials:
- Production credentials come from MyInvois inside MyTax.
- Test credentials come from LHDN's preprod MyInvois portal.
A production Client ID will not work on the test system, and the reverse.
Fix:
- Open Settings, then the LHDN tab.
- Check the Environment you picked matches where the credentials came from: LHDN test system or LHDN production system.
- Paste the matching Client ID and Client Secret, then click Save and verify.
2. The Client Secret is missing or wrong
The Client Secret is shown only once in MyInvois. If you did not copy it, or copied part of it, you need a new one.
Fix: in MyInvois, open Representatives, then the ERP tab, and regenerate the secret for your envoice ERP. Paste Client Secret 1 into envoice.
When you switch environment, enter the secret for that environment. envoice asks for it with: "Enter the Client Secret for the selected LHDN environment. Test and production credentials are separate."
3. The ERP is registered under a different TIN
The ERP must be registered under the same business TIN as this shop. If you manage several companies, check you registered the ERP while logged in to the right company's profile in MyTax.
"LHDN is not responding right now"
LHDN's system is down or slow. Nothing is wrong with your credentials. Try again in a few minutes.
"Credentials verified. Before going live, fill in your real TIN, BRN and MSIC code"
Your credentials work, but your shop still has placeholder business details. Open the Profile tab, enter your real TIN, BRN and MSIC code, save, then verify again.
Credentials stopped working after months
When you registered the ERP, you chose a Client Secret expiry (for example 1 year). When it expires, every submission fails. Regenerate the secret in MyInvois before the expiry date and paste the new one into envoice.