Flick.
LHDNM CompliantCountry guide

Malaysia - eInvoicing Mandates

Complete integration guide for Malaysia's e-invoicing system mandated by LHDNM. Achieve seamless compliance with our comprehensive tools and detailed documentation, designed to simplify your e-invoicing journey.

LHDNMCertified
PEPPOLReady
All TypesSupported
Aug 2024Mandatory

Reporting Mandates

  • LHDNM E-Invoicing
  • MyInvois Compliance

Exchange Networks

  • MyInvois Portal
  • PEPPOL Network

Supported Documents

  • Standard Invoices
  • Self-Billed Invoices
  • Credit Notes
  • Debit Notes
  • Refund Notes

Introduction to Malaysia E-Invoicing

Malaysia has embarked on a comprehensive digital transformation of its tax administration through the implementation of mandatory electronic invoicing. The Lembaga Hasil Dalam Negeri Malaysia (LHDNM), also known as the Inland Revenue Board of Malaysia (IRBM), has introduced the MyInvois system to modernize invoicing processes, improve tax compliance, and enhance business efficiency.

Key Authorities

AuthorityRoleResponsibilities
Lembaga Hasil Dalam Negeri Malaysia (LHDNM / IRBM)Primary regulatory body for e-invoicing• Developing and managing the MyInvois Portal
• Setting compliance requirements and technical specifications
• Managing the phased rollout based on revenue thresholds
• Validating and clearing submitted e-invoices
• Issuing compliance guidelines and updates

Website: hasil.gov.my
Ministry of Finance (MOF)Fiscal policy oversight• Setting overall tax policy direction
• Coordinating with LHDNM on e-invoicing regulations
• Overseeing national digital transformation initiatives

Website: mof.gov.my

Digital Transformation Vision

The e-invoicing mandate supports Malaysia's broader digital economy objectives:

ObjectiveDescription
Tax ModernizationDigitize invoicing and tax reporting to improve accuracy and efficiency
Revenue OptimizationReduce the tax gap through real-time transaction monitoring
Business EfficiencyEliminate paper-based invoicing and manual reconciliation
TransparencyEnable data-driven policy decisions with real-time economic insights
Cross-Border ReadinessIntegration with the PEPPOL network for international interoperability

E-Invoicing Overview

Malaysia's e-invoicing system, known as MyInvois, was introduced by LHDNM with a phased rollout beginning August 2024. The system requires businesses to generate, submit, and manage electronic invoices through the MyInvois Portal or via API integration through accredited Service Providers (SPs).

Phased Rollout

  • Phase 1 (August 1, 2024): Taxpayers with annual turnover exceeding RM 100 million
  • Phase 2 (January 1, 2025): Taxpayers with annual turnover exceeding RM 25 million
  • Phase 3 (July 1, 2025): All remaining taxpayers regardless of revenue threshold

System Architecture

The Malaysian e-invoicing system follows a clearance model:

ComponentDescription
MyInvois PortalCentral platform operated by LHDNM for invoice validation and clearance
Service Providers (SPs)Accredited intermediary systems for API-based invoice submission
PEPPOL NetworkCross-border delivery network for international document exchange
UUIDUnique identifier assigned by LHDNM after invoice validation
QR CodeMachine-readable verification code embedded in validated invoices

Document Types

CodeDocument TypeDescription
01InvoiceStandard tax invoice
02Credit NoteReduces amount of a previously issued invoice
03Debit NoteIncreases amount of a previously issued invoice
04Refund NoteDocument for refund transactions
11Self-Billed InvoiceInvoice issued by the buyer on behalf of the supplier
12Self-Billed Credit NoteCredit note for self-billed transactions
13Self-Billed Debit NoteDebit note for self-billed transactions
14Self-Billed Refund NoteRefund note for self-billed transactions

For official updates and detailed information, please refer to the LHDNM MyInvois SDK documentation.

Malaysia E-Invoicing and Fiscalization Mandates

Malaysia has implemented a mandatory e-invoicing system through LHDNM's MyInvois program. This section outlines the mandate requirements affecting businesses operating in Malaysia.

LHDNM MyInvois eInvoicing

The Lembaga Hasil Dalam Negeri Malaysia (LHDNM) introduced the MyInvois electronic invoicing mandate with a phased rollout, establishing a clearance-based system for tax compliance.

What is MyInvois?

MyInvois is Malaysia's mandatory e-invoicing platform that requires businesses to generate, submit, and store electronic invoices and related documents (credit notes, debit notes, refund notes, and self-billed documents) through LHDNM-compliant solutions. All invoices must be submitted to the MyInvois Portal for validation before being considered valid tax documents.

Regulatory Framework

ComponentDetails
Issuing AuthorityLembaga Hasil Dalam Negeri Malaysia (LHDNM / IRBM)
Program NameMyInvois
StandardLHDNM e-Invoice SDK Specification
ModelClearance (Pre-validation)
Phase 1August 1, 2024 — Turnover > RM 100 million
Phase 2January 1, 2025 — Turnover > RM 25 million
Phase 3July 1, 2025 — All remaining taxpayers

Who Must Comply?

CategoryScope
Business TypeAll taxpayers conducting commercial activities in Malaysia
Resident EntitiesAll resident businesses and individuals with taxable income
Transaction TypesB2B, B2C, B2G, and self-billed transactions
RolloutPhased by annual turnover — from RM 100 million down to all taxpayers

How It Works

The Malaysian e-invoicing system uses a clearance model:

TransactionProcessFlow
Standard InvoiceClearanceInvoice is submitted to MyInvois Portal for validation before being shared with the buyer
Self-Billed InvoiceClearanceBuyer issues and submits the invoice to MyInvois on behalf of the supplier
Consolidated InvoiceReportingAggregated invoice for general public transactions submitted to LHDNM

All invoices require submission through an accredited Service Provider (SP) or directly via the MyInvois Portal.

Document Types

Document TypeCodeDescription
Invoice01Standard invoice for regular supplies
Credit Note02Adjusts a previously issued invoice (reduces amount)
Debit Note03Adjusts a previously issued invoice (increases amount)
Refund Note04Document for refund transactions
Self-Billed Invoice11Invoice issued by the buyer for the supplier
Self-Billed Credit Note12Credit note for self-billed transactions
Self-Billed Debit Note13Debit note for self-billed transactions
Self-Billed Refund Note14Refund note for self-billed transactions

Key Requirements

#RequirementDescription
1Accredited SPUse a Service Provider registered with LHDNM, or integrate directly via MyInvois Portal
2TIN RegistrationObtain a valid Tax Identification Number (TIN) from LHDNM
3MSIC CodeClassify business activity using the Malaysia Standard Industrial Classification code
4Client CredentialsObtain client_id and client_secret from LHDNM for API access
5SST RegistrationSST number required for SST-registered businesses
6Real-time SubmissionAll invoices must be submitted and validated through MyInvois before delivery

Tax Types

Malaysia supports multiple tax types for line items:

