Test in sandbox before you go live
A rejected or wrong document in production is a legal tax record you then have to cancel or correct. Ten minutes of testing first saves that.
Step 1: try the flow on the internal test mock
New shops start on the internal test mock. Nothing goes to LHDN.
- Create a few documents the way you will in real life: a named-buyer invoice, a walk-in sale, and, if you use them, a self-billed invoice and a credit note.
- Check the PDF, the numbering and the totals look right.
- Invite your staff and let them try it with their own role.
Documents on the test mock still count toward your plan usage, so test with a handful, not hundreds.
Step 2: let LHDN check your documents on its test system
The test mock does not apply LHDN's real validation rules. LHDN's test system (preprod) does.
- Register an ERP on LHDN's preprod MyInvois portal and copy its Client ID and Client Secret.
- In envoice, open Settings, then the LHDN tab. Choose LHDN test system, paste the credentials and click Save and verify.
- On the Sandbox tab, choose LHDN test system (preprod), confirm, and save.
- Submit the same kinds of documents again. Fix anything LHDN rejects, such as buyer TINs, classification codes or your own business details.
Step 3: go live
- Fill in your real TIN, BRN and MSIC code on the Profile tab.
- On the LHDN tab, choose LHDN production system and verify your production credentials.
- On the Sandbox tab, choose LHDN production, tick the confirmation and click Save destination.
Tip: rehearse before filing a tricky document
After you go live, you can keep your preprod credentials as rehearsal credentials. A document page then offers a Preprod rehearsal, which sends a stored document to LHDN's test system as a dry run, so you can see whether it validates before filing it for real.