Data Structure of Self Billed E-Invoice for Submission to MyInvois System

Updated on: May 14th, 2024

|

92 min read

social iconssocial iconssocial iconssocial icons

As the deadline for e-invoicing in Malaysia approaches, businesses utilizing the API integration e-invoicing model are actively working on integrating their enterprise source systems with MyInvois systems. To facilitate this process, LHDN (Inland Revenue Board of Malaysia) has released a detailed Software Development Kit (version 1.0) with comprehensive documentation related to e-invoicing API integration.

One of the crucial components of the SDK is the “Submit Documents” API. This API defines the elements, fields, and structure required for submitting the invoice data to MyInvios System. According to the SDK version 1, all invoices should be submitted in either XML or JSON format, prepared according to the UBL structure 2.1. 

In this article, we'll get into the details of the self-billed invoice structure. We'll cover elements, field types, data structure, UBL schema mapping, descriptions, and more, equipping you to create a valid,, and compliant self-billed e-invoice.

Before we get into the details let's discuss about Self Billing E-Invoice, Submit Documents API, Invoice Fields

Self-Billed E-Invoice

A self-billed e-invoice is an invoice issued by the buyer to themselves, rather than the supplier, for certain transactions. This includes payments to agents, foreign suppliers, profit distribution, e-commerce transactions, betting and gaming winners, acquisition from individual taxpayers, and interest payments under specified circumstances.

There are specific use cases defined in the guidelines in which the taxpayer can create self-billed e-invoices to report as a proof of expense. Please refer to the E-Invoicing Malaysia specific guidelines to understand these use cases.

Submit Documents API

The Submit Documents API is the primary interface for submitting document details of various types (invoices, credit notes, debit notes, etc) to the MyInvois system. Documents are grouped into a submission, and each document must adhere to the data structure specified for its type.

The API supports JSON and XML formats for document submission, with the format specified in the Content-type request header. Upon calling the API, basic validation is performed to ensure correct structure, followed by validation of each document against the issuing taxpayer and its structure according to the specified document type version.

UBL (Universal Business Language):

UBL, or Universal Business Language, is a standardized XML-based language used for defining and exchanging business documents, such as invoices, purchase orders, and shipping notices, among trading partners. UBL provides a common framework for representing business documents, making it easier for different systems to exchange information seamlessly.

Invoice Fields

Invoice fields refer to the various data elements or attributes contained within an invoice document. These fields typically include information such as the seller's and buyer's details, invoice number, date, item descriptions, quantities, prices, taxes, and total amounts. In total there are 55 fields as per the e-invoicing guidelines released by LHDN.

Constructing UBL Guidance

When the UBL Schema mapping specifies:

/ubl:Invoice/cbc:InvoiceTypeCode/@listVersionID

It indicates that the element should be placed under the <Invoice> element as an <InvoiceTypeCode> element, with the attribute "listVersionId."

For instance, in the UBL XML, the structure for <InvoiceTypeCode> would resemble this:

<Invoice>

    <cbc:InvoiceTypeCode listVersionID="1.0">11</cbc:InvoiceTypeCode>

</Invoice>

Core Fields

The core fields of a self-billed e-Invoice includes essential information about the transaction, including details about the supplier, buyer, invoice version, type, code, date, time, digital signature, currency, exchange rate, and more.

There are two major parts of core fields:

Structures

There are five major data structures defined within the core fields that embed specific data related to each section of the invoice. These structures organize and categorize the information within the e-Invoice.

StructureNatureDescriptionUBL Schema Mapping
SupplierMandatoryRepresents the supplier's information./ ubl:Invoice / cac:AccountingSupplierParty
BuyerMandatoryRepresents the buyer's information./ ubl:Invoice / cac:AccountingCustomerParty
Invoice Line ItemMandatoryStructure representing information about individual invoice lines./ ubl:Invoice / cac:InvoiceLine
AddressMandatory where applicableStructure representing the details of registered/ billing or primary place of Business/ cac:Party / cac:PostalAddress
Issuer’s Digital SignatureMandatoryAn electronic signature used to authenticate the e-Invoice. The signature page provides guidance on Signature Creation and Validation./ ubl:Invoice / cac:Signature

End Elements

End elements refer to the individual data fields or attributes within each structure that capture specific details about the transaction. These elements include information such as the supplier's name and address, buyer's name and address, invoice number, invoice date, payment terms, item descriptions, quantities, prices, taxes, and total amounts. 

Element

Nature

Description

Value Example

UBL Schema Mapping

e-Invoice Version

Mandatory

The current version of the e-Invoice (e.g., 1.0, 2.0, etc.).

