Any app that submits e-invoices to LHDN on your behalf needs two credentials from the MyInvois Portal: a Client ID and a Client Secret. You get them by registering the app as an ERP System Representative. It takes about ten minutes, and it is the step most stores get stuck on.

Before you start

  • You need the director’s MyTax login — the account your company uses for tax submissions.
  • There are two separate environments:
    • Live: mytax.hasil.gov.my, for real invoices
    • Staging: preprod-mytax.hasil.gov.my, for testing
  • The same login works on both, but the credentials do not. You will repeat the steps below once for Staging and once for Live.

Step 1: First login to the MyInvois Portal

  1. Log in to MyTax with the director’s account.
  2. Click MyInvois in the menu.
  3. Read and accept the terms and conditions, then click Continue.
  4. Complete the Taxpayer profile and User profile. Check every detail carefully — these appear on your e-invoices.

A confirmation page appears once both profiles are saved.

Step 2: Register an ERP system

  1. In the MyInvois Portal, open the profile menu at the top right and choose View Taxpayer Profile.
  2. Scroll down to Representatives and open the ERP tab.
  3. Click Register ERP and fill in:
    • ERP Name: something recognisable, such as “E-invoice API”
    • Client Secret Expiration: your choice (see below)
    • Tick Primary ERP System
  4. Click Register.

Step 3: Copy the Client ID and Client Secret

The portal shows the Client ID and Client Secret once. Copy both into a password manager, tick the box confirming you have copied them, and click Done. Then paste them into your e-invoice app’s setup page.

Three rules that prevent outages

1. Put the expiry date in your calendar. When the Client Secret expires, submissions stop until you generate a new one and update the app. Set a reminder a week before.

2. One pair per application. Do not reuse the same Client ID and Client Secret in a second system. If your accounting software also needs to submit, register a separate ERP system for it.

3. Never regenerate a secret another app is using. A Client Secret is valid in only one place at a time. The moment you regenerate it, the copy your e-invoice app holds stops working — and e-invoices submitted with it, including ones customers have already requested, are affected.

Staging first, then Live

Use the Staging credentials to run a few test orders through the full flow: the customer request, the form, and LHDN validation. Check the results in the preproduction portal. Once everything works, generate the Live credentials and switch the app to Live.

Checklist

Step Done when
First login Taxpayer and user profiles saved
Register ERP ERP system listed under Representatives
Copy credentials Client ID and Secret stored safely
Staging test Test e-invoices validated in the preprod portal
Go live Live credentials entered, environment set to Live
Reminder Calendar entry before the secret expires

With credentials in hand, connect your store using our e-invoice integrations, or see the full e-invoicing checklist for online stores.