Overview
Credit Note is another document type supported by the MyInvois System. It is used to submit issued invoices with the Tax Authority.
Guidance on constructing UBL -
In the below Data Structure, if the UBL Schema mapping says
/ ubl:Invoice / cbc:InvoiceTypeCode / @listVersionID
which means that it needs to go under Invoice element as a InvoiceTypeCode element with an attribute listVersionId.
For Example - The UBL XML for InvoiceTypeCode will look like this -
<Invoice>
<cbc:InvoiceTypeCode listVersionID="1.1">02</cbc:InvoiceTypeCode>
</Invoice>
Data Structure
Core
The data structure of the credit note v1.0 document consists of a single document
element that contains these additional elements. Note that this description defines the data structure while actual attribute naming could be different for JSON and XML data structures.
ELEMENT | Field TYPE | DESCRIPTION | VALUE EXAMPLE | UBL Schema Mapping | Mandatory | Number of Chars | Cardinality |
---|---|---|---|---|---|---|---|
Supplier | Supplier | Structure representing the supplier information. | / ubl:Invoice / cac:AccountingSupplierParty | Mandatory | |||
Buyer | Buyer | Structure representing the buyer information. | / ubl:Invoice / cac:AccountingCustomerParty | Mandatory | |||
e-Invoice Version | xsd:normalizedString | Current e-Invoice version (e.g., 1.0, 2.0, etc.) | 1.1 | / ubl:Invoice / cbc:InvoiceTypeCode / @listVersionID | Mandatory | 5 | [1-1] |
e-Invoice Type Code | xsd:normalizedString | Identifies the document type (e.g., invoice, credit note, debit note, refund note, etc.) | 02 | / ubl:Invoice / cbc:InvoiceTypeCode | Mandatory | 2 | [1-1] |
e-Invoice Code / Number | xsd:normalizedString | Document reference number used by Supplier for internal tracking purpose | INV12345 | / ubl:Invoice / cbc:ID | Mandatory | 50 | [1-1] |
Original e-Invoice Reference Number | xsd:normalizedString | LHDNM Unique Identifier Number of original invoice / document that is being affected / adjusted. Applicable where a debit note, credit note or refund note e-Invoice is issued. Self-billed versions can only refer to Self-Billed Invoice, and normal versions can only refer to Normal Invoices. | / ubl:Invoice / cac:BillingReference / cac:InvoiceDocumentReference / cbc:UUID = “LHDNM Unique Identifier Number” ALSO required / ubl:Invoice / cac:BillingReference / cac:InvoiceDocumentReference / cbc:ID = “Internal ID” / e-Invoice Code / Number |
Mandatory where applicable | 26 | [0-*] | |
e-Invoice Date | xsd:date | Date of issuance of the e-Invoice *Note that the date must be the current date |
2017-11-26 | / ubl:Invoice / cbc:IssueDate | Mandatory | 10 | [1-1] |
e-Invoice Time | xsd:time | Time of issuance of the e-Invoice *Note that the time must be the current time |
15:30:00Z | / ubl:Invoice / cbc:IssueTime |
Mandatory | 9 | [1-1] |
Issuer’s Digital Signature | cac:SignatureType | An electronic signature to authenticate the e-Invoice. Signature page provides guidance on Signature Creation and Validation. | / ubl:Invoice / cac:Signature | Mandatory | [1-1] | ||
Invoice Currency Code | xsd:normalizedString | Specific currency that is used to represent the monetary value stated in the e-Invoice | MYR | / ubl:Invoice / cbc:DocumentCurrencyCode / ubl:Invoice / cbc:TaxCurrencyCode (Optional) |
Mandatory | 3 | [1-1] [0-1] |
Currency Exchange Rate | xsd:decimal | Rate at which non-Malaysian currency will be converted into Malaysian Ringgit. | 1.0 | / ubl:Invoice / cac:TaxExchangeRate / cbc:CalculationRate AND / ubl:Invoice / cac:TaxExchangeRate / cbc:SourceCurrencyCode = DocumentCurrencyCode AND / ubl:Invoice / cac:TaxExchangeRate / cbc:TargetCurrencyCode = MYR |
Mandatory where applicable | 15 | [0-1] |
Frequency of Billing | xsd:string | Frequency of the invoice (e.g., Daily, Weekly, Biweekly, Monthly, Bimonthly, Quarterly, Half-yearly, Yearly, Others / Not Applicable) | Monthly | / ubl:Invoice / cac:InvoicePeriod / cbc:Description | Optional | 50 | [0-1] |
Billing Period Start Date | xsd:date | start date of the transaction interval | 2017-11-26 | / ubl:Invoice / cac:InvoicePeriod / cbc:StartDate | Optional | 10 | [0-1] |
Billing Period End Date | xsd:date | end date of the transaction interval | 2017-11-30 | / ubl:Invoice / cac:InvoicePeriod / cbc:EndDate | Optional | 10 | [0-1] |
Invoice Line Item | InvoiceLineItem | Structure representing the Invoice line information. | See structure. | / ubl:Invoice / cac:InvoiceLine | Mandatory | ||
Payment Mode | xsd:normalizedString | Chosen mechanism through which funds are transferred from buyer to supplier (e.g., cash, cheque, bank transfer, credit card, debit card, e-Wallet/ Digital Wallet, etc.) | 01 | / ubl:Invoice / cac:PaymentMeans / cbc:PaymentMeansCode | Optional | 2 | [0-1] |
Supplier’s Bank Account Number | xsd:normalizedString | The Supplier’s bank account number to facilitate payment by Buyer | 1234567890123 | / ubl:Invoice / cac:PaymentMeans / cac:PayeeFinancialAccount / cbc:ID | Optional | 150 | [0-1] |
Payment Terms | xsd:string | An agreed-upon payment terms and conditions e.g., timing and method of payment | Payment method is Cash | / ubl:Invoice / cac:PaymentTerms / cbc:Note | Optional | 300 | [0-1] |
PrePayment Amount | xsd:decimal | Monetary value that is prepaid by the Buyer in order to fulfill the financial obligation. Please add currencyID attribute to the XML element. |
1.00 | / ubl:Invoice / cac:PrepaidPayment / cbc:PaidAmount [@currencyID=’MYR’] | Optional | [0-1] | |
PrePayment Date | xsd:date | Date of prepayment received | 2000-01-01 | / ubl:Invoice / cac:PrepaidPayment / cbc:PaidDate | Optional | 10 | [0-1] |
PrePayment Time | xsd:time | Time of prepayment received | 12:00:00Z | / ubl:Invoice / cac:PrepaidPayment / cbc:PaidTime | Optional | 9 | [0-1] |
PrePayment Reference Number | xsd:normalizedString | Unique identifier assigned to trace payment | E12345678912 | / ubl:Invoice / cac:PrepaidPayment / cbc:ID | Optional | 150 | [0-1] |
Bill Reference Number | xsd:normalizedString | Supplier’s internal billing reference number to facilitate payment from Buyer | E12345678912 | / ubl:Invoice / cac:BillingReference / cac:AdditionalDocumentReference / cbc:ID | Optional | 150 | [0-1] |
Total Excluding Tax | xsd:decimal | Sum of amount payable (inclusive of applicable discounts and charges), excluding any applicable taxes (e.g., sales tax, service tax). Please add currencyID attribute to the XML element. |
1436.50 | / ubl:Invoice / cac:LegalMonetaryTotal / cbc:TaxExclusiveAmount [@currencyID=’MYR’] | Mandatory | [1-1] | |
Total Including Tax | xsd:decimal | Sum of amount payable inclusive of total taxes chargeable (e.g., sales tax, service tax). Please add currencyID attribute to the XML element. |
1436.50 | / ubl:Invoice / cac:LegalMonetaryTotal / cbc:TaxInclusiveAmount [@currencyID=’MYR’] | Mandatory | [1-1] | |
Total Payable Amount | xsd:decimal | Sum of amount payable (inclusive of total taxes chargeable and any rounding adjustment) excluding any amount paid in advance. Please add currencyID attribute to the XML element. | 1436.50 | / ubl:Invoice / cac:LegalMonetaryTotal / cbc:PayableAmount [@currencyID=’MYR’] | Mandatory | [1-1] | |
Total Net Amount | xsd:decimal | Sum of total amount payable (inclusive of 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 element. |
1436.50 | / ubl:Invoice / cac:LegalMonetaryTotal / cbc:LineExtensionAmount [@currencyID=’MYR’] | Optional | [0-1] | |
Total Discount Value | xsd:decimal | Total amount deducted from the original price of the product(s) or service(s). Please add currencyID attribute to the XML element. | 1436.50 | / ubl:Invoice / cac:LegalMonetaryTotal / cbc:AllowanceTotalAmount [@currencyID=’MYR’] | Optional | [0-1] | |
Total Fee / Charge Amount | xsd:decimal | Total charge associated with the product(s) or service(s) imposed before tax. Please add currencyID attribute to the XML element. | 1436.50 | / ubl:Invoice / cac:LegalMonetaryTotal / cbc:ChargeTotalAmount [@currencyID=’MYR’] | Optional | [1-1] | |
Total Tax Amount | xsd:decimal | Total amount of tax payable. Please add currencyID attribute to the XML element. |
87.63 | / ubl:Invoice / cac:TaxTotal / cbc:TaxAmount [@currencyID=’MYR’] | Mandatory | [0-1] | |
Rounding Amount | xsd:decimal | Rounding amount added to the amount payable. Please add currencyID attribute to the XML element. | 0.30 | / ubl:Invoice / cac:LegalMonetaryTotal / cbc:PayableRoundingAmount [@currencyID=’MYR’] | Optional | [0-1] | |
Total Taxable Amount Per Tax Type | xsd:decimal | Sum of amount chargeable for each tax type. Please add currencyID attribute to the XML element. |
1460.50 | / ubl:Invoice / cac:TaxTotal / cac:TaxSubtotal / cbc:TaxableAmount [@currencyID=’MYR’] | Optional | [0-*] | |
Total Tax Amount Per Tax Type | xsd:decimal | Total amount of tax payable for each tax type. Please add currencyID attribute to the XML element. |
87.63 | / ubl:Invoice / cac:TaxTotal / cac:TaxSubtotal / cbc:TaxAmount [@currencyID=’MYR’] | Mandatory | [1-*] | |
Details of Tax Exemption (Invoice level tax exemption) |
xsd:string xsd:decimal xsd:normalizedString xsd:normalizedString |
Description of tax exemption applicable on the invoice level.(e.g., Buyer’s sales tax exemption certificate number, special exemption as per gazette orders, etc.). The input is limited to the following special characters: period “.”, dash “-“, comma “,” and parenthesis “()”. Please add currencyID attribute to the XML element. |
Goods acquired with SST exemption under Sales Tax Act 2018. Reference No: ABC.TAX(S)012-3/4/56(7) | / 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” |
Mandatory if tax exemption is applicable | 300 | [0-1] |
Amount Exempted from Tax (Invoice level tax exemption) |
xsd:decimal | Total amount of tax exempted for sales tax or service tax purposes on the invoice level. Please add currencyID attribute to the XML element. |
1460.50 | / 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” |
Mandatory if tax exemption is applicable | [0-1] | |
Tax Type | xsd:normalizedString | Type of taxes that will be applicable (e.g., sales tax, service tax, tourism tax, etc.) | 01 | / 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” |
Mandatory | 2 | [1-*] |
Invoice Additional Discount Amount | xsd:decimal xsd:string |
Total amount of additional discount deducted from the original price of the product(s) or service(s). Please add currencyID attribute to the XML element. | 100.00 | / 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) |
Optional | [0-*] | |
Invoice Additional Fee Amount | xsd:decimal xsd:string |
Total additional charge associated with the product(s) or service(s) (be it in the form of % or prevailing specified rate imposed after tax). Please add currencyID attribute to the XML element. | 100.00 | / 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) |
Optional | [0-*] | |
Shipping Recipient’s Name | xsd:string | Name of shipping recipient of the products included in the e-Invoice in a commercial transaction | Greenz Sdn. Bhd. | / ubl:Invoice / cac:Delivery / cac:DeliveryParty / cac:PartyLegalEntity / cbc:RegistrationName | Optional | 300 | [0-1] |
Shipping Recipient’s Address | Address | Address (registered, business, residential, etc.) of business or individual who will be the shipping recipient of the products included in the e-Invoice in a commercial transaction | / ubl:Invoice / cac:Delivery / cac:DeliveryParty / cac:PostalAddres | Optional | [0-1] | ||
Shipping Recipient’s TIN | xsd:normalizedString | TIN of the shipping recipient assigned by LHDNM | C2584563200 | / ubl:Invoice / cac:Delivery / cac:DeliveryParty / cac:PartyIdentification / cbc:ID [@schemeID=’TIN’] | Optional | 14 | [0-1] |
Shipping Recipient’s Registration Number | xsd:normalizedString | For businesses: Business registration number For Malaysian individual: MyKad / MyTentera identification number For non-Malaysian individual: Passport number / MyPR / MyKAS identification number Note: For MyPR and MyKAS to use NRIC scheme |
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’] |
Optional | The length depends on the field type: - NRIC VARCHAR (12 CHAR) - PASSPORT VARCHAR (12 CHAR) - BRN VARCHAR (20 CHAR) - ARMY VARCHAR (12 CHAR) |
[0-1] |
Reference Number of Customs Form No.1, 9, etc. | xsd:string | Unique identifier assigned on the Declaration of Goods Imported. Multiple reference numbers can be separated by commas (,) without space. | E12345678912, E23456789123 |
/ ubl:Invoice / cac:AdditionalDocumentReference[1] / cbc:ID AND / ubl:Invoice / cac:AdditionalDocumentReference[1] / cbc:DocumentType = “CustomsImportForm” |
Mandatory where applicable | 1000 | [0-1] |
Incoterms | xsd:normalizedString | A set of international trade rules that define the responsibilities of buyers and suppliers.The input of special characters is not allowed. | CIF | /ubl:Invoice / cac:AdditionalDocumentReference[4] / cac:ID | Optional | 3 | [0-1] |
Free Trade Agreement (FTA) Information [For export only, if applicable] |
xsd:string xsd:normalizedString xsd:string |
Details, provisions and requirements outlined within a trade agreement between two or more countries. The input of special characters is not allowed, 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 |
Optional | 300 | [0-1] |
Authorisation Number for Certified Exporter (e.g., ATIGA number) [For export only, if applicable] |
xsd:normalizedString | A unique identification number or code used for validation of a certified exporter by the relevant authority. The input of special characters is not allowed, except for dash (-). | CPT-CCN-W-211111-KL-000002 | / ubl:Invoice / cac:AccountingSupplierParty / cbc:AdditionalAccountID [@schemeAgencyName=’CertEx’] | Optional | 300 | [0-1] |
Reference Number of Customs Form No.2 | xsd:normalizedString xsd:string |
Unique identifier assigned on the Declaration of Goods Exported. Multiple reference numbers can be separated by commas (,) without space. | E12345678912, E23456789123 |
/ ubl:Invoice / cac:AdditionalDocumentReference[3] / cbc:ID AND / ubl:Invoice / cac:AdditionalDocumentReference[3] / cbc:DocumentType = “K2” |
Optional | 1000 | [0-1] |
Details of other charges | xsd:normalizedString xsd:boolean xsd:decimal xsd:string |
Details of additional charges, along with the amount payable. Please add currencyID attribute to the XML element. |
INV12345 true 100.00 Service charge |
/ ubl:Invoice / cac:Delivery / cac:Shipment / cbc:ID = ‘Document reference number used by Supplier for internal tracking purpose’ (same as e-Invoice Code / Number field) AND / 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) |
Optional | 300 300 |
[0-1] |
Invoice Line Item
ELEMENT | Field TYPE | DESCRIPTION | VALUE EXAMPLE | UBL Schema Mapping | Mandatory | Number of Chars | Cardinality |
---|---|---|---|---|---|---|---|
Classification | xsd:normalizedString | Category of products or services being billed as a result of a commercial transaction. More than 1 classification codes can be added for goods / services included in the e-Invoice. | 001 | / ubl:Invoice / cac:InvoiceLine / cac:Item / cac:CommodityClassification [1 ..*] / cbc:ItemClassificationCode [@listID=’CLASS’] | Mandatory | 3 | [1-*] |
Description of Product or Service | xsd:string | Details of products or services being billed as a result of a commercial transaction | Laptop Peripherals | / ubl:Invoice / cac:InvoiceLine / cac:Item / cbc:Description | Mandatory | 300 | [1-1] |
Unit Price | xsd:decimal | Price assigned to a single unit of a product or service. Please add currencyID attribute to the XML element |
17.00 | / ubl:Invoice / cac:InvoiceLine / cac:Price / cbc:PriceAmount [@currencyID=’MYR’] | Mandatory | [1-1] | |
Tax Type | xsd:normalizedString | Type of taxes that will be applicable | 01 | / ubl:Invoice / cac:InvoiceLine / cac:TaxTotal / cac:TaxSubtotal / cac:TaxCategory / cbc:ID AND / ubl:Invoice / cac:InvoiceLine / cac:TaxTotal / cac:TaxSubtotal / cac:TaxCategory / cac:TaxScheme / cbc:ID [schemeID=”UN/ECE 5153” schemeAgencyID=”6”] = “OTH” |
Mandatory | 2 | [1-*] |
Tax Rate | xsd:decimal | The appropriate tax rate (be it in the form of percentage (%) or prevailing specified rate) that is applicable | 10 | Applicable for Fixed Rate / ubl:Invoice / cac:InvoiceLine / cac:TaxTotal / cac:TaxSubtotal / cbc:PerUnitAmount [@currencyID=’MYR’] [Note: Total Amount per Unit (e.g., 10)] / ubl:Invoice / cac:InvoiceLine / cac:TaxTotal / cac:TaxSubtotal / cbc:BaseUnitMeasure @unitCode [Note: The Number of Units (e.g., the number of nights)- Applicable for Fixed Rate] / ubl:Invoice / cac:InvoiceLine / cac:TaxTotal / cac:TaxSubtotal / cbc:TaxAmount [Note: The Total Tax Amount = Total Amount per Unit * Number of Units] Applicable for Percentage / ubl:Invoice / cac:InvoiceLine / cac:TaxTotal / cac:TaxSubtotal / cbc:Percent [Note: If the Tax Rate in percentage, only provide this element] / ubl:Invoice / cac:InvoiceLine / cac:TaxTotal / cac:TaxSubtotal / cbc:TaxAmount [Note: The Total Tax Amount = Total Amount per Unit * Number of Units] |
Mandatory where applicable | [0-*] | |
Tax Amount | xsd:decimal | The amount of tax payable. Please add currencyID attribute to the XML element. |
87.63 | / ubl:Invoice / cac:InvoiceLine / cac:TaxTotal / cbc:TaxAmount [@currencyID=’MYR’] | Mandatory | [1-*] | |
Details of Tax Exemption | xsd:string xsd:decimal xsd:normalizedString xsd:normalizedString |
Description of tax exemption applicable.(e.g., Buyer’s sales tax exemption certificate number, special exemption as per gazette orders, etc.). The input is limited to the following special characters: period “.”, dash “-“, comma “,” and parenthesis “()”. Please add currencyID attribute to the XML element. |
Goods acquired with SST exemption under Sales Tax Act 2018. Reference No: ABC.TAX(S)012-3/4/56(7) | / 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:InvoiceLine / cac:TaxTotal / cac:TaxSubtotal / cac:TaxCategory / cac:TaxScheme / cbc:ID [schemeID=”UN/ECE 5153” schemeAgencyID=”6”] = “OTH” |
Mandatory if tax exemption is applicable | 300 | [0-*] |
Amount Exempted from Tax | xsd:decimal | Total amount of tax exempted for sales tax or service tax purposes. Please add currencyID attribute to the XML element. |
1460.50 | / 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” |
Mandatory if tax exemption is applicable | [0-*] | |
Subtotal | xsd:decimal | Amount of each individual item / service within the invoice, excluding any taxes, charges or discounts Please add currencyID attribute to the XML element. |
100.00 | / ubl:Invoice / cac:InvoiceLine / cac:ItemPriceExtension / cbc:Amount [@currencyID=’MYR’] | Mandatory | [1-1] | |
Total Excluding Tax | xsd:decimal | Sum of amount payable (inclusive of applicable discounts and charges), excluding any applicable taxes (e.g., sales tax, service tax). Please add currencyID attribute to the XML element. | 1436.50 | / ubl:Invoice / cac:InvoiceLine / cbc:LineExtensionAmount [@currencyID=’MYR’] | Mandatory | [1-1] | |
Quantity | xsd:decimal | Number of units of a particular product or service in a commercial transaction | 1.00 | / ubl:Invoice / cac:InvoiceLine / cbc:InvoicedQuantity | Optional | Recommended: Up to 5 decimal Places | [0-1] |
Measurement | xsd:normalizedString | Standard unit or system used to measure the product or service.This value should be represented in actual decimal value like 0.15. This field is following the UN/ECE Recommendation 20, Revision 17 (2021) as per here hence the values should be following that standard. |
KGM | / ubl:Invoice / cac:InvoiceLine / cbc:InvoicedQuantity / @unitCode | Optional | 3 | [0-1] |
Discount Rate | xsd:boolean xsd:decimal |
Percentage of deduction from the original price of a product or service | 0.15 | / ubl:Invoice / cac:InvoiceLine / cac:AllowanceCharge / cbc:ChargeIndicator = “false” AND / ubl:Invoice / cac:InvoiceLine / cac:AllowanceCharge / cbc:MultiplierFactorNumeric |
Optional | [0-*] | |
Discount Amount | xsd:boolean xsd:decimal xsd:string |
Amount deducted from the original price of a product or service. Please add currencyID attribute to the XML element. |
1000.00 | / 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) |
Optional | [0-*] | |
Fee / Charge Rate | xsd:boolean xsd:decimal |
Charge associated with the product or service (be it in the form of percentage (%) or prevailing specified rate) imposed before tax. Please add currencyID attribute to the XML element | 0.10 | / ubl:Invoice / cac:InvoiceLine / cac:AllowanceCharge / cbc:ChargeIndicator = “true” AND / ubl:Invoice / cac:InvoiceLine / cac:AllowanceCharge / cbc:MultiplierFactorNumeric |
Optional | [0-*] | |
Fee / Charge Amount | xsd:boolean xsd:decimal xsd:string |
Charge associated with the product or service imposed before tax. Please add currencyID attribute to the XML element. | 1000.00 | / 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) |
Optional | [0-*] | |
Product Tariff Code [Only applicable to goods] |
xsd:normalizedString | Harmonized System code of the goods under the relevant Orders.The input of special characters is not allowed, except for fullstop (.). | 9800.00.0010 | / ubl:Invoice / cac:InvoiceLine / cac:Item / cac:CommodityClassification / cbc:ItemClassificationCode [@listID=’PTC’] | Optional | 12 | [0-1] |
Country of Origin | xsd:normalizedString | Description of origin of goods | GBR | / ubl:Invoice / cac:InvoiceLine / cac:Item / cac:OriginCountry / cbc:IdentificationCode | Optional | 3 | [0-1] |
Supplier
ELEMENT | Field TYPE | DESCRIPTION | VALUE EXAMPLE | UBL Schema Mapping | Mandatory | Number of Chars | Context | Cardinality |
---|---|---|---|---|---|---|---|---|
Supplier’s Name | xsd:string | Name of business or individual who will be the supplier providing the goods / services in a commercial transaction. | AMS Setia Jaya Sdn. Bhd. | / ubl:Invoice / cac:AccountingSupplierParty / cac:Party / cac:PartyLegalEntity / cbc:RegistrationName | Mandatory | 300 | / ubl:Invoice / cac:AccountingSupplierParty | [1-1] |
Supplier’s TIN | xsd:normalizedString | Supplier’s TIN assigned by LHDNM | C2584563222 | / ubl:Invoice / cac:AccountingSupplierParty / cac:Party / cac:PartyIdentification / cbc:ID [@schemeID=’TIN’] | Mandatory | 14 | / ubl:Invoice / cac:AccountingSupplierParty | [1-1] |
Supplier’s Registration / Identification Number / Passport Number | xsd:normalizedString | For businesses: Business registration number For Malaysian individual: MyKad / MyTentera identification number For non-Malaysian individual: Passport number / MyPR / MyKAS identification number Note: For MyPR and MyKAS to use NRIC scheme |
BRN: 202001234567 | The 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’] |
Mandatory | The length depends on the field type: - NRIC VARCHAR (12 CHAR) - PASSPORT VARCHAR (12 CHAR) - BRN VARCHAR (20 CHAR) - ARMY VARCHAR (12 CHAR) |
/ ubl:Invoice / cac:AccountingSupplierParty | [1-1] |
Supplier’s SST Registration Number |
xsd:normalizedString | SST registration number of the Supplier *This is not applicable to Supplier that are not SST-registered. The input of special characters is not allowed, except for dash (-) and semicolon (;). A maximum of two SST registration numbers is allowed, separated by a semicolon. Supplier to input “NA” if supplier is not registered for SST. |
A01-2345-67891012 | / ubl:Invoice / cac:AccountingSupplierParty / cac:Party / cac:PartyIdentification / cbc:ID [@schemeID=’SST’] | Mandatory for SST-registrant | 35 | / ubl:Invoice / cac:AccountingSupplierParty | [1-1] |
Supplier’s Tourism Tax Registration Number | xsd:normalizedString | Tourism tax registration number of the Supplier. *This is only applicable to tourism tax registrant, which may consist of hotel operators and online travel operators. The input of special characters is not allowed, except for dash (-). Supplier to input “NA” if supplier is not registered for tourism tax. |
123-4567-89012345 | / ubl:Invoice / cac:AccountingSupplierParty / cac:Party / cac:PartyIdentification / cbc:ID [@schemeID=’TTX’] | Mandatory for tourism tax registrant | 17 | / ubl:Invoice / cac:AccountingSupplierParty | [1-1] |
Supplier’s e-mail | xsd:string | E-mail address of the Supplier. (Following the email standards (RFC 5321 and RFC 5322)). | general.ams@supplier.com | / ubl:Invoice / cac:AccountingSupplierParty / cac:Party / cac:Contact / cbc:ElectronicMail | Optional | 320 | / ubl:Invoice / cac:AccountingSupplierParty | [0-1] |
Supplier’s Malaysia Standard Industrial Classification (MSIC) Code | xsd:normalizedString | 5-digit numeric code that represent the Supplier’s business nature and activity | 01111 | / ubl:Invoice / cac:AccountingSupplierParty / cac:Party / cbc:IndustryClassificationCode | Mandatory | 5 | / ubl:Invoice / cac:AccountingSupplierParty | [1-1] |
Supplier’s Business Activity Description | xsd:string | Description of the Supplier’s business activity | Growing of maize | / ubl:Invoice / cac:AccountingSupplierParty / cac:Party / cbc:IndustryClassificationCode / @name | Mandatory | 300 | / ubl:Invoice / cac:AccountingSupplierParty | [1-1] |
Supplier’s Address | Address | Address (registered, business, residential, etc.) of business or individual who will be the supplier in a commercial transaction | . / cac:Party / cac:PostalAddress | Mandatory | / ubl:Invoice / cac:AccountingSupplierParty | [1-1] | ||
Supplier’s Contact Number | xsd:string | The telephone number of the Supplier (e.g., office, mobile, fax). Following the E.164 standard (https://www.itu.int/rec/T-REC-E.164). | +60123456789 | / ubl:Invoice / cac:AccountingSupplierParty / cac:Party / cac:Contact / cbc:Telephone | Mandatory | 20 | / ubl:Invoice / cac:AccountingSupplierParty | [1-1] |
Buyer
ELEMENT | Field TYPE | DESCRIPTION | VALUE EXAMPLE | UBL Schema Mapping | Mandatory | Number of Chars | Context | Cardinality |
---|---|---|---|---|---|---|---|---|
Buyer’s Name | xsd:string | Name of recipient of goods / services who is the issuer of the self-billed e-Invoice in a commercial transaction | Hebat Group | / ubl:Invoice / cac:AccountingCustomerParty / cac:Party / cac:PartyLegalEntity / cbc:RegistrationName | Mandatory | 300 | / ubl:Invoice / cac:AccountingCustomerParty | [1-1] |
Buyer’s TIN | xsd:normalizedString | Buyer’s TIN assigned by LHDNM | C2584563200 | / ubl:Invoice / cac:AccountingCustomerParty / cac:Party / cac:PartyIdentification / cbc:ID [@schemeID=’TIN’] | Mandatory | 14 | / ubl:Invoice / cac:AccountingCustomerParty | [1-1] |
Buyer’s Registration / Identification Number / Passport Number | xsd:normalizedString | For businesses: Business registration number For Malaysian individual: MyKad / MyTentera identification number For non-Malaysian individual: Passport number / MyPR / MyKAS identification number Note: For MyPR and MyKAS to use NRIC scheme |
BRN: 201901234567 | The 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’] |
Mandatory | The length depends on the field type: - NRIC VARCHAR (12 CHAR) - PASSPORT VARCHAR (12 CHAR) - BRN VARCHAR (20 CHAR) - ARMY VARCHAR (12 CHAR) |
/ ubl:Invoice / cac:AccountingCustomerParty | [1-1] |
Buyer’s SST Registration Number | xsd:normalizedString | SST registration number of the Buyer *This is not applicable to Buyers that are not SST-registered. The input of special characters is not allowed, except for dash (-) and semicolon (;). A maximum of two SST registration numbers is allowed, separated by a semicolon. Supplier to input “NA” if buyer’s SST registration number is not available or not provided |
/ ubl:Invoice / cac:AccountingCustomerParty / cac:Party / cac:PartyIdentification / cbc:ID [@schemeID=’SST’] | Mandatory for SST-registrant | 35 | / ubl:Invoice / cac:AccountingCustomerParty | [1-1] | |
Buyer’s e-mail | xsd:string | E-mail address of the Buyer (Following the email standards (RFC 5321 and RFC 5322)). |
name@buyer.com | / ubl:Invoice / cac:AccountingCustomerParty / cac:Party / cac:Contact / cbc:ElectronicMail | Optional | 320 | / ubl:Invoice / cac:AccountingCustomerParty | [0-1] |
Buyer’s Address | Address | Address (registered, business, residential, etc.) of recipient of the e-Invoice in a commercial transaction | / ubl:Invoice / cac:AccountingCustomerParty / cac:Party / cac:PostalAddress | Mandatory | / ubl:Invoice / cac:AccountingCustomerParty | [1-1] | ||
Buyer’s Contact Number | xsd:string | The telephone number of the Buyer (e.g., office, mobile, fax) Following the E.164 standard (https://www.itu.int/rec/T-REC-E.164). Supplier can input “NA” for buyer’s contact number for issuance of consolidated e-Invoice. |
+60123456789 | / ubl:Invoice / cac:AccountingCustomerParty / cac:Party / cac:Contact / cbc:Telephone | Mandatory | 20 | / ubl:Invoice / cac:AccountingCustomerParty | [1-1] |
Address
ELEMENT | Field TYPE | DESCRIPTION | VALUE EXAMPLE | UBL Schema Mapping | Mandatory | Number of Chars | Context |
---|---|---|---|---|---|---|---|
Address Line 0 | xsd:string | This is the main address line in an address structure that can be used to give the main address line information. A possible value for this field is “NA” and then all other address fields would not be provided except for the state field which would is mapped to the field (cbc:CountrySubentityCode). | Lot 66 | . / cac:Party / cac:PostalAddress / cac:AddressLine / cbc:Line | Mandatory | 150 | . / cac:Party / cac:PostalAddress |
Address Line 1 | xsd:string | An additional address line in an address that can be used to give further details supplementing the main line. | Bangunan Merdeka | . / cac:Party / cac:PostalAddress / cac:AddressLine / cbc:Line | Optional | 150 | . / cac:Party / cac:PostalAddress |
Address Line 2 | xsd:string | An additional address line in an address that can be used to give further details supplementing the main line. | Persiaran Jaya | . / cac:Party / cac:PostalAddress / cac:AddressLine / cbc:Line | Optional | 150 | . / cac:Party / cac:PostalAddress |
Postal Zone | xsd:string | The identifier for an addressable group of properties according to the relevant postal service | 50480 | . / cac:Party / cac:PostalAddress / cbc:PostalZone | Optional | 50 | . / cac:Party / cac:PostalAddress |
City Name | xsd:string | The common name of the city, town or village, where the Supplier, Buyer and Shipping Recipient address is located. |
Kuala Lumpur | . / cac:Party / cac:PostalAddress / cbc:CityName | Mandatory | 50 | . / cac:Party / cac:PostalAddress |
State | xsd:normalizedString | The state of a country. | 14 | . / cac:Party / cac:PostalAddress / cbc:CountrySubentityCode | Mandatory, this is the state | 50 | . / cac:Party / cac:PostalAddress |
Country | xsd:string | A code that identifies the country. |
MYS | . / cac:Party / cac:PostalAddress / cac:Country / cbc:IdentificationCode [@listID=’ISO3166-1’] [@listAgencyID=’6’] |
Mandatory | 3 | . / cac:Party / cac:PostalAddress |
For guidance to perform mathematical mapping and calculation, refer Mathematical Mappings
Signature
Signature page provides guidance on Signature Creation and Validation.
Sample
Credit Note 1.1 Sample XML
Credit Note 1.1 Sample JSON
Note: Please note that the above sample is to provide guidance on UBL 2.1 XML only and taxpayers should not rely on the example provided. It is recommended for taxpayers to follow the UBL 2.1 structure. For JSON format, taxpayers should follow the UBL schema in a similar way.