E-invoicing
Send each brand's invoices to LHDN MyInvois as e-invoices: on their own for buyers who need one, or in the monthly consolidated e-invoice, signed with your digital certificate.
Who can use this: Admins and the Owner connect MyInvois (
integrations:manage) and add the signing certificate (books:admin). Managers and above send, consolidate, check and cancel e-invoices (books:manage).
Before you start
- Register an ERP system under your taxpayer profile in the MyInvois portal to get a client ID and client secret. Do it in the sandbox (preprod) portal first.
- Fill in the brand's company details under Accounting → Settings → Company. LHDN refuses e-invoices without the Tax identification number (TIN), the Registration number (SSM), the MSIC code and Business activity, the Phone and the Address with its city and state. The E-invoices page lists anything missing.
- Give customers who need an e-invoice their billing details: TIN, ID type and ID number (business registration, MyKad, passport or army ID), and address.
Connect MyInvois
Each brand is its own taxpayer, so the connection is always for one brand.
- Go to Workspace → Integrations → LHDN MyInvois and connect it for the brand.
- Fill in the fields below.
- Press Test. Antero gets a token and checks the TIN against the company's SSM number.
| Field | Notes |
|---|---|
| Environment | Sandbox (testing) (the default) or Production. |
| Client ID | From the MyInvois portal. |
| Client secret | Kept encrypted; only its last four characters are shown again. |
| Taxpayer TIN | The TIN of the company issuing the invoices, such as C1234567890. |
| This client belongs to | The taxpayer itself or An intermediary acting for the taxpayer. |
Accounting → E-invoices then appears in the menu, marked Sandbox or Production. See Integrations.
Signed (version 1.1) or unsigned (version 1.0)
LHDN expects e-invoices signed with the company's digital certificate (version 1.1). Without a certificate, Antero sends them unsigned as version 1.0.
- On Accounting → E-invoices, under Signing certificate, press Add certificate.
- Choose the Certificate file (.p12) (up to 64 KB) and type its Password.
- Press Check and save.
Antero checks that the file opens with the password, the key belongs to the certificate, the certificate is valid today, it is for non-repudiation and document signing, and it was issued to your TIN. Any problem is shown and nothing is saved.
- The panel shows who it was Issued to, Issued by and Valid until, with "Renew it soon" in its last 30 days.
- Replace certificate adds a new one; Remove goes back to unsigned e-invoices.
- The certificate and its password are kept encrypted with the MyInvois connection.
Own or consolidated
Each invoice reaches LHDN one of three ways:
| Way | When | How it is sent |
|---|---|---|
| Own e-invoice | By default when the buyer has a TIN, and always for an invoice in another currency. | Sent by itself when the invoice is issued. |
| Monthly consolidated e-invoice | By default when the buyer gave no TIN. | Sent with the month's other invoices, from the E-invoices page. |
| Not e-invoiced | Chosen on the invoice's page. | Not sent. |
- Choose on the invoice editor (E-invoice) or, until it has a live e-invoice, on the invoice's page (How it reaches LHDN).
- A buyer with a TIN also needs their ID number. Check TIN with LHDN in the billing details asks LHDN whether the TIN and ID match.
- Credit, debit and refund notes follow their invoice: they get their own e-invoice only when the invoice had one.
Consolidated e-invoices
Invoices to buyers who did not ask for an e-invoice are sent together, once a month.
- Consolidated e-invoices on the E-invoices page lists each month with invoices waiting: how many and their total.
- The current month shows "Send after the month ends". A past month shows "Due by (date)": the 7th of the next month, as LHDN asks for them within seven days after the month ends. A late month is flagged, and the accounting overview reminds you.
- Send submits one document numbered
CONS-and the month (such asCONS-202702), with the buyer "General Public" (TINEI00000000010), classification004and one line per invoice. - Only ringgit invoices are consolidated. An invoice whose consolidated e-invoice was invalid or cancelled waits to be sent again; the retry gets a new number (
CONS-202702-2). - Once its consolidated e-invoice is sent, an invoice cannot be voided; raise a credit note instead.
Sending and validation
| Status | Meaning |
|---|---|
| Waiting to send | Queued for MyInvois. |
| Being validated | MyInvois accepted it and is checking it. |
| Valid | Validated by LHDN. |
| Invalid | Refused, with LHDN's reasons (or what is missing in Antero). |
| Cancelled | Cancelled within 72 hours of validation. |
- Before sending, Antero checks what LHDN would refuse (your company details, the buyer's ID number with their TIN, the invoice a note refers to) and shows it as Invalid with the reasons, so you can fix them and press Send again.
- Sending needs the queue worker. If MyInvois cannot be reached, it tries again after 30 seconds and 2 minutes.
einvoice:syncruns every five minutes. It asks MyInvois about e-invoices still being validated, re-checks valid ones (hourly) during their first 72 hours so a cancellation or a buyer's rejection request shows up, and sends again any send that was lost for ten minutes. Check now asks at once.- A valid e-invoice puts its QR code and validation link on the invoice PDF and the share page. Open on MyInvois opens it in the portal.
- When a buyer asks to reject a valid e-invoice, the invoice page says so: cancel it and issue a corrected one, or talk to them.
- Accounting → E-invoices lists everything Sent to LHDN, filtered by All, Valid, Invalid, Being validated or Cancelled. The accounting overview lists e-invoices rejected by MyInvois.
Cancel an e-invoice
Within 72 hours of validation, Cancel e-invoice on the invoice's page asks for a Reason (such as "Wrong buyer details"). LHDN records it as cancelled and tells the buyer. You can then void the invoice or issue it again.
After 72 hours an e-invoice cannot be cancelled: raise a credit note instead. An invoice with a valid e-invoice cannot be voided until its e-invoice is cancelled.
Document types
| Code | Document | Sent for |
|---|---|---|
01 |
Invoice | An invoice, or a month's consolidated e-invoice. |
02 |
Credit note | A credit note, referring to the invoice's e-invoice. |
03 |
Debit note | A debit note, referring to the invoice's e-invoice. |
04 |
Refund note | A refund note, referring to the invoice's e-invoice. |
11 |
Self-billed invoice | A bill from a self-billed supplier. |
12 |
Self-billed credit note | A supplier credit note on that bill. |
13 |
Self-billed debit note | A supplier debit note on that bill. |
14 |
Self-billed refund note | Money the supplier paid back on a credit note. |
A note refers to the UUID and number of the e-invoice it adjusts, which must be valid.
Self-billed e-invoices
When a supplier cannot issue e-invoices, the brand issues them as the buyer. Mark the supplier under Bills → Suppliers → Self-billed e-invoices with one of LHDN's cases: Foreign supplier, Agent, dealer or distributor paid by the brand, Individual not in business or Other self-billing arrangement.
- Approved bills and supplier notes from them show a Self-billed e-invoice panel: press Issue self-billed e-invoice. It is numbered from
SB-, since the supplier's numbers are theirs. - For money a supplier paid back on a credit note, Issue refund note on that payment sends type
14. - A foreign supplier uses LHDN's general TIN
EI00000000030and needs their country in their details. Other suppliers need their TIN and ID number. - Self-billed e-invoices to issue on the E-invoices page lists bills from self-billed suppliers with no valid e-invoice yet.
Other currencies
An invoice in another currency always gets its own e-invoice, which carries its currency and exchange rate. Consolidated e-invoices are in ringgit.
Secrets and testing
- The client secret, access tokens and the certificate never reach the browser. Only the last four characters of a secret are ever shown again.
- Test in the sandbox until your invoices validate, then connect the production client. E-invoices sent from the sandbox are marked Sandbox.
Troubleshooting
- "Connect MyInvois for this brand first." The brand has no MyInvois connection of its own.
- "Add your TIN in the accounting settings." (and the other company details) Fill them in under Accounting → Settings, then Send again.
- "Add the buyer's registration, MyKad or passport number with their TIN." Open the invoice's billing details.
- "The invoice it adjusts has no valid e-invoice to refer to." Send the invoice's own e-invoice first.
- "Only valid e-invoices can be cancelled, within 72 hours of validation. Raise a credit note instead."
- "The certificate is for TIN (theirs), not (yours)." Use the certificate issued to this company.