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.

  1. In the Invoice Portal, select Malaysia and Production.
  2. Follow Onboard a Malaysian company with the company’s real details.
  3. 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.

Authorise the intermediary in production MyInvois

The intermediary you added in the sandbox (preprod) portal does not carry over. In the production MyInvois portal, add Complyance as the company’s intermediary, as described in Authorise the intermediary in MyInvois.

Upload the digital certificate

With Production selected, upload the company’s certificate in the Digital Certificate row, as described in Add the company’s digital certificate. Note its expiry date, and renew it before then.

Move your integration to production

  • Create a key under Production API keys with Write access. See Create an API key.
  • With Production selected, link your production source to your mapping and the company’s branch. See Manage sources and their links.
  • Send "environment": "production" and the production source’s name:version in every Unify request. If you use an SDK, change its environment setting; each SDK guide shows where.
  • Check the production credit balance in Credits, and create a separate production webhook if you receive webhooks. See Credits and Set up a webhook.
  • If you sell to consumers, set up consolidation in the B2C Vault with Production selected.

Check the required test cases

If your workspace uses the Default GETS Mapping, the test cases for Malaysia must show Passed in Test your mapping. Until they do, Unify refuses invoices with 412 and failed_precondition, in sandbox and in production.

Send the first production invoice

Send one real invoice, issued no more than 72 hours before you send it, and follow it with its documentId until isTerminal is true. See Submit and retrieve. final_valid means LHDN marked it valid. final_invalid means LHDN marked it invalid, and rejected means it failed validation before it reached LHDN. 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.
  • A validated document can be cancelled, or rejected by the buyer, for 72 hours after LHDN marks it valid. Cancel in the MyInvois portal; see the life of a Malaysian e-invoice.
  • 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. Unify errors lists each reason.

422 with MY-DATE-002: the issue date and time are more than 72 hours old. Issue the document again with the current date and time.

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.