CodeTax TypeDescription
01Sales TaxStandard sales tax
02Service TaxService tax on applicable services
03Tourism TaxTax on tourism-related services
04High-Value Goods TaxTax on high-value goods
05Sales Tax on Low Value GoodsSales tax for low-value imported goods
06Not ApplicableNo tax applies
ETax ExemptionExempt from tax (reason required)

Cancellation Rules

Issued e-invoices can be cancelled within 72 hours of the issuance date and time. After this window, adjustments must be made through credit notes or debit notes.

Implementation

StepActionPurpose
1. Obtain CredentialsRequest client_id and client_secret from LHDNMEnable API access to MyInvois
2. Select SPChoose Flick or another accredited Service ProviderFacilitate API integration
3. OnboardRegister your business with the SP using TIN and business detailsConnect to MyInvois Portal
4. ConfigureMap internal data to MyInvois format and test in sandboxEnsure technical compliance
5. Go LiveBegin submitting invoices through the production APIAchieve full compliance
6. MonitorTrack validation status and handle rejectionsMaintain ongoing compliance

For official compliance timelines and specifications, refer to the LHDNM MyInvois SDK.

LHDNM MyInvois E-Invoicing with Flick

The LHDNM MyInvois system requires businesses to submit electronic invoices for validation through accredited Service Providers (SPs) or the MyInvois Portal directly.

What is MyInvois?

MyInvois is Malaysia's centralized e-invoicing platform operated by LHDNM (Inland Revenue Board of Malaysia). It validates all electronic invoices before they are considered legally valid tax documents. Flick acts as an accredited Service Provider (SP), handling the submission and validation process on behalf of your business.

The Clearance Model

MyInvois uses a pre-clearance model where every invoice must be validated before delivery:

FlowDocument TypeProcess
StandardInvoice (01), Credit Note (02), Debit Note (03), Refund Note (04)Invoice is submitted to MyInvois via SP → validated → UUID and QR code returned → delivered to buyer
Self-BilledSelf-Billed Invoice (11), SB Credit Note (12), SB Debit Note (13), SB Refund Note (14)Buyer submits invoice to MyInvois on behalf of supplier → validated → delivered
ConsolidatedInvoice (01)Aggregated invoice for general public (B2C) transactions → submitted to MyInvois for reporting

Standard Invoice Flow

  1. Supplier creates the invoice with all mandatory fields
  2. Invoice is submitted to MyInvois via Flick's API
  3. MyInvois validates the invoice against LHDNM business rules
  4. If valid, MyInvois returns a UUID and Long ID
  5. Invoice is delivered to the buyer (optionally via PEPPOL)
  6. Buyer can verify the invoice using the QR code

Self-Billed Invoice Flow

  1. Buyer creates a self-billed invoice for the supplier
  2. Invoice is submitted to MyInvois via Flick's API with supplier details
  3. MyInvois validates and issues a UUID
  4. Supplier is notified and can view the document

Service Provider (SP) Integration

Flick is registered as a Service Provider (Flick Solutions Sdn. Bhd.) with LHDNM. To use Flick as your SP, you must:

Prerequisites