1

/ ubl:Invoice / cbc:InvoiceTypeCode / @listVersionID

e-Invoice Type Code

Mandatory

Identifies the type of document (e.g., invoice, credit note, debit note, refund note, etc.).

11

/ ubl:Invoice / cbc:InvoiceTypeCode

e-Invoice Code / Number

Mandatory

Document reference number used by the supplier for internal tracking purposes.

INV12345

/ ubl:Invoice / cbc:ID

e-Invoice Date

Mandatory

Date when the e-Invoice is issued. Note: The date must be the current date.

43065

/ ubl:Invoice / cbc:IssueDate

e-Invoice Time

Mandatory

Time when the e-Invoice is issued. Note: The time must be the current time.

15:30:00Z

/ ubl:Invoice / cbc:IssueTime

Issuer’s Digital Signature

Mandatory

An electronic signature used to authenticate the e-Invoice. The signature page provides guidance on Signature Creation and Validation.

 

/ ubl:Invoice / cac:Signature

Invoice Currency Code

Mandatory

Specific currency used to represent the monetary value stated in the e-Invoice.

MYR

/ ubl:Invoice / cbc:DocumentCurrencyCode / ubl:Invoice / cbc:TaxCurrencyCode (Optional)

Currency Exchange Rate

Mandatory where applicable

Rate at which non-Malaysian currency will be converted into Malaysian Ringgit.

1

/ ubl:Invoice / cac:TaxExchangeRate / cbc:CalculationRate

Frequency of Billing

Optional

Frequency of invoicing (e.g., Daily, Weekly, Biweekly, Monthly, Bimonthly, Quarterly, Half-yearly, Yearly, Others / Not Applicable).

Monthly

/ ubl:Invoice / cac:InvoicePeriod / cbc:Description

Billing Period Start Date

Optional

Start date of the transaction interval.

43065

/ ubl:Invoice / cac:InvoicePeriod / cbc:StartDate

Billing Period End Date

Optional

End date of the transaction interval.

43069

/ ubl:Invoice / cac:InvoicePeriod / cbc:EndDate

Invoice Line Item

Mandatory

Structure representing information about individual invoice lines.

See structure.

/ ubl:Invoice / cac:InvoiceLine

Payment Mode

Optional

Chosen mechanism for transferring funds from buyer to supplier (e.g., cash, cheque, bank transfer, credit card, debit card, e-Wallet/Digital Wallet, etc.).

1

/ ubl:Invoice / cac:PaymentMeans / cbc:PaymentMeansCode

Supplier’s Bank Account Number

Optional

Supplier’s bank account number used for payment by the buyer.

1.23E+12

/ ubl:Invoice / cac:PaymentMeans / cac:PayeeFinancialAccount / cbc:ID

Payment Terms

Optional

Agreed-upon payment terms and conditions including timing and method of payment.

Payment method is Cash

/ ubl:Invoice / cac:PaymentTerms / cbc:Note

PrePayment Amount

Optional

Monetary value prepaid by the buyer to fulfill financial obligations. Please add currencyID attribute to the XML element.

1

/ ubl:Invoice / cac:PrepaidPayment / cbc:PaidAmount [@currencyID=’MYR’]

PrePayment Date

Optional

Date when the prepayment was received.

36526

/ ubl:Invoice / cac:PrepaidPayment / cbc:PaidDate

PrePayment Time

Optional

Time when the prepayment was received.

12:00:00Z

/ ubl:Invoice / cac:PrepaidPayment / cbc:PaidTime

PrePayment Reference Number

Optional

Unique identifier assigned to trace payment.

E12345678912

/ ubl:Invoice / cac:PrepaidPayment / cbc:ID

Bill Reference Number

Optional

Supplier’s internal billing reference number used for payment from the buyer.

E12345678912

/ ubl:Invoice / cac:BillingReference /  cac:AdditionalDocumentReference / cbc:ID

Total Excluding Tax

Mandatory

Total amount payable excluding any applicable taxes (e.g., sales tax, service tax). Please add currencyID attribute to the XML.

1436.5

/ ubl:Invoice / cac:LegalMonetaryTotal / cbc:TaxExclusiveAmount [@currencyID=’MYR’]

Total Including Tax

Mandatory

Total amount payable inclusive of total taxes chargeable. Please add currencyID attribute to the XML.

1436.5

/ ubl:Invoice / cac:LegalMonetaryTotal / cbc:TaxInclusiveAmount [@currencyID=’MYR’]

Total Payable Amount

Mandatory

Total amount payable including total taxes chargeable and any rounding adjustment, excluding any amount paid in advance. Please add currencyID attribute to the XML.

