Understanding the e-Invoice API in Malaysia: A Comprehensive Guide

The Malaysian government is pushing towards a more digitised invoicing system. Businesses are required to follow new e-invoicing regulations that are being rolled out. 

This guide aims to provide a clear understanding of the API for e-Invoicing. We’ll cover, in non-technical language, how it works to drive e-invoicing in Malaysia.

Introduction to e-Invoice API

The e-Invoice mandate is part of Malaysia’s initiative to streamline the invoicing process. The aim is to make it easier for businesses to manage and submit invoices electronically. 

The Inland Revenue Board of Malaysia (LHDN) runs the MyInvois platform. Which is the primary platform to facilitate e-Invoicing across the country. There are two ways for businesses to submit e-Invoices through the MyInvois platform:

  1. Enter invoice data into the MyInvois platform and create an invoice one by one.
  2. Create e-Invoices automatically through the e-Invoice API. The API facilitates the integration between business systems and the MyInvois platform.

Implementing the API offers several key benefits for businesses:

How the e-Invoice API Works

The e-Invoice API is designed to connect your finance system with the MyInvois system. This enables businesses to automate the submission and management of invoices. Here is an overview of how the API works:

Authentication

The first step in using the e-Invoice API is authenticating your ERP system. This ensures secure communication with the MyInvois platform. There are two main methods for authentication as a Taxpayer or as an Intermediary. Taxpayer login is used by businesses submitting their own invoices. Taxpayer authentication involves a request to MyInvois with a client ID and secret. Upon successful validation, the system generates an access token that is saved securely.

Intermediary login is used by service providers submitting invoices on behalf of clients. A similar authentication process is used where an access token is assigned to a client. This is then used by the service providers to access the MyInvois platform.

Security Features:

The API prioritises data security with robust features:

Document Management

Once authenticated, the API facilitates various document management functions:

Notifications

To retrieve notifications about various actions and updates related to invoice processing. This includes alerts for errors, status changes, and other important events. The notifications are used to take actions, ensuring timely resolution of any issues.

Error Handling

While the API is designed to be user-friendly and robust, errors can occur. Typical errors include invalid access tokens, incorrectly formatted documents and missing mandatory fields. The API provides detailed error messages that pinpoint the issue within your submission. Additionally, comprehensive documentation is available to guide you through troubleshooting any errors effectively.

e-Invoice API Components

The table below outlines the key elements of the API. Detailing purposes, mandatory information required, and key features for each endpoint.

ComponentPurposeKey EndpointsMandatory InformationFeatures
Authentication EndpointsGenerating access tokens for secure communicationLogin as Taxpayer System
Login as Intermediary System
Client ID and Client Secret 
Tax Identification Number (TIN)
Business Registration Number
System Details
Ensures secure and authenticated communication
Provides flexibility for different business models
Document Type EndpointsRetrieving information about invoice typesGet All Document Types
Get Document Type
Get Document Type Version
Access Token
Document Type ID
Provides comprehensive data on document structures
Ensures use of up-to-date document formats
Invoice Submission EndpointsSubmitting invoices and checking their statusSubmit Document
Get Submission Status
Cancel Document
Reject Document
Access Token 
Invoice Data
Document ID
Allows real-time tracking of invoice status
Provides flexibility to manage and correct invoicing processes
Notification EndpointsRetrieving updates and alerts related to invoice processingGet NotificationsAccess TokenEnables proactive management through timely updates
Enhances communication with the MyInvois System

Setting Up the API

To set up the e-Invoice API, businesses need to follow these steps:

  1. Get API Credentials. Businesses must request a client ID and client secret from LHDN. You will need to provide some information about your business to get this. This includes things like tax identification number, business registration number and contact details.
  2. API Environment Configuration. Configure the API endpoints for either the production or sandbox environment. This includes setting up URLs for the different environments. This includes the registration portal, invoicing portal, system API and identity service.
  3. Integration with ERP System. Use the API documentation from LHDN to integrate with your existing system. This is a technically complex activity, involving implementing different processes for the API. This includes authentication, setting up document type retrieval and configuring invoice submission. Additionally this should include status checking functionalities.

Businesses have two options in setting up the API. They can build it themselves or partner with an e-invoicing partner to manage it for them. We have a range of e-invoicing solutions to get your business connected to e-invoicing.

The e-Invoice API is designed to automate the invoicing process. Ultimately, making it easier for businesses to follow regulatory requirements at high volume. There is a range of more technical documentation available. Please refer to the MyInvois SDK documentation​, Latest Release Notes and API Documentation.

Contact us today for a confidential discussion about your e-invoicing needs. We can help you develop an e-Invoicing implementation plan tailored to your business. Our experts can help you navigate the e-Invoicing process ensuring a smooth transition.

Banner Ornamnet Desktop.svg

Book In a Consultation with Our Experts

Speak To An Expert