Technical Guide

MyInvois API Integration Malaysia 2026

Connect your accounting or ERP system directly to LHDN's e-invoicing platform

What is the MyInvois API?

LHDN's MyInvois system exposes a REST API that allows accounting software, ERPs, and custom systems to submit e-invoices programmatically without using the web portal. This is the backbone of all automated e-invoicing in Malaysia — every certified software solution uses this API under the hood to validate and transmit invoice documents to LHDN on behalf of businesses.

The API uses OAuth 2.0 for authentication and requires a taxpayer TIN (Tax Identification Number) and NRIC or BRN for identity verification. All API calls are made over HTTPS. LHDN provides both a sandbox environment for testing and a production environment for live invoice submission.

There are two integration paths available to businesses. The first is direct API integration, where your system calls MyInvois directly and requires LHDN-issued API credentials — best suited for large enterprises with custom ERP systems and dedicated development teams. The second is middleware or middleware-as-a-service, where an intermediary system handles the API calls and your system only sends invoice data to the middleware. Most SMEs in Malaysia use this second path — their accounting software acts as the middleware.

Integration Approaches Compared

Direct API

For developers & large enterprises

Full control over the integration. Requires LHDN developer credentials. Best for large enterprises with custom ERP systems and in-house engineering capacity.

Pros

  • Full control over submission flow
  • Custom workflows and error handling

Cons

  • Significant engineering effort
  • Must maintain compliance updates yourself

Accounting Software with Built-in API

Most common — recommended for 90% of businesses

Your accounting software (Bukku, Xero, SQL Accounting, etc.) handles the MyInvois API for you. You submit invoices within the software; it calls the API automatically. Zero API knowledge required.

Pros

  • No development work needed
  • Vendor handles compliance updates

Cons

  • Less control over integration details
  • Dependent on vendor roadmap

Middleware Connector

For businesses with existing ERP or POS

A middleware layer (e.g. Deskera, HashMicro) sits between your existing ERP or POS and MyInvois. Best for businesses with systems that cannot be replaced but need compliance.

Pros

  • Works with existing systems
  • No full system replacement needed

Cons

  • Additional integration complexity
  • Extra cost per connector

MyInvois API Submission Flow

1

Authenticate

Obtain access token via OAuth 2.0 from the MyInvois identity endpoint.

2

Prepare invoice document

Format as JSON following the UBL 2.1 schema required by LHDN.

3

Submit document

POST to /api/v1.0/documents/submit endpoint with your formatted invoice.

4

Receive UUID

MyInvois returns a unique document UUID on successful submission.

5

Check validation status

Poll the validation status endpoint; response will be valid, invalid, or pending.

6

Share with buyer

Once validated, share the MyInvois document URL or QR code with your buyer.

7

Handle rejections

Buyer has 72 hours to reject. Monitor the rejection endpoint for any disputes.

Key MyInvois API Endpoints

EndpointMethodPurpose
/connect/tokenPOSTGet OAuth access token
/api/v1.0/documents/submitPOSTSubmit e-invoice document
/api/v1.0/documents/status/{uuid}GETCheck validation status
/api/v1.0/documents/{uuid}/rawGETGet document content
/api/v1.0/taxpayer/validate/{tin}GETValidate buyer TIN
/api/v1.0/documents/{uuid}/rejectPOSTReject a received document

Base URL: https://myinvois.hasil.gov.my (production). LHDN also provides a sandbox environment for testing.

Software Vendors with MyInvois API Access

These certified vendors have built-in MyInvois API integration — your invoices are submitted automatically.

Browse all vendors to find API-capable solutions.

Where to find the official API documentation

The full MyInvois API documentation is available on the official LHDN developer portal. All endpoints, schemas, and authentication details are published there. Software vendors who are LHDN-certified have already implemented this integration — most businesses do not need to build the API integration themselves.

MyInvois API — Frequently Asked Questions

Do I need to integrate the MyInvois API myself?
No — most businesses do not need to build a direct API integration. If you use LHDN-certified accounting software (such as Bukku, SQL Accounting, Xero, Deskera, or AutoCount), the software handles the MyInvois API on your behalf. Direct API integration is only necessary if you have a custom ERP system, are building a middleware connector, or are a software vendor building a certified solution. For 90% of Malaysian businesses, choosing the right accounting software is the only technical decision required.
What programming languages can I use for MyInvois API integration?
The MyInvois API is a standard REST API — any programming language with HTTP client support works. Common choices include Python (requests library), JavaScript/Node.js (fetch or axios), Java, C#/.NET, PHP, and Go. LHDN's developer documentation provides code samples in several languages. The key requirements are the ability to make HTTPS POST/GET requests, handle OAuth 2.0 token flows, and serialize/deserialize JSON according to the UBL 2.1 schema.
How do I get MyInvois API credentials?
API credentials are obtained through the LHDN MyInvois developer portal. Businesses and software vendors must register, complete identity verification using their TIN (Tax Identification Number) and BRN (Business Registration Number), and apply for API access. LHDN issues a client ID and client secret used in the OAuth 2.0 flow. Note that credentials are environment-specific — sandbox credentials are separate from production. Most businesses opt for accounting software with built-in API access rather than applying for credentials directly.
What is the difference between MyInvois API and Peppol?
MyInvois API is LHDN's direct REST interface for submitting e-invoices to the Malaysian national e-invoicing system — it is used for domestic B2B and B2C compliance. Peppol is an international e-invoicing network managed by MDEC in Malaysia, enabling cross-border and B2G (business-to-government) invoice exchange across 60+ countries. A business can use both simultaneously: MyInvois for domestic compliance, and Peppol for government procurement or international clients. They use different protocols — MyInvois uses UBL 2.1 JSON, while Peppol uses UBL 2.1 XML with the PINT (Peppol International) format.

Not a developer? Let your software handle the API.

Browse LHDN-certified vendors that manage MyInvois API integration for you, or use our readiness calculator to find the right fit for your business.

EInvoicingMalaysia.com is an independent directory. We are not affiliated with LHDN or the Malaysian government.