1436.5

/ ubl:Invoice / cac:LegalMonetaryTotal / cbc:PayableAmount [@currencyID=’MYR’]

Total Net Amount

Optional

Total amount payable including applicable line item and invoice level discounts and charges, excluding any applicable taxes (e.g., sales tax, service tax). Please add currencyID attribute to the XML.

1436.5

/ ubl:Invoice / cac:LegalMonetaryTotal / cbc:LineExtensionAmount [@currencyID=’MYR’]

Total Discount Value

Optional

Total amount deducted from the original price of the product(s) or service(s). Please add currencyID attribute to the XML.

1436.5

/ ubl:Invoice / cac:LegalMonetaryTotal / cbc:AllowanceTotalAmount [@currencyID=’MYR’]

Total Fee / Charge Amount

Optional

Total charge associated with the product(s) or service(s) imposed before tax. Please add currencyID attribute to the XML.

1436.5

/ ubl:Invoice / cac:LegalMonetaryTotal / cbc:ChargeTotalAmount [@currencyID=’MYR’]

Total Tax Amount

Mandatory

Total amount of tax payable. Please add currencyID attribute to the XML.

87.63

/ ubl:Invoice / cac:TaxTotal / cbc:TaxAmount [@currencyID=’MYR’]

Rounding Amount

Optional

Rounding amount added to the amount payable. Please add currencyID attribute to the XML.

0.3

/ ubl:Invoice / cac:LegalMonetaryTotal / cbc:PayableRoundingAmount [@currencyID=’MYR’]

Total Taxable Amount Per Tax Type

Optional

Sum of the amount chargeable for each tax type. Please add currencyID attribute to the XML.

1460.5

/ ubl:Invoice / cac:TaxTotal / cac:TaxSubtotal / cbc:TaxableAmount [@currencyID=’MYR’]

Total Tax Amount Per Tax Type

Mandatory

Total amount of tax payable for each tax type. Please add currencyID attribute to the XML.

87.63

/ ubl:Invoice / cac:TaxTotal / cac:TaxSubtotal / cbc:TaxAmount [@currencyID=’MYR’]

Details of Tax Exemption (Invoice level tax exemption)

Mandatory if tax exemption is applicable

Description of tax exemption applied at the invoice level, such as buyer’s sales tax exemption certificate number or special exemptions from gazette orders. No special characters allowed except dash (-). Add currencyID attribute to XML.

Goods acquired with SST exemption under Sales Tax Act 2018. Reference No: (C01-2345-67890123)

/ ubl:Invoice / cac:TaxTotal / cac:TaxSubtotal / cac:TaxCategory / cbc:TaxExemptionReason AND / ubl:Invoice / cac:TaxTotal / cac:TaxSubtotal / cbc:TaxAmount = 0 [@currencyID=’MYR’] AND / ubl:Invoice / cac:TaxTotal / cac:TaxSubtotal / cac:TaxCategory / cbc:ID = ‘E’ AND / ubl:Invoice / cac:TaxTotal / cac:TaxSubtotal / cac:TaxCategory / cac:TaxScheme / cbc:ID [schemeID=”UN/ECE 5153” schemeAgencyID=”6”] = “OTH”

Amount Exempted from Tax (Invoice level tax exemption)

Mandatory if tax exemption is applicable

Total tax exempted for sales or service tax purposes on the invoice. Add currencyID attribute to XML.

1460.5

/ ubl:Invoice / cac:TaxTotal / cac:TaxSubtotal / cbc:TaxableAmount [@currencyID=’MYR’] AND / ubl:Invoice / cac:TaxTotal / cac:TaxSubtotal / cbc:TaxAmount [@currencyID=’MYR’] = 0 AND / ubl:Invoice / cac:TaxTotal / cac:TaxSubtotal / cac:TaxCategory / cbc:ID = ‘E’ AND / ubl:Invoice / cac:TaxTotal / cac:TaxSubtotal / cac:TaxCategory / cac:TaxScheme / cbc:ID [schemeID=”UN/ECE 5153” schemeAgencyID=”6”] = “OTH”

Tax Type

Mandatory

Applicable tax types, like sales tax, service tax, tourism tax, etc.

1

/ ubl:Invoice / cac:TaxTotal / cac:TaxSubtotal / cac:TaxCategory / cbc:ID AND / ubl:Invoice / cac:TaxTotal / cac:TaxSubtotal / cac:TaxCategory / cac:TaxScheme / cbc:ID [schemeID=”UN/ECE 5153” schemeAgencyID=”6”] = “OTH”

Invoice Additional Discount Amount

