MyInvois Middleware Gateway
An open-source REST gateway that lets a POS, ERP or online shop issue LHDN MyInvois e-invoices through one API. Free under the MIT licence. Unofficial and not affiliated with LHDN.
MyInvois Middleware Gateway

Scope
- Type
- Open-source project of KLCube Network
- Sector
- E-invoicing (LHDN MyInvois)
- Scope
- Architecture and development
- Licence
- MIT, free for anyone to use
- Status
- Unofficial. Not affiliated with LHDN.
- Year
- 2025
- Code
- Published on GitHub
What the site had to do
Every business that must issue e-invoices to LHDN has to deal with the MyInvois API directly: sign-in tokens, digital signing, submission, status polling and rate limits. A POS, an ERP or an online shop should not each have to rebuild that.
The monthly consolidated invoice for B2C sales adds another job on top of normal invoicing.
What we built
We built one gateway that sits between a business system and MyInvois. The system talks to a single REST API; the gateway handles the rest.
It has no screens of its own. It is the engine behind other systems, and it is open source so that anyone can read it, run it and check it.
It is not an official LHDN product and LHDN has not endorsed it. We say so on this page and in the project itself.
What it includes
Submission and drafts
Consolidated, B2B and B2C submissions, plus drafts, through one REST API.
Document types
All 9 MyInvois document types are validated in v1.0 and signed in v1.1.
Digital signing
X.509 digital signing, handled inside the gateway.
Tokens, polling and limits
Sign-in tokens, status polling and LHDN rate limits are managed for the calling system.
Companies and roles
Multi-company accounts with users and roles, so one gateway can serve more than one taxpayer.
SDKs
Generated SDKs for TypeScript, Python, Java and C#, so a developer can start in the language they already use.
What anyone can check
The gateway is public under the MIT licence for anyone to inspect and reuse. We have not measured adoption, so we state no usage figure.
Services behind this work
The services this project falls under.
See it for yourself
- View the public repository github.com/zahidaramai/MyInvoice-SDK-Middleware
More case studies
Need e-invoicing wired into your system?
Tell us which system issues your invoices. We reply within 8 working hours.
What happens next
- You send a brief, or a message on WhatsApp.
- We reply within 8 working hours with questions or a time to talk.
- You receive a written proposal with scope, milestones and price. It is valid for 30 days.