Document- and Line-Level Elements

Elements can be defined at the Document or Line level or both.

Elements and Extensions can be defined on the Document or Line-level, depending on requirements and use cases.

Document-Level

Document level means the element is in the top level of the Invoice element. This code snippet shows some Document level elements:

 <ubl:Invoice xmlns:ubl="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:cec="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:vrbl="urn:vertexinc:vrbl:ExtensionComponent:1">
  	<!-- Original specification MY: MyInvois: https://sdk.myinvois.hasil.gov.my/documents/invoice-v1-0/ -->
  	<!-- Required UBL extensions -->
  	<cec:UBLExtensions>
  		<cec:UBLExtension>
  			<cec:ExtensionContent>
  				<vrbl:InvoiceExtension>
  					<vrbl:RoutingDetails>
  						<!-- Unique sender ID. In case of Malaysia always the sender's VAT ID -->
  						<vrbl:Sender>C2584563222</vrbl:Sender>
  						<!-- Unique receiver ID. In case of Malaysia always a static value identifies the country (Malaysia) and the target version to be created -->
  						<vrbl:Receiver>GENERIC_MY_MYINVOIS_1p0p0</vrbl:Receiver>
  					</vrbl:RoutingDetails>
  				</vrbl:InvoiceExtension>
  			</cec:ExtensionContent>
  		</cec:UBLExtension>
  	</cec:UBLExtensions>
  	<cbc:CustomizationID>urn:vertexinc:vrbl:billing:1</cbc:CustomizationID>
  	<cbc:ProfileID>urn:vertexinc:vrbl:billing:1</cbc:ProfileID>
  	<cbc:ID>INV12345</cbc:ID>
  	<cbc:IssueDate>2024-11-26</cbc:IssueDate>
  	<cbc:IssueTime>15:30:00Z</cbc:IssueTime>
  	<!-- MY: Invoice type code list: https://sdk.myinvois.hasil.gov.my/codes/e-invoice-types/ (mandatory) -->
  	<!-- MY codes are not UNTDID 1001 compliant -->
  	<!-- Original code:    01 - Invoice -->
  	<!-- Expected code: VRBL:MY:01 - Invoice -->
  	<cbc:InvoiceTypeCode>VRBL:MY:01</cbc:InvoiceTypeCode>
  	<cbc:DocumentCurrencyCode>MYR</cbc:DocumentCurrencyCode>
  	<cbc:BuyerReference>buyer_ref_number234</cbc:BuyerReference>
  	<cac:InvoicePeriod>
  		<cbc:StartDate>2024-11-26</cbc:StartDate>
  		<cbc:EndDate>2024-11-30</cbc:EndDate>
  		<cbc:Description>Monthly</cbc:Description>
  	</cac:InvoicePeriod>
  	<cac:OrderReference>

Invoice-Level

Invoice lines are specified in the InvoiceLine element. See Invoice Lines, for example:

<cac:InvoiceLine>
  		<cbc:ID>0001</cbc:ID>
  		<cbc:InvoicedQuantity unitCode="C62">2</cbc:InvoicedQuantity>
  		<cbc:LineExtensionAmount currencyID="MYR">2925.00</cbc:LineExtensionAmount>
  		<cac:AllowanceCharge>
  			<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
  			<cbc:AllowanceChargeReason>Sample Description</cbc:AllowanceChargeReason>
  			<cbc:MultiplierFactorNumeric>0.15</cbc:MultiplierFactorNumeric>
  			<cbc:Amount currencyID="MYR">225</cbc:Amount>
  		</cac:AllowanceCharge>
  		<cac:AllowanceCharge>
  			<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
  			<cbc:AllowanceChargeReason>Sample Description</cbc:AllowanceChargeReason>
  			<cbc:MultiplierFactorNumeric>0.10</cbc:MultiplierFactorNumeric>
  			<cbc:Amount currencyID="MYR">150</cbc:Amount>
  		</cac:AllowanceCharge>

Additional Documents (Supporting Documents)

Supporting documents that are referenced or attached to the Documents that are sent to Vertex e-Invoicing are called Additional Documents.

In certain circumstances, these can also be attached as described in the Attachments topic.

In this Section

This section contains the following topics:

TopicDescription
DocumentsOverview topic for this section.
Invoice TypesYou use the InvoiceTypeCode element to specify a value that represents the type of invoice.
Invoice LinesYou use the InvoiceLine element to specify details that apply to line items.
Credit NotesYou use the Invoice element to model credit notes.