SEO Title: Day 7: Fix Invalid or Missing InvoiceTypeCode in IRB XML #invoicetypecode #irbvalidation
Focus Keyphrase: IRB InvoiceTypeCode error
Meta Description: Learn how to fix the IRB e-invoice InvoiceTypeCode error in UBL XML. Use the correct code (like 01) to define the document type for successful submission.
IRBM Error: Invalid or Missing InvoiceTypeCode
One small missing tag can result in rejection by IRBM:
"InvoiceTypeCode is missing or invalid. Must follow MyInvois UBL format."
What This Error Means
IRBM expects your UBL XML to include a valid cbc:InvoiceTypeCode
tag to describe the document type.
Valid IRB Invoice Type Codes
Code | Description |
---|---|
01 | Invoice |
02 | Credit Note |
03 | Debit Note |
Fix It in Laravel
When building your invoice XML:
$cbc = 'urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2';
$invoice->appendChild(
$doc->createElementNS($cbc, 'cbc:InvoiceTypeCode', '01') // Standard invoice
);
Don’t Forget Version
IRBM also expects cbc:UBLVersionID
and cbc:CustomizationID
as part of the header:
$invoice->appendChild($doc->createElementNS($cbc, 'cbc:UBLVersionID', '2.1'));
$invoice->appendChild($doc->createElementNS($cbc, 'cbc:CustomizationID', 'MYINV1.0'));
Validation Checklist
- ✔ InvoiceTypeCode is one of: 01, 02, 03
- ✔ UBLVersionID = 2.1
- ✔ CustomizationID = MYINV1.0
Debug Tip
If IRBM doesn’t recognize your document, check that InvoiceTypeCode is one of the expected values, and is not missing or placed after required tags like cbc:ID
.
Coming Up in Day 8
We’ll fix issues related to PayableAmount mismatches — where your invoice total doesn’t add up due to miscalculated tax or missing precision.
Tags: #IRBIntegration #InvoiceTypeCode #UBLXML #MyInvois #LaravelUBL