Optional

Total additional discounts deducted from original product/service price. Add currencyID attribute to XML.

100

/ ubl:Invoice / cac:AllowanceCharge / cbc:Amount [@currencyID=’MYR’] [cbc:ChargeIndicator = false()] AND / ubl:Invoice / cac:AllowanceCharge / cbc:AllowanceChargeReason (to contain the description of the additional discount applied)

Invoice Additional Fee Amount

Optional

Total additional charges for product(s)/service(s), whether percentage-based or specified rate after tax. Add currencyID attribute to XML.

100

/ ubl:Invoice / cac:AllowanceCharge / cbc:Amount [@currencyID=’MYR’] [cbc:ChargeIndicator = true()] AND / ubl:Invoice / cac:AllowanceCharge / cbc:AllowanceChargeReason (to contain the description of the additional fees)

Shipping Recipient’s Name

Mandatory where applicable

Recipient's name for shipping the products listed in the e-Invoice for a commercial transaction.

Greenz Sdn. Bhd.

/ ubl:Invoice / cac:Delivery / cac:DeliveryParty / cac:PartyLegalEntity / cbc:RegistrationName

Shipping Recipient’s Address

Mandatory where applicable

Address (registered, business, residential, etc.) of the intended recipient of the shipped products mentioned in the e-Invoice for a commercial transaction.

 

/ ubl:Invoice /  cac:Delivery / cac:DeliveryParty / cac:PostalAddress

Shipping Recipient’s TIN

Mandatory where applicable

TIN (Taxpayer Identification Number) assigned to the shipping recipient by IRBM.

C2584563200

/ ubl:Invoice /  cac:Delivery / cac:DeliveryParty / cac:PartyIdentification / cbc:ID [@schemeID=’TIN’]

Shipping Recipient’s Registration Number

Mandatory where applicable

For businesses: Business registration number. For Malaysian individuals: MyKad or MyTentera identification number. For non-Malaysian individuals: Passport number, MyPR, or MyKAS identification number. Note: Use NRIC scheme for MyPR and MyKAS.

BRN: 202001234567

The mapping for this field will depend on the field type which can be one of the following options: / ubl:Invoice / cac:Delivery / cac:DeliveryParty / cac:PartyIdentification / cbc:ID [@schemeID=’NRIC’] OR / ubl:Invoice / cac:Delivery / cac:DeliveryParty / cac:PartyIdentification / cbc:ID [@schemeID=’BRN’] OR / ubl:Invoice / cac:Delivery / cac:DeliveryParty / cac:PartyIdentification / cbc:ID [@schemeID=’PASSPORT’] OR / ubl:Invoice / cac:Delivery / cac:DeliveryParty / cac:PartyIdentification / cbc:ID [@schemeID=’ARMY’]

Reference Number of Customs Form No.1, 9, etc.

Mandatory where applicable

Unique identifier assigned to the Declaration of Imported Goods. Special characters are not permitted.

E12345678912

/ ubl:Invoice / cac:AdditionalDocumentReference[1] / cbc:ID AND / ubl:Invoice / cac:AdditionalDocumentReference[1] /  cbc:DocumentType = “CustomsImportForm”

Incoterms

Mandatory where applicable

A set of international trade regulations defining the responsibilities of buyers and suppliers. Special characters are not permitted.

CIF

/ubl:Invoice / cac:AdditionalDocumentReference[4] / cac:ID

Free Trade Agreement (FTA) Information [For export only, if applicable]

Optional

Specifics, provisions, and requirements outlined in a trade agreement between two or more countries. Special characters are not permitted, except for dash (-), open bracket (() and closed bracket ()).

ASEAN-Australia-New Zealand FTA (AANZFTA)

/ ubl:Invoice / cac:AdditionalDocumentReference[2] / cbc:DocumentType = “FreeTradeAgreement” AND / ubl:Invoice / cac:AdditionalDocumentReference[2] / cbc:ID = “FTA” AND / ubl:Invoice / cac:AdditionalDocumentReference [2] / cbc:DocumentDescription

Authorisation Number for Certified Exporter (e.g., ATIGA number) [For export only, if applicable]

Optional

A unique identification number or code used for validating a certified exporter by the relevant authority. Special characters are not permitted, except for dash (-).

CPT-CCN-W-211111-KL-000002

/ ubl:Invoice / cac:AccountingSupplierParty / cbc:AdditionalAccountID [@schemeAgencyName=’CertEx’]

Reference Number of Customs Form No.2

Optional

Unique identifier assigned to the Declaration of Exported Goods. Special characters are not permitted.

E12345678912

