Go live in Malaysia
Work through this checklist before you send Malaysian e-invoices to LHDN MyInvois in production. You need Malaysian documents that already pass in sandbox and the company's real registration details.
Onboard the company in production
A company onboarded in sandbox is not registered in production.
- In the Invoice Portal, select Malaysia and Production.
- Follow Onboard a Malaysian company with the company’s real details.
- Check the legal name, branch and registration number on the review screens before you select Complete Onboarding.
You should see the screen that confirms onboarding.
Create a production API key
In Developer portal › API keys, create a key under Production API keys. Give it Write access if it sends invoices. See Create an API key.
Link the production source
With Production selected, open Source management and link your production source to your integration mapping and the company’s branch. See Manage sources and their links.
Pass the required test cases
Check that the test cases for Malaysia show Passed in Test your mapping. If your workspace uses the Default GETS Mapping, production documents are refused with 412 until they do.
Switch your requests to production
- Load the production key in place of the sandbox key.
- Send
"environment": "production"in every Unify request. - Set
sourceto the production source’sname:version. - If you use an SDK, change its environment setting to production. Each SDK guide shows where.
Check credits and webhooks
- In the Invoice Portal, open Credits with Production selected and check the balance. See Check your credit balance and usage.
- If you receive purchase invoices through webhooks, create a separate webhook for Production that points to your live endpoint. See Set up a webhook.
Send the first production invoice
Send one real invoice and follow it with its documentId until isTerminal is true. See Submit and retrieve. final_valid means LHDN validated it. rejected or final_invalid means it did not: read errors and government for the reason.
Malaysian checks
- Production documents go to production MyInvois. They are real e-invoices, and nothing from the MyInvois sandbox carries over.
- Use the real TINs and registration numbers of the supplier and the buyer. LHDN checks taxpayer identities, so a sample value that passed your tests can be rejected in production.
- For a credit or debit note, the invoice it refers to must be valid in production MyInvois.
- If you sell to consumers, set up consolidation in the B2C Vault with Production selected.
- Check each document type against the Malaysia field reference and the validation rules.
If something goes wrong
403 with permission_denied: the key is a sandbox key. Use a production key with "environment": "production".
404: the source is not in production. Check its name and version in Source management with Production selected.
412 with failed_precondition: the required test cases for Malaysia have not all passed. Run them, then send the document again.
LHDN rejects a taxpayer identity: confirm the TIN and registration number against the company’s or buyer’s records. Do not replace them with guessed values.
Last updated