This guide is the deep, hands-on training. For the short conceptual overview and where e-Invoice sits among your documents, read e-Invoice (MyInvois) in the reference.
Scope: Malaysia / MyInvois only.
Time: read the concept once, then keep the Operations and Troubleshooting parts open as you work.
1. The idea: clearance, not just a PDF
Under MyInvois, an invoice is not real to LHDN until LHDN has validated it. Cloudby builds a structured e-Document from your invoice, submits it to MyInvois, and waits for LHDN to clear it. On success LHDN returns a unique UUID; that is the proof the document is valid. This is called a clearance model: issue, submit, get cleared.
The most important rule that follows from this: once a document is cleared you do not quietly edit it. You correct it the way tax law expects, with a credit or debit note, or by cancelling within the allowed window and reissuing. Cloudby is built around that discipline.
One document, one e-Document
Each source document (a sale invoice, a credit note, a purchase invoice, and so on) produces one e-Document. Cloudby keeps the link between them, so from any invoice you can see its e-Invoice status, and from any e-Document you can find its source.
The life of an e-Invoice
Every e-Document moves through a small set of states. Knowing them is most of the battle, because the screen always tells you which one you are in.
- Draft – built but not sent. Fully editable. Nothing has gone to LHDN.
- Queue – you have released it; Cloudby is packaging and sending it to MyInvois.
- Verify (Acceptance) – LHDN has received it and is validating. This is a pause, not a problem: the source document is held in Acceptance and cannot be edited while you wait.
- Accepted – LHDN validated it and returned a UUID. The source document can now be Posted.
- Rejected – validation failed. You correct the cause and Reissue; you never raise a brand-new document to paper over a rejection.
- Cancelled – withdrawn (within the window LHDN allows).
2. Setup and onboarding (once per organisation)
Before you can submit anything, connect Cloudby to MyInvois. Open Settings → e-Invoice.
- Choose your provider – MY-LHDN (MyInvois).
- Sandbox or Live – start in Sandbox to rehearse safely; switch to Live only when you are ready to issue real, legally valid documents. Do not mix the two: a sandbox UUID is not a real one.
- Enter your API credentials – the client ID and secrets you registered with MyInvois.
- Confirm your organisation identity – TIN, BRN, MSIC code, SST status, registered name, address and contact. LHDN checks these against your TIN, so they must match your registration exactly.
- Set a default classification – the commodity / classification code applied to line items that do not carry their own.
- Run the test submission – Cloudby sends a sample document to confirm the connection and credentials work end to end.
3. The e-Invoice portal: your command centre
Once you are connected, everything you send and everything you receive lives in one place, the e-Invoice portal. It is laid out as a simple two-by-two grid, so a single glance tells you your whole e-Invoice position: Income vs Expense down one side (your sales versus your purchases) and Sent vs Received across the top (documents you issued versus documents issued to you).
| Sent (you issued) | Received (issued to you) | |
|---|---|---|
| Income (sales) | Your sale e-Invoices to customers, the everyday outbound flow. | Self-billed documents where you are the seller and the buyer issued on your behalf. |
| Expense (purchases) | Self-billed e-Invoices you raised to a supplier. | Your suppliers' e-Invoices, your incoming bills (see Receive, below). |
Every e-Document sits in its cell with its current status, Accepted, Rejected or Cancelled, so a quick scan tells you what cleared and what still needs attention. This is also where the Refresh for incoming supplier documents lives.
Viewing the official IRP version
Open any cleared e-Document and you can view its IRP version, the official copy MyInvois holds, with its validation details and QR code. That is the authoritative document: the one LHDN, your customer or your supplier sees on the government portal. Cloudby keeps your working document and the cleared IRP version together, so you are never guessing whether what you issued matches what was validated.
4. The recommended flow for a typical SME
Most businesses settle into this rhythm:
- Raise and approve the document as usual – quote, order, invoice. Nothing changes about how you sell.
- Convert to an e-Invoice at the point you would normally post – the invoice becomes an e-Document and goes to LHDN.
- Let it clear – it passes through Verify; you carry on with other work.
- Post once Accepted – the UUID is your proof; the document is now valid and in your books.
- For a shop full of small cash sales, do not submit each one. Let them accumulate and consolidate them on a schedule (see below).
5. Operations, one by one
Convert a document into an e-Invoice
This is the everyday path. On a posted-ready Sale Invoice (or credit note, debit note, purchase invoice and so on), choose the e-Invoice action and pick Create. Cloudby builds the e-Document from the document you already have, the seller details from your organisation, the buyer from the document, the lines from the document lines, and queues it for submission. You are not re-keying anything.
Issue a stand-alone e-Invoice
When you need an e-Invoice that does not start life as a normal posted sale, you still build it from a source document so the figures, tax and trail stay consistent, then convert that document. In practice you almost always start from the document, which keeps your accounts and your e-Invoices in lock-step.
Submit, and the Acceptance pause
Releasing a queued e-Document sends it to MyInvois in real time. It then sits in Verify while LHDN validates, the Acceptance pause. This is normal and usually quick, but it is not instant, and the source document is deliberately locked while you wait so nothing drifts out of sync. When LHDN returns the UUID, the state flips to Accepted and you can post.
Consolidate small receipts
If you issue a high volume of small sales (a counter, a stall, an online checkout), submitting each one is wasteful and unnecessary. Instead, let them pile up and consolidate: Cloudby gathers the period's un-submitted small sales into a single consolidated e-Invoice and submits that. Open the consolidation screen, review what is pending, and submit the batch.
Defer (and reissue later)
Not ready to send yet? Choose Defer. The e-Document stays in Draft, the source document is not held, and you can come back and release it (Reissue) when you are ready. Deferring is the safe way to prepare documents without committing them to LHDN.
Attach and detach
Sometimes a valid e-Invoice already exists in MyInvois (for example it was issued through another channel) and you want Cloudby to recognise it. Use Attach: paste the e-Invoice UUID, Cloudby verifies it really exists in MyInvois and is not already linked, then ties it to your source document. Detach reverses this; if the e-Document is still only a Draft you can remove it entirely.
Receive supplier e-Invoices
e-Invoice is not only something you send. When your suppliers issue e-Invoices to you, Cloudby pulls them straight from MyInvois into the Received column of the portal (the Expense / Received cell from section 3).
Click Refresh to fetch the latest from LHDN (Cloudby also syncs on a schedule, with a roughly 30-day lookback). Inbound documents arrive already Accepted, because LHDN validated them when your supplier issued them. There is nothing for you to clear; you are simply receiving a document that is already valid.
Open one to review the supplier, the lines, the tax and the totals. When it is a real cost to record, turn it into the matching Cloudby document in a click, a Purchase Invoice or a Bill (or a Journal Entry). Cloudby matches the supplier by TIN, carries the lines across and maps the tax, so you are not re-keying your supplier's invoice.
6. Scenarios, cases and troubles
This is where most of your real questions live. Find your situation and follow it through.
A document was rejected. What now?
Read the rejection reason on the e-Document, fix the cause on the source document (a wrong TIN, a missing classification, a tax mismatch), and Reissue. Do not raise a fresh invoice to get around it: that leaves a gap in your numbering and your audit trail. Correct and reissue the same one.
It has been stuck in Acceptance for a while. Is something wrong?
Usually no. Verify / Acceptance means LHDN is still validating, and at busy times that can take longer than a few seconds. Cloudby keeps checking and will move it to Accepted (with a UUID) or Rejected (with a reason) on its own. Only treat it as a problem if it never resolves and the Compliance Checker flags a connection or credential issue.
I run a busy counter with hundreds of tiny sales.
Do not e-Invoice each sale. Let them accumulate and consolidate on a regular schedule into one submission. Your customers who do need an individual e-Invoice can still ask for one; everything else rolls up into the consolidated document.
How do credit notes and debit notes work through e-Invoice?
The same way as invoices. A credit note becomes a Credit Note e-Document, a debit note becomes a Debit Note e-Document, each referencing the original. You issue, submit and clear them exactly as you would an invoice, which is why the clearance model keeps your adjustments clean: every correction is itself a cleared, traceable document.
I invoice in a foreign currency.
Issue the invoice in its real currency as normal. The e-Invoice carries that document currency while also presenting the tax in MYR at the exchange rate on the document, which is what MyInvois requires. You do not convert anything by hand; raise the invoice in USD (or any currency) and convert it to an e-Invoice the usual way.
The Compliance Checker is flagging my setup.
Good, that is its job. The common gaps are a missing MSIC code, an unwired tax ledger (your tax codes have nowhere to post), and a sandbox-vs-live mix-up (credentials for one environment while you are pointed at the other). Clear every blocker it lists before you submit live.
7. Which documents become which e-Invoice
For reference, this is how your everyday documents map onto MyInvois document types:
| Your document | MyInvois type |
|---|---|
| Sale Invoice | Invoice (01) |
| Sale Credit Note | Credit Note (02) |
| Sale Debit Note | Debit Note (03) |
| Refund | Refund Note (04) |
| Purchase Invoice | Self-Billed Invoice (11) |
| Purchase Debit Note | Self-Billed Credit Note (12) |
| Other self-billed charges | Self-Billed Invoice (11) |
FAQ
Do I have to e-Invoice every single sale?
No. Sales that need an individual e-Invoice get one; high volumes of small receipts are consolidated into periodic submissions.
Can I edit an Accepted e-Invoice?
No. Once LHDN has cleared it, you correct it with a credit or debit note, or cancel within the allowed window and reissue. That is the whole point of clearance.
What is the UUID for?
It is LHDN's proof that the document is valid. Keep it; it travels with the document.
Should I start in Sandbox?
Yes. Rehearse the whole flow in Sandbox, then switch to Live when you are confident. Never mix sandbox credentials with live submissions.