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.

  1. 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.
  2. Check the PDF, the numbering and the totals look right.
  3. 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.

  1. Register an ERP on LHDN's preprod MyInvois portal and copy its Client ID and Client Secret.
  2. In envoice, open Settings, then the LHDN tab. Choose LHDN test system, paste the credentials and click Save and verify.
  3. On the Sandbox tab, choose LHDN test system (preprod), confirm, and save.
  4. 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

  1. Fill in your real TIN, BRN and MSIC code on the Profile tab.
  2. On the LHDN tab, choose LHDN production system and verify your production credentials.
  3. 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.