RequirementDescription
TINValid Tax Identification Number (excluding Employer's E No.)
BRNNew Business Registration Number
Client Credentialsclient_id and client_secret obtained from LHDNM
MSIC Code5-digit Malaysia Standard Industrial Classification code
SST NumberRequired for SST-registered businesses

Obtaining Client Credentials

To obtain client_id and client_secret from LHDNM, submit a request via email to sdkmyinvois@hasil.gov.my with:

  1. Tax Identification Number (TIN) — excluding Employer's (E) No.
  2. New Business Registration Number
  3. Company Name
  4. Company Email Address
  5. Name of SP as Flick Solutions Sdn. Bhd.

Integration Lifecycle

StepEndpointDescription
1. OnboardPOST /api/einvoice/onboardRegister your business with Flick as your SP. Provides access token for MyInvois communication.
2. Validate TINPOST /api/einvoice/validate-tinValidate buyer's TIN and ID before including in invoice.
3. Submit InvoicePOST /api/einvoice/generate/invoiceSubmit a single invoice for validation and clearance.
4. Get DocumentGET /api/einvoice/get-document/{uuid}Retrieve document details and status from LHDNM.
5. CancelPOST /api/einvoice/cancelCancel a validated document (within 72 hours).

Document Delivery

Flick supports multiple transport modes for delivering validated invoices:

ModeDescription
PEPPOLDeliver via the PEPPOL international e-delivery network
EmailDeliver invoice directly to the buyer's email
PortalBuyer retrieves from MyInvois Portal

Set the transport_mode header when submitting invoices to specify your preferred delivery method.

Key Components

UUID and Long ID

After validation, MyInvois assigns:

  • UUID: Unique identifier for the document within the MyInvois system
  • Long ID: Extended identifier used for document verification and QR code generation

QR Code

Validated invoices include a QR code that allows buyers and authorities to verify the document's authenticity against the MyInvois Portal.

Cancellation Window

Issued e-invoices can be cancelled within 72 hours of the issuance date and time using the Cancel API. After this period, adjustments must be made through credit notes or debit notes.

Standards and Format

StandardSpecification
FormatLHDNM e-Invoice SDK JSON
EncodingUTF-8
CurrencyMYR (default), other currencies supported with exchange rate
NetworkMyInvois Portal, PEPPOL
Tax SystemSales & Service Tax (SST)
ClassificationMSIC codes for business activity

For detailed API integration steps and code samples, refer to the eInvoicing Lifecycle and Examples sections.

LHDNM Invoice Datapoints

These are the datapoints used in the LHDNM e-invoicing API for generating and submitting invoices in Malaysia through the MyInvois system.

Top-Level Invoice Fields

ID

Requirement: Mandatory
Type: String (limit: 50 chars)

Unique Invoice Reference Number. This should be sequential within your system.

Regional API

JSON
{
  "ID": "INV12345"
}

Rules:

  • Must be unique within your system
  • Should follow a sequential pattern
  • Maximum 50 characters

IssueDate

Requirement: Mandatory
Type: Date (YYYY-MM-DD)

Date on which the invoice was issued.

Regional API

JSON
{
  "IssueDate": "2024-01-26"
}

Rules:

  • Must be in ISO 8601 format: YYYY-MM-DD

IssueTime

Requirement: Mandatory
Type: Time (HH:MM:ssZ)

Time at which the invoice was issued. Must be in UTC format.

Regional API

JSON
{
  "IssueTime": "15:30:00Z"
}

Rules:

  • Must be in UTC format with Z suffix

InvoiceTypeCode

Requirement: Mandatory
Type: Enum

Document type to be specified.

Regional API

JSON
{
  "InvoiceTypeCode": "01"
}

Standard Document Types:

CodeDescription
01Invoice
02Credit Note
03Debit Note
04Refund Note

Self-Billed Document Types:

CodeDescription
11Self-Billed Invoice
12Self-Billed Credit Note
13Self-Billed Debit Note
14Self-Billed Refund Note

InvoiceTotal

Requirement: Optional
Type: Number

If you want to apply rounding to keep the total aligned, pass the total of the invoice including all taxes.

Regional API

JSON
{
  "InvoiceTotal": 127.20
}

DocumentCurrencyCode

Requirement: Mandatory
Type: String (3 chars)

Currency in which the invoice was issued. Default value is MYR.

Regional API

JSON
{
  "DocumentCurrencyCode": "MYR"
}

Rules:

  • Must be a valid ISO 4217 currency code
  • Default is MYR
  • If not MYR, TaxExchangeRate must be provided

TaxExchangeRate

Requirement: Conditional
Type: Number

Rate at which non-Malaysian currency will be converted into Malaysian Ringgit. Required when DocumentCurrencyCode is not MYR.

Regional API

JSON
{
  "DocumentCurrencyCode": "USD",
  "TaxExchangeRate": 4.75
}

InvoiceDocumentReference

Requirement: Conditional
Type: Array

Required for Credit Notes (02), Debit Notes (03), and Refund Notes (04). References the original document being adjusted.

FieldTypeRequiredDescription
UUIDStringYesIRBM Unique Identifier of the original invoice
InternalIDStringYesInternal ID / e-Invoice Code of the original invoice

Regional API

JSON
{
  "InvoiceDocumentReference": [{
    "UUID": "71E88663PY17SQ9JZ48NYM0J10",
    "InternalID": "INV12345"
  }]
}

Customer Party — CustomerParty

Contains information about the customer to whom the invoice is being issued. Used for standard invoices (01–04).

LegalName

Requirement: Mandatory
Type: String (limit: 300 chars)

Official name of the customer.


CustomerTIN

Requirement: Mandatory
Type: String (limit: 14 chars)

Tax Identification Number of the customer.

Special TIN Values:

  • EI00000000010 — For General Public
  • EI00000000020 — For Foreign Buyer / Foreign Shipping Recipient

Customer Identification

At least one of the following is mandatory:

FieldDescription
CustomerBRNBusiness Registration Number (for businesses)
CustomerNRICMyKad/MyKAS/MyPR number (for Malaysian individuals)
CustomerPassportPassport ID (for non-Malaysians)
CustomerArmyIDMyTentera ID

CustomerSST

Requirement: Optional
Type: String (limit: 35 chars)

SST Registration Number, if the customer is SST registered.


Address Fields

FieldTypeRequiredDescription
CityNameString (limit: 300 chars)YesCity of the customer
AddressLinesArray (min 1, max 3)YesAddress details. Provide 'NA' if not recognizable
PostalZoneStringNoPostal code
CountrySubentityCodeString (2 chars)YesState code. 17 for foreign buyers. See LHDNM state codes
CountryCodeString (3 chars)YesCountry code. See LHDNM country codes

Contact Fields

FieldTypeRequiredDescription
TelephoneString (limit: 20 chars)YesContact number following E.164 standard
EmailString (limit: 300 chars)NoEmail address

Full CustomerParty Example

Regional API

JSON
{
  "CustomerParty": {
    "LegalName": "Hebat Group",
    "CustomerTIN": "C25845632100",
    "CustomerBRN": "202121111111",
    "CityName": "Kuala Lumpur",
    "PostalZone": "50480",
    "CountrySubentityCode": "14",
    "AddressLines": [
      "Lot 66"
    ],
    "CountryCode": "MYS",
    "Telephone": "+60-123456789"
  }
}

Supplier Party — SupplierParty

Used for self-billed invoices (11–14). Contains information about the supplier against whom the document is being issued.

SupplierParty Fields

FieldTypeRequiredDescription
LegalNameString (limit: 300 chars)YesOfficial name of the supplier
SupplierTINString (limit: 14 chars)YesTIN of the supplier. EI00000000030 for foreign suppliers
SupplierBRN / SupplierNRIC / SupplierPassport / SupplierArmyIDStringYes (one required)Supplier identification
SupplierSSTString (limit: 35 chars)NoSST registration number
CityNameString (limit: 300 chars)YesCity of the supplier
AddressLinesArray (min 1, max 3)YesAddress lines
PostalZoneStringNoPostal code
CountrySubentityCodeString (2 chars)YesState code
CountryCodeString (3 chars)YesCountry code
TelephoneString (limit: 20 chars)YesContact number
MSICCodeString (5 chars)YesMSIC code. Use 00000 if not available
IndustryString (limit: 300 chars)YesIndustry description
EmailString (limit: 300 chars)NoEmail address

Regional API

JSON
{
  "SupplierParty": {
    "LegalName": "Amazon Inc",
    "SupplierTIN": "EI00000000030",
    "SupplierBRN": "NA",
    "CityName": "Seattle",
    "PostalZone": "50000",
    "CountrySubentityCode": "17",
    "AddressLines": [
      "National Landing",
      "Crystal City",
      "Virginia"
    ],
    "CountryCode": "USA",
    "Telephone": "+60-123456789",
    "MSICCode": "46413",
    "Industry": "Wholesale of clothing"
  }
}

Delivery Details — DeliveryDetails

Requirement: Optional
Type: Object

Details of the recipient to whom the invoice is being delivered.

FieldTypeRequiredDescription
RecipientNameString (limit: 300 chars)YesOfficial name of recipient
RecipientTINString (limit: 14 chars)YesTIN of recipient
RecipientBRN / RecipientNRIC / RecipientPassport / RecipientArmyIDStringYes (one required)Recipient identification
RecipientSSTString (limit: 35 chars)NoSST registration number
CityNameString (limit: 300 chars)YesCity
AddressLinesArray (min 1, max 3)YesAddress lines
CountrySubentityCodeString (2 chars)YesState code
CountryCodeString (3 chars)YesCountry code
ShipmentIDString (limit: 50 chars)NoShipping ID
ShipmentChargesArrayNoShipment charge details

ShipmentCharges Schema

FieldTypeDescription
AmountNumberCharge amount
ReasonStringReason for the charge

Regional API

JSON
{
  "DeliveryDetails": {
    "RecipientName": "Hebat Group",
    "RecipientTIN": "C25845632100",
    "RecipientBRN": "202121111111",
    "CityName": "Kuala Lumpur",
    "PostalZone": "50480",
    "CountrySubentityCode": "14",
    "AddressLines": ["Lot 66"],
    "CountryCode": "MYS",
    "ShipmentID": "TRN-INQ-001",
    "ShipmentCharges": [{
      "Amount": 100,
      "Reason": "Shipment Charges from KL to MK"
    }]
  }
}

Line Items — InvoiceLines[]

An array of items included in the invoice. At least one item is mandatory.

Description

Requirement: Mandatory
Type: String (limit: 300 chars)

Item name or description.


InvoicedQuantity

Requirement: Mandatory
Type: Number

Quantity of items.


UOM

Requirement: Optional
Type: String
Default: C62

Unit of measure. See LHDNM unit types for valid codes.


PriceAmount

Requirement: Mandatory
Type: Number

Unit price of items.


LineTaxes

Requirement: Mandatory
Type: Array

Taxes applied to the line item. Each tax entry requires:

FieldTypeRequiredDescription
TaxTypeEnumYesTax type code (see below)
TaxExemptionReasonStringConditionalRequired when TaxType is E
TaxRateNumberConditionalTax rate as decimal (0.10 for 10%). Use either TaxRate or TaxBaseUnit + TaxPerUnit
TaxBaseUnitNumberConditionalUnits that have tax applied
TaxPerUnitNumberConditionalPer-unit tax amount

Tax Type Codes:

CodeDescription
01Sales Tax
02Service Tax
03Tourism Tax
04High-Value Goods Tax
05Sales Tax on Low Value Goods
06Not Applicable
ETax Exemption (reason required)

Regional API

JSON
{
  "LineTaxes": [
    {
      "TaxType": "01",
      "TaxBaseUnit": 1,
      "TaxPerUnit": 10
    },
    {
      "TaxType": "E",
      "TaxRate": 0,
      "TaxExemptionReason": "Exempt New Means of Transport"
    }
  ]
}

ClassificationCode

Requirement: Mandatory
Type: Array of Strings (each limit: 3 chars)

The 3-digit classification codes for the item. See LHDNM classification codes.


Line-Level Discounts and Charges

Both are optional arrays with the same schema:

FieldTypeDescription
AmountNumberAmount to adjust from line total
ReasonStringReason text

Full InvoiceLine Example

Regional API

JSON
{
  "InvoiceLines": [
    {
      "Description": "Laptop Peripherals",
      "InvoicedQuantity": 1,
      "PriceAmount": 17,
      "LineTaxes": [
        {
          "TaxType": "01",
          "TaxBaseUnit": 1,
          "TaxPerUnit": 10
        },
        {
          "TaxType": "E",
          "TaxRate": 0,
          "TaxExemptionReason": "Exempt New Means of Transport"
        }
      ],
      "ClassificationCode": ["001", "002", "003"]
    }
  ]
}

Document-Level Discounts and Charges

Discounts

Requirement: Optional
Type: Array

Document-level discounts applied to the overall invoice total.

Charges

Requirement: Optional
Type: Array

Document-level charges or fees applied to the overall invoice total.

Both share the same schema:

FieldTypeDescription
AmountNumberAmount to adjust from total taxable
ReasonStringReason for the discount or charge

Regional API

JSON
{
  "Discounts": [{
    "Amount": 100,
    "Reason": "Flat Discount"
  }],
  "Charges": [{
    "Amount": 50,
    "Reason": "Service Fee Charged"
  }]
}

Prepayments

Requirement: Optional
Type: Array

Prepayments related to the invoice.

FieldTypeDescription
PaymentIDStringPayment reference ID
AmountNumberPrepayment amount
DateDate (YYYY-MM-DD)Date of prepayment
TimeTime (HH:MM:ssZ)Time of prepayment

Regional API

JSON
{
  "Prepayments": [{
    "PaymentID": "REC1012",
    "Amount": 100,
    "Date": "2024-01-10",
    "Time": "12:00:00Z"
  }]
}

Additional Fields

CustomsImportForm

Requirement: Conditional
Type: String (limit: 19 chars)

Unique identifier assigned on the Declaration of Goods Imported. No special characters allowed.


Incoterms

Requirement: Optional
Type: String (limit: 3 chars)

International trade rules defining buyer and supplier responsibilities. No special characters allowed.


Additional Resources

LHDNM eInvoicing Lifecycle

This guide covers the complete lifecycle of e-invoicing in Malaysia, from onboarding through to invoice submission, retrieval, cancellation, and webhook integration via the Flick API.


Overview

The LHDNM e-invoicing lifecycle covers the full range of operations:

StageEndpointMethodPurpose
1. Onboard SP/api/einvoice/onboardPOSTRegister Flick as your Service Provider
2. Validate TIN/api/einvoice/validate-tinPOSTValidate a taxpayer's TIN before invoicing
3. Submit Invoice/api/einvoice/generate/invoicePOSTSubmit a single invoice
4. Submit Bulk/api/einvoice/generate/invoice/bulkPOSTSubmit multiple invoices at once
5. Consolidated/api/einvoice/generate/invoice/consolidatedPOSTReport consolidated invoices for general public
6. Self-Billed/api/einvoice/generate/self-billed-invoicePOSTSubmit a self-billed invoice
7. Self-Billed Bulk/api/einvoice/generate/self-billed/bulkPOSTSubmit multiple self-billed invoices
8. SB Consolidated/api/einvoice/generate/self-billed/consolidatedPOSTReport consolidated self-billed invoices
9. Get Document/api/einvoice/get-document/{uuid}GETRetrieve document details from LHDNM
10. Cancel/api/einvoice/cancelPOSTCancel a document (within 72 hours)
11. Supplier Invoices/api/einvoice/supplier-invoicesGETGet invoices issued against you
12. Reject/api/einvoice/rejectPOSTReject a received document

1. Onboard Flick as Your Service Provider

Register your business with Flick as your intermediary system for MyInvois. This generates an access token for trusted communication on your behalf.

Prerequisites

  • Valid TIN from LHDNM
  • client_id and client_secret obtained from LHDNM (see Introduction)
  • Business registration details

Request

Endpoint: POST /api/einvoice/onboard

Headers:

  • x-flick-auth-key: Your Flick API key
  • Content-Type: application/json

Regional API

JSON
{
  "registered_name": "ABC Demo Company Sdn. Bhd.",
  "tin_number": "C12345678910",
  "other_ids": {
    "brn": "202001234567",
    "sst": "A01-2345-67891012"
  },
  "msic_code": "20121",
  "industry": "Manufacture of fertilizers",
  "city": "Kuala Lumpur",
  "street": "Jalan Alor",
  "state": "14",
  "country": "MYS",
  "contact_number": "+60-123456789",
  "client_id": "dcf589e3-d1bb-4f2e-83d2-d5cb4ee1bfcf",
  "client_secret": "34bf56fc-bf02-41cb-af5e-4c0e22ee49f5"
}

Request Fields

FieldTypeRequiredDescription
registered_nameString (limit: 300)YesRegistered name of supplier's business
tin_numberString (limit: 14)YesTax Identification Number
other_idsObjectYesIdentification numbers (see below)
msic_codeString (5 chars)YesBusiness activity code. See MSIC codes
industryString (limit: 300)YesDescription of business activity
cityString (limit: 50)YesRegistered city
streetString (limit: 150)YesStreet details. Use 'NA' if not available
stateString (2 chars)YesState code. See state codes
countryString (3 chars)YesCountry code. See country codes
contact_numberString (limit: 20)YesTelephone following E.164 standard
client_idStringYesClient ID from LHDNM
client_secretStringYesClient secret from LHDNM

other_ids Fields (provide all applicable):

FieldTypeDescription
sstString (limit: 35)SST Registration Number (mandatory if applicable)
brnString (limit: 20)Business Registration Number (mandatory for businesses)
nricString (limit: 12)MyKad/MyPR/MyKAS Number (mandatory for Malaysian individuals)
passportString (limit: 12)Passport Number (mandatory for non-Malaysians)
armyString (limit: 12)MyTentera Number
ttxString (limit: 17)Tourism Tax Registration Number

Response

JSON
{
  "status": "success",
  "message": "Successfully Onboarded & Access Token generated for ABC Demo Company Sdn. Bhd.",
  "data": {
    "supplier_uuid": "f4b173a9-9f0f-4850-b682-762290885fee"
  }
}

The supplier_uuid returned must be used as a header in all subsequent API calls.


2. Validate Taxpayer's TIN

Validate a TIN and related ID before adding it to an invoice.

Request

Endpoint: POST /api/einvoice/validate-tin

Headers:

  • x-flick-auth-key: Your Flick API key
  • supplier_uuid: Your supplier UUID from onboarding
  • Content-Type: application/json

Regional API

JSON
{
  "tin_number": "C25845632020",
  "id_type": "NRIC",
  "id_value": "770625015324"
}

Request Fields

FieldTypeRequiredDescription
tin_numberStringYesTIN to validate
id_typeEnumYesOne of: BRN, NRIC, PASSPORT, ARMY
id_valueStringYesActual value of the selected ID type

Response

JSON
{
  "status": "success",
  "message": "TIN & NRIC ID validated successfully"
}

3. Submit an Invoice

Submit a single e-invoice for validation and clearance through MyInvois.

Request

Endpoint: POST /api/einvoice/generate/invoice

Headers:

  • x-flick-auth-key: Your Flick API key
  • supplier_uuid: Your supplier UUID
  • transport_mode: Delivery method (e.g., peppol)
  • Content-Type: application/json

Regional API

JSON
{
  "ID": "INV12345",
  "IssueDate": "2024-01-26",
  "IssueTime": "15:30:00Z",
  "InvoiceTypeCode": "01",
  "DocumentCurrencyCode": "MYR",
  "CustomerParty": {
    "LegalName": "Hebat Group",
    "CustomerTIN": "C25845632100",
    "CustomerBRN": "202121111111",
    "CityName": "Kuala Lumpur",
    "PostalZone": "50480",
    "CountrySubentityCode": "14",
    "AddressLines": ["Lot 66"],
    "CountryCode": "MYS",
    "Telephone": "+60-123456789"
  },
  "InvoiceLines": [
    {
      "Description": "Laptop Peripherals",
      "InvoicedQuantity": 1,
      "PriceAmount": 17,
      "LineTaxes": [
        {
          "TaxType": "01",
          "TaxBaseUnit": 1,
          "TaxPerUnit": 10
        }
      ],
      "ClassificationCode": ["001", "002", "003"]
    }
  ]
}

Response

JSON
{
  "status": "submitted",
  "data": {
    "submissionResponse": {
      "submissionUid": "GJ49979N7RCV2KAXDCH6ZK0J10",
      "acceptedDocuments": [
        {
          "uuid": "FRSS37P7NSM94970DCH6ZK0J10",
          "invoiceCodeNumber": "INV12345"
        }
      ],
      "rejectedDocuments": []
    }
  }
}

4. Submit Invoices in Bulk

Submit multiple invoices in a single API call. The request body is an array of documents, each following the same schema as a single invoice submission.

Request

Endpoint: POST /api/einvoice/generate/invoice/bulk

Headers: Same as single invoice submission.

Regional API

JSON
[{
  "ID": "INV12345",
  "IssueDate": "2024-01-26",
  "IssueTime": "15:30:00Z",
  "InvoiceTypeCode": "01",
  "DocumentCurrencyCode": "MYR",
  "CustomerParty": {
    "LegalName": "Hebat Group",
    "CustomerTIN": "C25845632100",
    "CustomerBRN": "202121111111",
    "CityName": "Kuala Lumpur",
    "PostalZone": "50480",
    "CountrySubentityCode": "14",
    "AddressLines": ["Lot 66"],
    "CountryCode": "MYS",
    "Telephone": "+60-123456789"
  },
  "InvoiceLines": [
    {
      "Description": "Laptop Peripherals",
      "InvoicedQuantity": 1,
      "PriceAmount": 17,
      "LineTaxes": [
        {
          "TaxType": "01",
          "TaxBaseUnit": 1,
          "TaxPerUnit": 10
        }
      ],
      "ClassificationCode": ["001", "002", "003"]
    }
  ]
}]

5. Report Consolidated Invoices

Report consolidated invoices for general public (B2C) transactions. The CustomerParty uses the General Public TIN (EI00000000010).

Request

Endpoint: POST /api/einvoice/generate/invoice/consolidated

Headers: Same as single invoice submission.

Regional API

JSON
{
  "ID": "INV12345",
  "IssueDate": "2024-01-26",
  "IssueTime": "15:30:00Z",
  "InvoiceTypeCode": "01",
  "DocumentCurrencyCode": "MYR",
  "CustomerParty": {
    "LegalName": "General Public",
    "CustomerTIN": "EI00000000010",
    "CustomerBRN": "NA",
    "CityName": "NA",
    "CountrySubentityCode": "17",
    "AddressLines": ["NA"],
    "CountryCode": "MYS",
    "Telephone": "NA"
  },
  "InvoiceLines": [
    {
      "Description": "INV1 - INV99",
      "InvoicedQuantity": 1,
      "PriceAmount": 17,
      "LineTaxes": [
        {
          "TaxType": "01",
          "TaxBaseUnit": 1,
          "TaxPerUnit": 10
        }
      ],
      "ClassificationCode": ["001", "002", "003"]
    }
  ]
}

6. Submit a Self-Billed Invoice

Submit a self-billed e-invoice. Uses SupplierParty instead of CustomerParty, and document type codes 11–14.

Request

Endpoint: POST /api/einvoice/generate/self-billed-invoice

Headers: Same as single invoice submission.

Regional API

JSON
{
  "ID": "SBINV-14003",
  "IssueDate": "2024-07-17",
  "IssueTime": "01:40:00Z",
  "InvoiceTypeCode": "11",
  "DocumentCurrencyCode": "USD",
  "TaxExchangeRate": 4.75,
  "CustomsImportForm": "1312312",
  "Incoterms": "CIF",
  "SupplierParty": {
    "LegalName": "Amazon Inc",
    "SupplierTIN": "EI00000000030",
    "SupplierBRN": "NA",
    "CityName": "Seattle",
    "PostalZone": "50000",
    "CountrySubentityCode": "17",
    "AddressLines": [
      "National Landing",
      "Crystal City",
      "Virginia"
    ],
    "CountryCode": "USA",
    "Telephone": "+60-123456789",
    "MSICCode": "46413",
    "Industry": "Wholesale of clothing"
  },
  "InvoiceLines": [
    {
      "Description": "Item 2",
      "InvoicedQuantity": 1,
      "PriceAmount": 50000,
      "LineTaxes": [
        {
          "TaxType": "01",
          "TaxBaseUnit": 1,
          "TaxPerUnit": 10
        }
      ],
      "ClassificationCode": ["001", "002", "003"]
    }
  ]
}

7. Self-Billed Invoices in Bulk

Submit multiple self-billed invoices in a single call. Request body is an array of documents following the self-billed schema.

Request

Endpoint: POST /api/einvoice/generate/self-billed/bulk

Headers: Same as single invoice submission.


8. Report Consolidated Self-Billed Invoices

Report consolidated self-billed documents. Uses the General Public TIN for the supplier.

Request

Endpoint: POST /api/einvoice/generate/self-billed/consolidated

Headers: Same as single invoice submission.


9. Get Document Details from LHDNM

Retrieve the full details of a submitted document from the MyInvois system.

Request

Endpoint: GET /api/einvoice/get-document/{uuid}

Headers:

  • x-flick-auth-key: Your Flick API key
  • supplier_uuid: Your supplier UUID

Response

JSON
{
  "uuid": "T9Z4ZES3SQFESQ0P3N4FXA1J10",
  "submissionUid": "74980SSDSHF87KD33N4FXA1J10",
  "longId": "EEXA83PNNMJADQPH3N4FXA1J10MoVOEi1719427109",
  "typeName": "Self-billed Invoice",
  "typeVersionName": "Version 1",
  "issuerTin": "C51231412",
  "issuerName": "Demo Company SDN. BHD",
  "receiverId": "C23234234",
  "receiverName": "Demo Receiver SDN. BHD",
  "dateTimeReceived": "2024-06-26T18:38:29Z",
  "dateTimeValidated": "2024-06-26T18:38:32Z",
  "totalExcludingTax": 120,
  "totalDiscount": 0,
  "totalNetAmount": 120,
  "totalPayableAmount": 127.2,
  "status": "Valid",
  "documentStatusReason": null,
  "cancelDateTime": null,
  "rejectRequestDateTime": null,
  "validationResults": {
    "status": "Valid",
    "validationSteps": [
      {
        "status": "Valid",
        "name": "Step03-Duplicated Submission Validator"
      },
      {
        "status": "Valid",
        "name": "Step-07. Code Field Validator"
      },
      {
        "status": "Valid",
        "name": "Step14-Taxpayer Profile Validator"
      }
    ]
  },
  "internalId": "SBINV-14003",
  "dateTimeIssued": "2024-06-25T17:40:00Z"
}

10. Cancel a Document

Cancel an already issued e-document. Cancellation is only allowed within 72 hours of the issuance date and time.

Request

Endpoint: POST /api/einvoice/cancel

Headers:

  • x-flick-auth-key: Your Flick API key
  • supplier_uuid: Your supplier UUID
  • Content-Type: application/json

Regional API

JSON
{
  "uuid": "5YS7R96D4X110AS9HCD8D13J10",
  "status": "cancelled",
  "reason": "Wrong buyer details"
}

Request Fields

FieldTypeRequiredDescription
uuidStringYesUUID of the document to cancel
statusEnumYesMust be cancelled
reasonString (limit: 300)YesReason for cancellation

Response

JSON
{
  "status": "success",
  "data": {
    "uuid": "5YS7R96D4X1S0AS9HCD8D13J10",
    "status": "Cancelled"
  }
}

11. Get Invoices from Suppliers

Query LHDNM for documents recently issued against your business. Limited to documents issued within the last 30 days.

Request

Endpoint: GET /api/einvoice/supplier-invoices

Headers:

  • x-flick-auth-key: Your Flick API key
  • supplier_uuid: Your supplier UUID

Query Parameters

ParameterTypeRequiredDescription
pageNoNumberNoPage number to retrieve
pageSizeNumberNoDocuments per page
submissionDateFromDateConditionalStart of submission date range (mandatory with submissionDateTo)
submissionDateToDateConditionalEnd of submission date range
issueDateFromDateConditionalStart of issue date range (mandatory with issueDateTo)
issueDateToDateConditionalEnd of issue date range
statusStringNoFilter by status: Valid, Invalid, Cancelled, Submitted
documentTypeStringNoDocument type code
issuerIdTypeStringNoIssuer ID type: BRN, PASSPORT, NRIC, ARMY
issuerIdStringNoIssuer identifier
issuerTinStringNoIssuer TIN

Response

JSON
{
  "status": "success",
  "data": [{
    "uuid": "216e7b91-dc17-4316-85dd-2afc913cd630",
    "submissionUID": "1bc5e22a-07c9-47dd-9ec4-26032e5dfa21",
    "internalId": "PZ-234-A",
    "typeName": "invoice",
    "issuerTin": "C25845632100",
    "issuerName": "AMS Setia Jaya Sdn. Bhd.",
    "receiverName": "AMS Setia Jaya Sdn. Bhd.",
    "dateTimeIssued": "2021-02-13T13:15:00Z",
    "totalSales": 10.10,
    "totalDiscount": 50.00,
    "netAmount": 100.70,
    "total": 124.09,
    "status": "Valid"
  }],
  "metadata": {
    "totalPages": 1,
    "totalCount": 1
  }
}

12. Reject a Document

Reject a document that was issued against your business.

Request

Endpoint: POST /api/einvoice/reject

Headers:

  • x-flick-auth-key: Your Flick API key
  • supplier_uuid: Your supplier UUID
  • Content-Type: application/json

Regional API

JSON
{
  "uuid": "5YS7R96D4X1S0AS9HCD8D13J10",
  "status": "rejected",
  "reason": "Wrong buyer details"
}

Request Fields

FieldTypeRequiredDescription
uuidStringYesUUID of the document to reject
statusEnumYesMust be rejected
reasonString (limit: 300)YesReason for rejection

Response

JSON
{
  "status": "success",
  "data": {
    "uuid": "5YS7R96D4X1S0AS9HCD8D13J10",
    "status": "Rejected"
  }
}

Webhooks

Flick supports three webhook endpoints for real-time notifications about document status changes.

Status Change Webhook

Listen for status updates on documents you have issued or that have been issued against you.

Webhook URL: POST {your_url}

JSON
{
  "eventType": "statusChange",
  "uuid": "5YS7R96D4X1S0AS9HCD8D13J10",
  "longId": "FjeaQo89YgVcRbS4dNpWzX1UjLkPvT6Ygt9eD1b4mc5...",
  "internalId": "PZ-234-A",
  "status": "cancelled",
  "cancelDateTime": "2021-02-25T01:59:10Z",
  "rejectRequestDateTime": "2021-02-25T01:59:10Z",
  "documentStatusReason": "Wrong buyer details"
}

Cancellation Request Webhook

Listen for cancellation requests from your recipients.

Webhook URL: POST {your_url}/document/cancel

JSON
{
  "uuid": "5YS7R96D4X1S0AS9HCD8D13J10",
  "longId": "FjeaQo89YgVcRbS4dNpWzX1UjLkPvT6Ygt9eD1b4mc5...",
  "internalId": "PZ-234-A",
  "status": "valid",
  "rejectRequestDateTime": "2021-02-25T01:59:10Z",
  "documentStatusReason": "Wrong buyer details"
}

Rejection Status Webhook

Listen for updates on your rejection requests.

Webhook URL: POST {your_url}/document/reject

JSON
{
  "uuid": "5YS7R96D4X1S0AS9HCD8D13J10",
  "longId": "FjeaQo89YgVcRbS4dNpWzX1UjLkPvT6Ygt9eD1b4mc5...",
  "internalId": "PZ-234-A",
  "status": "cancelled",
  "cancelDateTime": "2021-02-25T01:59:10Z",
  "rejectRequestDateTime": "2021-02-25T01:59:10Z",
  "documentStatusReason": "Wrong buyer details"
}

Integration Checklist

  • Obtain client_id and client_secret from LHDNM
  • Onboard with Flick as your SP (POST /api/einvoice/onboard)
  • Save your supplier_uuid for subsequent calls
  • Test TIN validation in sandbox
  • Submit a test invoice and verify response
  • Set up webhook endpoints for status notifications
  • Test cancellation flow (within 72h window)
  • Switch to production URLs when ready

Additional Resources

Malaysia E-Invoicing Examples

Complete collection of LHDNM-compliant invoice examples covering standard invoices, self-billed invoices, consolidated invoices, and various transaction scenarios.


Standard Invoices

Standard Commercial Invoice

A typical B2B commercial invoice with sales tax.

Key Features:

  • Invoice Type Code: 01 (Invoice)
  • Sales Tax applied per unit
  • Full customer information with TIN and BRN
  • Delivery details with shipment charges

Regional API

JSON
{
  "ID": "INV12345",
  "IssueDate": "2024-01-26",
  "IssueTime": "15:30:00Z",
  "InvoiceTypeCode": "01",
  "DocumentCurrencyCode": "MYR",
  "CustomerParty": {
    "LegalName": "Hebat Group",
    "CustomerTIN": "C25845632100",
    "CustomerBRN": "202121111111",
    "CityName": "Kuala Lumpur",
    "PostalZone": "50480",
    "CountrySubentityCode": "14",
    "AddressLines": ["Lot 66"],
    "CountryCode": "MYS",
    "Telephone": "+60-123456789"
  },
  "DeliveryDetails": {
    "RecipientName": "Hebat Group",
    "RecipientTIN": "C25845632100",
    "RecipientBRN": "202121111111",
    "CityName": "Kuala Lumpur",
    "PostalZone": "50480",
    "CountrySubentityCode": "14",
    "AddressLines": ["Lot 66"],
    "CountryCode": "MYS",
    "Telephone": "+60-123456789",
    "ShipmentID": "TRN-INQ-001",
    "ShipmentCharges": [{
      "Amount": 100,
      "Reason": "Shipment Charges from KL to MK"
    }]
  },
  "InvoiceLines": [
    {
      "Description": "Laptop Peripherals",
      "InvoicedQuantity": 1,
      "PriceAmount": 17,
      "LineTaxes": [
        {
          "TaxType": "01",
          "TaxBaseUnit": 1,
          "TaxPerUnit": 10
        },
        {
          "TaxType": "E",
          "TaxRate": 0,
          "TaxExemptionReason": "Exempt New Means of Transport"
        }
      ],
      "ClassificationCode": ["001", "002", "003"]
    }
  ]
}

Response

JSON
{
  "status": "submitted",
  "data": {
    "submissionResponse": {
      "submissionUid": "GJ49979N7RCV2KAXDCH6ZK0J10",
      "acceptedDocuments": [
        {
          "uuid": "FRSS37P7NSM94970DCH6ZK0J10",
          "invoiceCodeNumber": "INV12345"
        }
      ],
      "rejectedDocuments": []
    }
  }
}

Invoice with Tax Exemption

An invoice where some items are exempt from tax.

Key Features:

  • Mix of taxable and exempt items
  • Tax exemption reason required for type E

Regional API

JSON
{
  "ID": "INV12346",
  "IssueDate": "2024-02-15",
  "IssueTime": "10:00:00Z",
  "InvoiceTypeCode": "01",
  "DocumentCurrencyCode": "MYR",
  "CustomerParty": {
    "LegalName": "Tech Solutions Sdn. Bhd.",
    "CustomerTIN": "C98765432100",
    "CustomerBRN": "202234567890",
    "CityName": "Petaling Jaya",
    "CountrySubentityCode": "10",
    "AddressLines": ["Unit 5, Block A, Jalan SS2/72"],
    "CountryCode": "MYS",
    "Telephone": "+60-198765432"
  },
  "InvoiceLines": [
    {
      "Description": "Software License - Annual",
      "InvoicedQuantity": 5,
      "PriceAmount": 500,
      "LineTaxes": [
        {
          "TaxType": "02",
          "TaxRate": 0.06
        }
      ],
      "ClassificationCode": ["001"]
    },
    {
      "Description": "Training Materials",
      "InvoicedQuantity": 10,
      "PriceAmount": 50,
      "LineTaxes": [
        {
          "TaxType": "E",
          "TaxRate": 0,
          "TaxExemptionReason": "Educational materials exempt under Schedule A"
        }
      ],
      "ClassificationCode": ["002"]
    }
  ]
}

Invoice with Discounts and Charges

An invoice with both line-level and document-level discounts and charges.

Regional API

JSON
{
  "ID": "INV12347",
  "IssueDate": "2024-03-01",
  "IssueTime": "09:00:00Z",
  "InvoiceTypeCode": "01",
  "DocumentCurrencyCode": "MYR",
  "Discounts": [{
    "Amount": 200,
    "Reason": "Bulk purchase discount"
  }],
  "Charges": [{
    "Amount": 50,
    "Reason": "Express processing fee"
  }],
  "CustomerParty": {
    "LegalName": "Global Trading Sdn. Bhd.",
    "CustomerTIN": "C11223344550",
    "CustomerBRN": "202345678901",
    "CityName": "George Town",
    "CountrySubentityCode": "07",
    "AddressLines": ["88, Jalan Penang"],
    "CountryCode": "MYS",
    "Telephone": "+60-174567890"
  },
  "InvoiceLines": [
    {
      "Description": "Office Furniture - Executive Desk",
      "InvoicedQuantity": 10,
      "PriceAmount": 1500,
      "LineTaxes": [
        {
          "TaxType": "01",
          "TaxRate": 0.10
        }
      ],
      "ClassificationCode": ["003"],
      "Discounts": [{
        "Amount": 100,
        "Reason": "Loyalty discount per unit"
      }]
    }
  ]
}

Self-Billed Invoices

Self-Billed Invoice — Foreign Supplier

A self-billed invoice for a foreign supplier with currency exchange.

Key Features:

  • Invoice Type Code: 11 (Self-Billed Invoice)
  • Foreign currency (USD) with TaxExchangeRate
  • SupplierParty instead of CustomerParty
  • Foreign Supplier TIN: EI00000000030
  • Customs import form and Incoterms included

Regional API

JSON
{
  "ID": "SBINV-14003",
  "IssueDate": "2024-07-17",
  "IssueTime": "01:40:00Z",
  "InvoiceTypeCode": "11",
  "DocumentCurrencyCode": "USD",
  "TaxExchangeRate": 4.75,
  "CustomsImportForm": "1312312",
  "Incoterms": "CIF",
  "SupplierParty": {
    "LegalName": "Amazon Inc",
    "SupplierTIN": "EI00000000030",
    "SupplierBRN": "NA",
    "CityName": "Seattle",
    "PostalZone": "50000",
    "CountrySubentityCode": "17",
    "AddressLines": [
      "National Landing",
      "Crystal City",
      "Virginia"
    ],
    "CountryCode": "USA",
    "Telephone": "+60-123456789",
    "MSICCode": "46413",
    "Industry": "Wholesale of clothing"
  },
  "InvoiceLines": [
    {
      "Description": "Item 2",
      "InvoicedQuantity": 1,
      "PriceAmount": 50000,
      "LineTaxes": [
        {
          "TaxType": "01",
          "TaxBaseUnit": 1,
          "TaxPerUnit": 10
        },
        {
          "TaxType": "E",
          "TaxRate": 0,
          "TaxExemptionReason": "Exempt New Means of Transport"
        }
      ],
      "ClassificationCode": ["001", "002", "003"]
    }
  ]
}

Consolidated Invoices

Consolidated Invoice for General Public

A consolidated invoice aggregating multiple B2C transactions. Uses the General Public TIN.

Key Features:

  • Customer TIN: EI00000000010 (General Public)
  • Multiple line items representing aggregated invoice ranges
  • Customer details set to NA

Regional API

JSON
{
  "ID": "CONS-001",
  "IssueDate": "2024-01-26",
  "IssueTime": "15:30:00Z",
  "InvoiceTypeCode": "01",
  "DocumentCurrencyCode": "MYR",
  "CustomerParty": {
    "LegalName": "General Public",
    "CustomerTIN": "EI00000000010",
    "CustomerBRN": "NA",
    "CityName": "NA",
    "CountrySubentityCode": "17",
    "AddressLines": ["NA"],
    "CountryCode": "MYS",
    "Telephone": "NA"
  },
  "InvoiceLines": [
    {
      "Description": "INV1 - INV99",
      "InvoicedQuantity": 1,
      "PriceAmount": 17,
      "LineTaxes": [
        {
          "TaxType": "01",
          "TaxBaseUnit": 1,
          "TaxPerUnit": 10
        }
      ],
      "ClassificationCode": ["001", "002", "003"]
    },
    {
      "Description": "INV99 - INV199",
      "InvoicedQuantity": 1,
      "PriceAmount": 17,
      "LineTaxes": [
        {
          "TaxType": "01",
          "TaxBaseUnit": 1,
          "TaxPerUnit": 10
        }
      ],
      "ClassificationCode": ["001", "002", "003"]
    }
  ]
}

Credit Notes

Credit Note Referencing Original Invoice

A credit note adjusting a previously issued invoice.

Key Features:

  • Invoice Type Code: 02 (Credit Note)
  • InvoiceDocumentReference linking to original invoice UUID and ID

Regional API

JSON
{
  "ID": "CR12345",
  "IssueDate": "2024-02-01",
  "IssueTime": "10:00:00Z",
  "InvoiceTypeCode": "02",
  "DocumentCurrencyCode": "MYR",
  "InvoiceDocumentReference": [{
    "UUID": "FRSS37P7NSM94970DCH6ZK0J10",
    "InternalID": "INV12345"
  }],
  "CustomerParty": {
    "LegalName": "Hebat Group",
    "CustomerTIN": "C25845632100",
    "CustomerBRN": "202121111111",
    "CityName": "Kuala Lumpur",
    "PostalZone": "50480",
    "CountrySubentityCode": "14",
    "AddressLines": ["Lot 66"],
    "CountryCode": "MYS",
    "Telephone": "+60-123456789"
  },
  "InvoiceLines": [
    {
      "Description": "Laptop Peripherals - Return",
      "InvoicedQuantity": 1,
      "PriceAmount": 17,
      "LineTaxes": [
        {
          "TaxType": "01",
          "TaxBaseUnit": 1,
          "TaxPerUnit": 10
        }
      ],
      "ClassificationCode": ["001", "002", "003"]
    }
  ]
}

Invoice with Prepayments

Invoice Referencing Advance Payments

An invoice with prepayment records.

Regional API

JSON
{
  "ID": "INV12350",
  "IssueDate": "2024-04-01",
  "IssueTime": "08:00:00Z",
  "InvoiceTypeCode": "01",
  "DocumentCurrencyCode": "MYR",
  "Prepayments": [{
    "PaymentID": "REC1012",
    "Amount": 500,
    "Date": "2024-03-15",
    "Time": "12:00:00Z"
  }],
  "CustomerParty": {
    "LegalName": "Premium Supplies Sdn. Bhd.",
    "CustomerTIN": "C55667788990",
    "CustomerBRN": "202456789012",
    "CityName": "Johor Bahru",
    "CountrySubentityCode": "01",
    "AddressLines": ["12, Jalan Danga"],
    "CountryCode": "MYS",
    "Telephone": "+60-167890123"
  },
  "InvoiceLines": [
    {
      "Description": "Industrial Equipment",
      "InvoicedQuantity": 2,
      "PriceAmount": 5000,
      "LineTaxes": [
        {
          "TaxType": "01",
          "TaxRate": 0.10
        }
      ],
      "ClassificationCode": ["004"]
    }
  ]
}

Cancellation

Cancel a Document (Within 72 Hours)

Cancel a previously issued document. Must be done within 72 hours of issuance.

Regional API

JSON
{
  "uuid": "FRSS37P7NSM94970DCH6ZK0J10",
  "status": "cancelled",
  "reason": "Wrong buyer details"
}

Response

JSON
{
  "status": "success",
  "data": {
    "uuid": "FRSS37P7NSM94970DCH6ZK0J10",
    "status": "Cancelled"
  }
}

Reference Tables

Document Type Codes

CodeTypeDescription
01InvoiceStandard tax invoice
02Credit NoteAdjusts invoice downward
03Debit NoteAdjusts invoice upward
04Refund NoteRefund transaction
11Self-Billed InvoiceBuyer-issued invoice
12Self-Billed Credit NoteSelf-billed credit adjustment
13Self-Billed Debit NoteSelf-billed debit adjustment
14Self-Billed Refund NoteSelf-billed refund

Tax Type Codes

CodeDescription
01Sales Tax
02Service Tax
03Tourism Tax
04High-Value Goods Tax
05Sales Tax on Low Value Goods
06Not Applicable
ETax Exemption

Special TIN Values

TINUsage
EI00000000010General Public (consolidated invoices)
EI00000000020Foreign Buyer / Foreign Shipping Recipient
EI00000000030Foreign Supplier (self-billed invoices)

Best Practices

  1. Always validate the buyer's TIN before including it in an invoice
  2. Use sequential invoice reference numbers
  3. Set up webhook endpoints to monitor document status changes
  4. Test thoroughly in the sandbox environment before going live
  5. Remember the 72-hour cancellation window — use credit/debit notes for later adjustments
  6. For consolidated invoices, aggregate B2C transactions and report periodically
  7. Keep supplier_uuid secure — it authenticates all your API calls

Additional Resources