Compliance
LHDN MyInvois Integration
Configure, test, and operate the IntBooks MyInvois e-invoicing integration. Covers sandbox setup, production switchover, error handling, and bulk submission.
The IntBooks MyInvois integration is built into the AR/AP module and enabled by default for SST-registered organizations. This document covers configuration, testing, and operational details.
Architecture overview
IntBooks acts as a direct submitter to MyInvois — no third-party Peppol provider. When you click Submit to LHDN on an invoice:
- The invoice payload is serialized to UBL 2.1 XML matching the LHDN schema.
- The XML is signed with your organization’s RSA key (provisioned automatically during onboarding).
- The signed payload is POSTed to the MyInvois API endpoint over HTTPS.
- LHDN validates against ~30 schema rules and the issuer/recipient TIN database.
- On success, LHDN returns a UIN (unique identification number) and a QR code.
- The UIN and QR are stored on the invoice record. The invoice transitions from
DrafttoValidated.
If LHDN rejects, the error code and message are stored on the invoice and surfaced in the UI for fix-and-resubmit.
Sandbox vs production
LHDN provides two environments:
| Environment | URL | Use for |
|---|---|---|
| Sandbox | preprod.myinvois.hasil.gov.my | Testing, development, training |
| Production | myinvois.hasil.gov.my | Real submissions |
Sandbox UINs are not legally valid. Production UINs are.
How do I switch between sandbox and production?
By default, new IntBooks organizations are in production mode. To switch to sandbox for testing:
- Navigate to Settings → Compliance → MyInvois.
- Toggle Environment to
Sandbox. - The system clears any cached production credentials and provisions a sandbox API key.
- All future submissions go to the sandbox until you toggle back.
Important: invoices submitted in sandbox mode are not valid for tax purposes. If you submit an invoice in sandbox, then need to re-submit it for real, you must delete the sandbox UIN from the invoice record (Admin → MyInvois Cleanup) before re-submitting in production.
What does a successful submission look like?
In the invoice detail view, you’ll see:
- MyInvois Status:
Validated - UIN:
MYI-2026-04-08-0000123456(format may vary) - Submission Time:
2026-04-08T14:32:11+08:00 - QR Code: rendered as a 200x200 PNG you can download or print
You can share the QR with your customer; scanning it takes them to the LHDN MyInvois public verification page where the invoice details are displayed.
What does a failed submission look like?
In the invoice detail view:
- MyInvois Status:
Rejected - Error Code: e.g.,
MV-001 - Error Message: e.g.,
Recipient TIN does not exist or is invalid - Submission Time: timestamp of the failed attempt
The most common errors:
MV-001— Recipient TIN invalid. Fix: validate the customer’s TIN at LHDN MyTax portal; correct it in IntBooks; re-submit.MV-007— Issuer MSIC code does not match registration. Fix: confirm your MSIC at SSM; update under Settings → Compliance.MV-014— Total mismatch. Fix: re-save the invoice (the total calculation runs); re-submit.MV-021— Referenced UIN does not exist. Applies to credit/debit/refund notes. Fix: confirm the original invoice was successfully submitted and validated; retry.MV-029— Submission outside 72-hour window. Fix: cannot be fixed — you must record the supply via a self-billing arrangement or contact LHDN directly.
Bulk submission
For organizations migrating from another system or correcting a backlog:
- Navigate to AR/AP → Bulk Submit MyInvois.
- Filter the invoices you want to submit (by date range, customer, status).
- Click Submit All.
- The system queues each invoice and submits in batches of 50, respecting LHDN’s rate limits (currently 60 submissions per minute per organization).
Progress is shown in real-time. The job typically processes ~3,000 invoices per hour.
Credit notes, debit notes, and refunds
These document types reference the original invoice’s UIN. To create a credit note:
- Open the original invoice.
- Click Issue Credit Note.
- The system pre-populates the credit note with the original UIN reference, customer details, and a default
-1quantity for each line. Adjust as needed. - Click Submit to LHDN.
LHDN validates that the original UIN exists and is in Validated state before accepting the credit note. The credit note’s own UIN is then stored, separate from the original.
Self-billed invoices
Common in agriculture and freelance services where the buyer generates the invoice on behalf of the supplier. To enable:
- Settings → Compliance → MyInvois → toggle Allow Self-Billed Invoices to
On. - Create the invoice as normal but set the Document Type to
Self-Billed Invoice (11). - Submit. LHDN validates that you (the issuer) are authorized to issue self-billed invoices — typically only allowed for specific industries listed in the Income Tax (Self-Billed) Rules 2024.
API webhook for status updates
If you have your own systems that need to know when an invoice’s MyInvois status changes, configure a webhook:
- Settings → Integrations → Webhooks → Add Webhook.
- Enter your endpoint URL.
- Subscribe to the
invoice.myinvois.status_changedevent. - IntBooks will POST a signed payload to your endpoint whenever any invoice transitions between
Draft,Submitted,Validated, orRejected.
The webhook payload includes the invoice ID, the new status, the UIN (if applicable), and any error code (if applicable).
See also
- Getting Started with IntBooks
- SST-02 Reporting
- How to Prepare for LHDN E-Invoicing — broader context and timeline