/ ubl:Invoice / cac:AdditionalDocumentReference[3] / cbc:ID AND / ubl:Invoice / cac:AdditionalDocumentReference[3] / cbc:DocumentType = “K2”

Details of other charges

Optional

Details of additional charges and their payable amounts. Please include the currencyID attribute in the XML element.

true 100.00 Service charge

/ ubl:Invoice / cac:Delivery / cac:Shipment / cac:FreightAllowanceCharge / cbc:ChargeIndicator =’true’ AND / ubl:Invoice / cac:Delivery / cac:Shipment / cac:FreightAllowanceCharge / cbc:Amount [@currencyID=’MYR’] AND / ubl:Invoice / cac:Delivery / cac:Shipment / cac:FreightAllowanceCharge / cbc:AllowanceChargeReason (Optional description)

 

Invoice Line Item UBL Schema

The "Invoice Line Item" section of the e-Invoice details each item or service being invoiced in a commercial transaction.

ElementNatureDescriptionValue ExampleUBL Schema Mapping
ClassificationMandatoryCategory of products or services billed in a commercial transaction. Multiple classification codes can be added for items in the e-Invoice.1/ ubl:Invoice / cac:InvoiceLine / cac:Item / cac:CommodityClassification [1 ..*] / cbc:ItemClassificationCode [@listID=’CLASS’]
Description of Product or ServiceMandatoryProduct or service details billed in a commercial transaction.Laptop Peripherals/ ubl:Invoice / cac:InvoiceLine / cac:Item / cbc:Description
Unit PriceMandatoryPrice per unit of a product or service. Include currencyID attribute in the XML element.17/ ubl:Invoice / cac:InvoiceLine / cac:Price / cbc:PriceAmount [@currencyID=’MYR’]
Tax TypeMandatory where applicableTypes of applicable taxes.1/ ubl:Invoice / cac:InvoiceLine / cac:TaxTotal / cac:TaxSubtotal / cac:TaxCategory / cbc:ID AND / ubl:Invoice / cac:TaxTotal / cac:TaxSubtotal / cac:TaxCategory / cac:TaxScheme / cbc:ID [schemeID=”UN/ECE 5153” schemeAgencyID=”6”] = “OTH”
Tax RateMandatory where applicableApplicable tax rate, whether as a percentage or specified rate.10/ ubl:Invoice / cac:InvoiceLine / cac:TaxTotal / cac:TaxSubtotal / cbc:PerUnitAmount [Note: Total Amount per Unit (e.g., 10)] AND / ubl:Invoice / cac:InvoiceLine / cac:TaxTotal / cac:TaxSubtotal / cbc:BaseUnitMeasure [Note: The Number of Units (e.g., the number of nights)] AND / ubl:Invoice / cac:InvoiceLine / cac:TaxTotal / cac:TaxSubtotal / cbc:TaxAmount [Note: The Total Tax Amount [equals to Total Amount per Unit * Number of Units] AND / ubl:Invoice / cac:InvoiceLine / cac:TaxTotal / cac:TaxSubtotal / cbc:Percent [Note: should not be present at all]
Tax AmountMandatoryTax payable amount. Include currencyID attribute in the XML element.87.63/ ubl:Invoice / cac:InvoiceLine / cac:TaxTotal / cbc:TaxAmount [@currencyID=’MYR’]
Details of Tax ExemptionMandatory if tax exemption is applicableDescription of applicable tax exemptions, e.g., buyer’s sales tax exemption certificate number, special exemptions from gazette orders. Special characters are not allowed, except dash (-). Include currencyID attribute in the XML element.Goods acquired with SST exemption under Sales Tax Act 2018. Reference No: (C01-2345-67890123)/ ubl:Invoice / cac:InvoiceLine / cac:TaxTotal / cac:TaxSubtotal / cac:TaxCategory / cbc:TaxExemptionReason AND / ubl:Invoice / cac:InvoiceLine / cac:TaxTotal / cac:TaxSubtotal / cbc:TaxAmount = 0 [@currencyID=’MYR’] AND / ubl:Invoice / cac:InvoiceLine / cac:TaxTotal / cac:TaxSubtotal / cac:TaxCategory / cbc:ID = ‘E’ AND / ubl:Invoice / cac:TaxTotal / cac:TaxSubtotal / cac:TaxCategory / cac:TaxScheme / cbc:ID [schemeID=”UN/ECE 5153” schemeAgencyID=”6”] = “OTH”
Amount Exempted from TaxMandatory if tax exemption is applicableTotal tax exemption amount for sales or service tax purposes. Include currencyID attribute in the XML element.1460.5/ ubl:Invoice / cac:InvoiceLine / cac:TaxTotal / cac:TaxSubtotal / cbc:TaxableAmount [@currencyID=’MYR’] AND / ubl:Invoice / cac:InvoiceLine / cac:TaxTotal / cac:TaxSubtotal / cbc:TaxAmount [@currencyID=’MYR’] = 0 AND / ubl:Invoice / cac:InvoiceLine / cac:TaxTotal / cac:TaxSubtotal / cac:TaxCategory / cbc:ID = ‘E’ AND / ubl:Invoice / cac:InvoiceLine / cac:TaxTotal / cac:TaxSubtotal / cac:TaxCategory / cac:TaxScheme / cbc:ID [schemeID=”UN/ECE 5153” schemeAgencyID=”6”] = “OTH”
SubtotalMandatoryIndividual item/service amount within the invoice, excluding taxes, charges, or discounts. Include currencyID attribute in the XML element.100/ ubl:Invoice / cac:InvoiceLine / cac:ItemPriceExtension / cbc:Amount [@currencyID=’MYR’]
Total Excluding TaxMandatoryTotal payable amount (inclusive of discounts and charges), excluding taxes (e.g., sales tax, service tax). Include currencyID attribute in the XML element.1436.5/ ubl:Invoice / cac:InvoiceLine / cbc:LineExtensionAmount [@currencyID=’MYR’]
QuantityOptionalNumber of units of a specific product or service in a commercial transaction.1/ ubl:Invoice / cac:InvoiceLine / cbc:InvoicedQuantity
MeasurementOptionalStandard unit or system used to measure the product or service, represented as a decimal value (e.g., 0.15).Kg/ ubl:Invoice / cac:InvoiceLine / cbc:InvoicedQuantity / @unitCode
Discount RateOptionalPercentage of discount from the original product or service price.0.15/ ubl:Invoice / cac:InvoiceLine / cac:AllowanceCharge / cbc:ChargeIndicator  = “false” AND / ubl:Invoice / cac:InvoiceLine / cac:AllowanceCharge / cbc:MultiplierFactorNumeric
Discount AmountOptionalAmount deducted from the original product or service price. Include currencyID attribute in the XML element.1000/ ubl:Invoice / cac:InvoiceLine / cac:AllowanceCharge / cbc:ChargeIndicator  = “false” AND / ubl:Invoice / cac:InvoiceLine / cac:AllowanceCharge / cbc:Amount [@currencyID=’MYR’] AND / ubl:Invoice / cac:InvoiceLine / cac:AllowanceCharge / cbc:AllowanceChargeReason (to contain the description of the line-item discount applied)
Fee / Charge RateOptionalCharge associated with the product or service imposed before tax, whether as a percentage or specified rate. Include currencyID attribute in the XML element.0.1/ ubl:Invoice / cac:InvoiceLine / cac:AllowanceCharge / cbc:ChargeIndicator  = “true” AND / ubl:Invoice / cac:InvoiceLine / cac:AllowanceCharge / cbc:MultiplierFactorNumeric
Fee / Charge AmountOptionalCharge associated with the product or service imposed before tax. Include currencyID attribute in the XML element.1000/ ubl:Invoice / cac:InvoiceLine / cac:AllowanceCharge / cbc:ChargeIndicator  = “true” AND / ubl:Invoice / cac:InvoiceLine / cac:AllowanceCharge / cbc:Amount [@currencyID=’MYR’] AND / ubl:Invoice / cac:InvoiceLine / cac:AllowanceCharge / cbc:AllowanceChargeReason (to contain the description of the line-item fees)
Product Tariff Code [Only applicable to goods]OptionalHarmonized System code of goods under relevant Sales Tax Orders. Special characters, except full stop (.), are not allowed.9800.00.0010/ ubl:Invoice / cac:InvoiceLine / cac:Item / cac:CommodityClassification / cbc:ItemClassificationCode [@listID=’PTC’]
Country of OriginOptionalDescription of the goods' origin.GBR/ ubl:Invoice / cac:InvoiceLine / cac:Item / cac:OriginCountry / cbc:IdentificationCode

 

Supplier’s Details UBL Schema

The "Supplier” section of the e-Invoice provides essential details about the entity responsible for supplying goods or services in a commercial transaction.

ElementNatureDescriptionValue ExampleUBL Schema Mapping
Supplier’s NameMandatoryEntity responsible for supplying goods or services in a commercial transaction, whether a business or individual.AMS Setia Jaya Sdn. Bhd./ ubl:Invoice / cac:AccountingSupplierParty / cac:Party / cac:PartyLegalEntity / cbc:RegistrationName
Supplier’s TINMandatoryTax Identification Number (TIN) assigned by the Inland Revenue Board of Malaysia (IRBM).C2584563222/ ubl:Invoice / cac:AccountingSupplierParty / cac:Party / cac:PartyIdentification / cbc:ID [@schemeID=’TIN’]
Supplier’s Registration / Identification Number / Passport NumberMandatoryFor businesses: Registration number as per official business records. For Malaysian individuals: Identity card (MyKad) or military identification number (MyTentera). For non-Malaysian individuals: Passport number or MyPR/MyKAS identification. Note: MyPR and MyKAS should adhere to the NRIC scheme.BRN: 202001234567The mapping for this field will depend on the field type which can be one of the following options: / ubl:Invoice / cac:AccountingSupplierParty / cac:Party / cac:PartyIdentification / cbc:ID [@schemeID=’NRIC’] OR / ubl:Invoice / cac:AccountingSupplierParty / cac:Party / cac:PartyIdentification / cbc:ID [@schemeID=’BRN’] OR / ubl:Invoice / cac:AccountingSupplierParty / cac:Party / cac:PartyIdentification / cbc:ID [@schemeID=’PASSPORT’] OR / ubl:Invoice / cac:AccountingSupplierParty / cac:Party / cac:PartyIdentification / cbc:ID [@schemeID=’ARMY’]
Supplier’s SST Registration NumberMandatory for SST-registrantSales and Services Tax (SST) registration number of the supplier. *Not applicable to non-SST-registered suppliers. Special characters are disallowed except for dashes (-). Use "NA" if the supplier is not registered for SST.A01-2345-67891012/ ubl:Invoice / cac:AccountingSupplierParty / cac:Party / cac:PartyIdentification / cbc:ID [@schemeID=’SST’]
Supplier’s Tourism Tax Registration NumberMandatory for tourism tax registrantTourism tax registration number of the supplier. *Only applicable to tourism tax registrants such as hotel and online travel operators. Special characters are disallowed except for dashes (-). Use "NA" if the supplier is not registered for tourism tax.123-4567-89012345/ ubl:Invoice / cac:AccountingSupplierParty / cac:Party / cac:PartyIdentification / cbc:ID [@schemeID=’TTX’]
Supplier’s e-mailOptionalSupplier's email address, adhering to email standards (RFC 5321 and RFC 5322).general.ams@supplier.com/ ubl:Invoice / cac:AccountingSupplierParty / cac:Party / cac:Contact / cbc:ElectronicMail
Supplier’s Malaysia Standard Industrial Classification (MSIC) CodeMandatoryFive-digit numeric code representing the nature and activity of the supplier's business.1111/ ubl:Invoice / cac:AccountingSupplierParty / cac:Party / cbc:IndustryClassificationCode
Supplier’s Business Activity DescriptionMandatoryDescription of the supplier's business activity.Growing of maize/ ubl:Invoice / cac:AccountingSupplierParty / cac:Party / cbc:IndustryClassificationCode / @name
Supplier’s AddressMandatoryAddress, whether registered, business, residential, etc., of the entity supplying goods or services in a commercial transaction. . / cac:Party / cac:PostalAddress
Supplier’s Contact NumberMandatorySupplier's telephone number, including office, mobile, or fax, following the E.164 standard-1.2E+08/ ubl:Invoice / cac:AccountingSupplierParty / cac:Party / cac:Contact / cbc:Telephone

 

Buyer Details UBL Schema

The "Buyer" section of the e-Invoice provides crucial information about the recipient of goods/services, who also acts as the issuer of the self-billed e-Invoice in a commercial transaction.

ElementNatureDescriptionValue ExampleUBL Schema Mapping
Buyer’s NameMandatoryName of the recipient of goods/services, who also acts as the issuer of the self-billed e-Invoice in a commercial transaction.Hebat Group/ ubl:Invoice / cac:AccountingCustomerParty / cac:Party / cac:PartyLegalEntity / cbc:RegistrationName
Buyer’s TINMandatoryTax Identification Number (TIN) of the buyer, assigned by the Inland Revenue Board of Malaysia (IRBM).C2584563200/ ubl:Invoice / cac:AccountingCustomerParty / cac:Party / cac:PartyIdentification / cbc:ID [@schemeID=’TIN’]
Buyer’s Registration / Identification Number / Passport NumberMandatoryFor businesses: Business registration number. For Malaysian individuals: Identity card (MyKad) or military identification number (MyTentera). For non-Malaysian individuals: Passport number or MyPR/MyKAS identification. Note: MyPR and MyKAS should adhere to the NRIC scheme.BRN: 202001234567The mapping for this field will depend on the field type which can be one of the following options: / ubl:Invoice / cac:AccountingCustomerParty / cac:Party / cac:PartyIdentification / cbc:ID [@schemeID=’NRIC’] OR / ubl:Invoice / cac:AccountingCustomerParty / cac:Party / cac:PartyIdentification / cbc:ID [@schemeID=’BRN’] OR / ubl:Invoice / cac:AccountingCustomerParty / cac:Party / cac:PartyIdentification / cbc:ID [@schemeID=’PASSPORT’] OR / ubl:Invoice / cac:AccountingCustomerParty / cac:Party / cac:PartyIdentification / cbc:ID [@schemeID=’ARMY’]
Buyer’s SST Registration NumberMandatory for SST-registrantSales and Services Tax (SST) registration number of the buyer. *Not applicable to buyers who are not registered for SST. Special characters, except dashes (-), are disallowed. Use "NA" if the buyer's SST registration number is unavailable or not provided. / ubl:Invoice / cac:AccountingCustomerParty / cac:Party / cac:PartyIdentification / cbc:ID [@schemeID=’SST’]
Buyer’s e-mailOptionalEmail address of the buyer, following email standards (RFC 5321 and RFC 5322).name@buyer.com/ ubl:Invoice / cac:AccountingCustomerParty / cac:Party / cac:Contact / cbc:ElectronicMail
Buyer’s AddressMandatoryAddress, including registered, business, residential, etc., of the recipient of the e-Invoice in a commercial transaction. / ubl:Invoice / cac:AccountingCustomerParty / cac:Party / cac:PostalAddress
Buyer’s Contact NumberMandatoryTelephone number of the buyer, such as office, mobile, or fax, adhering to the E.164 standard. The supplier can input "NA" for the buyer's contact number when issuing a consolidated e-Invoice.=60-123456789/ ubl:Invoice / cac:AccountingCustomerParty / cac:Party / cac:Contact / cbc:Telephone

 

Address

The "Address” section of the e-Invoice structure comprises essential fields providing detailed location information.

ElementNatureDescriptionValue ExampleUBL Schema Mapping
Address Line 0MandatoryPrimary address line providing essential address information. If "NA" is entered, other address fields, except for the state field mapped to (cbc:CountrySubentityCode), would not be provided.Lot 66. / cac:Party / cac:PostalAddress / cac:AddressLine / cbc:Line
Address Line 1OptionalAdditional address line offering supplementary details to the main address line.Bangunan Merdeka. / cac:Party / cac:PostalAddress / cac:AddressLine / cbc:Line
Address Line 2OptionalAnother supplementary address line providing further details.Persiaran Jaya. / cac:Party / cac:PostalAddress / cac:AddressLine / cbc:Line
Postal ZoneOptionalIdentifier for a group of properties that can be addressed using postal services.50480. / cac:Party / cac:PostalAddress / cbc:PostalZone
City NameMandatoryCommon name of the city, town, or village where the Supplier, Buyer, and Shipping Recipient are located.Kuala Lumpur. / cac:Party / cac:PostalAddress / cbc:CityName
StateMandatory, this is the stateState within a country.14. / cac:Party / cac:PostalAddress / cbc:CountrySubentityCode
CountryMandatoryCode identifying the country.MYS. / cac:Party / cac:PostalAddress / cac:Country / cbc:IdentificationCode [@listID=’ISO3166-1’] [@listAgencyID=’6’]

 

Digital Signature

This section offers guidance on creating a digital signature for documents, following the UBL 2.1 published standards for both XML and JSON formats. The methods outlined in the Digital Signature structure page are specifically for documents submitted using the APIs detailed in this SDK, as described in the Submit Documents section.

Submitters must utilize a valid digital certificate issued by a recognized Certificate Authority (CA) in Malaysia.

Sample Structure for the Self Billed 

UBL 2.1 Sample XML
UBL 2.1 Sample JSON
UBL 2.1 Foreign Currency Sample XML

Note: 

Please be aware that the sample provided above is intended solely for offering guidance on UBL 2.1 XML. Taxpayers should not rely solely on this example. It's recommended that taxpayers adhere to the structure outlined in UBL 2.1. For JSON format, taxpayers should follow the UBL schema in a similar manner.

Conclusion

Adhering to the standards and UBL Mapping Schema outlined in UBL 2.1 for both XML and JSON formats is essential for ensuring consistency and compatibility in document submission. Taxpayers are encouraged to follow these guidelines diligently to maintain compliance and facilitate smooth processing of documents.

Index