MyInvois E-Invoice Error Codes: What They Mean
MyInvois validation failures block invoice issuance. This guide explains the most common IRBM error codes and exactly how to fix each one.
Why MyInvois Errors Are a Finance Problem, Not Just an IT Problem
When a business submits an invoice through Malaysia’s MyInvois system, it passes through IRBM’s validation engine before it is legally issued. That validation engine checks more than thirty distinct rules — covering identity, document structure, mandatory fields, tax calculations, and business logic. If any single check fails, the invoice is rejected. It is not issued. It does not exist in the eyes of IRBM.
This creates a practical problem: most finance teams are accustomed to thinking of invoice issuance as something that happens the moment a PDF leaves their outbox. With e-invoicing, that mental model breaks. An invoice that fails validation at MyInvois has zero legal standing — even if the buyer has already received it by other means. The team now needs to identify the error, fix the underlying data or configuration, and resubmit before the transaction is considered compliant.
The challenge is that IRBM error responses are technical by nature. Finance staff staring at a JSON error object with a code like FIELD_005 or XML_001 need a clear translation of what went wrong and what to do next. This guide provides exactly that — a structured reference mapping MyInvois error codes to plain-English explanations and actionable resolution steps.
Understanding the MyInvois Validation Response
Every API call to MyInvois returns a structured HTTP response. Before you can fix an error, you need to know how to read the response correctly.
HTTP Status Codes
MyInvois uses standard HTTP status codes as the first signal:
- 200 OK — the invoice passed validation and has been issued. A UUID and QR code are returned.
- 400 Bad Request — validation failed. The invoice was rejected. The response body contains error details.
- 401 Unauthorized — authentication failed. Your client certificate or credentials are not accepted.
- 429 Too Many Requests — you have exceeded IRBM’s rate limit. Back off and retry.
- 500 Internal Server Error — an IRBM-side system error. This is not your fault, but you must handle it gracefully.
The Error Response Body
When a 400 is returned, the response body follows a consistent structure:
{
"error": {
"code": "FIELD_002",
"message": "Buyer TIN is required for B2B invoices.",
"details": [
{
"field": "AccountingCustomerParty.Party.PartyTaxScheme.CompanyID",
"issue": "Value is missing or empty."
}
]
}
}
The code field is your primary lookup key. The message provides a human-readable description. The details array, when present, pinpoints the exact XML or JSON field that caused the failure. Every integration should log all three fields — along with the invoice ID, timestamp, and submission payload — to a structured error store that finance and IT can both access.
Do not discard error responses or log only the HTTP status code. The error code is the difference between a fix that takes five minutes and one that takes half a day.
Authentication and Credential Errors
Authentication errors occur before document validation begins. They indicate a problem with how your system is identifying itself to IRBM.
AUTH_001: Client Certificate Expired or Invalid
Your client certificate — issued by IRBM or an approved CA — has expired, been revoked, or is not correctly installed in your integration layer. This error blocks all submissions until resolved.
Resolution: Request a certificate renewal through IRBM’s taxpayer portal or your integration partner. When renewing, plan for a brief parallel period where both the old and new certificates are loaded in your system, then swap to the new one atomically to avoid downtime. The renewal process typically takes 1 to 3 business days through IRBM. Your integration partner can handle the deployment without service interruption.
AUTH_002: Client ID Mismatch
The client ID in your API request does not match the registered client ID for your TIN. This commonly happens when a team tests using production credentials against the sandbox environment, or vice versa — or when credentials are copy-pasted incorrectly during setup.
Resolution: Verify that your environment configuration clearly separates sandbox and production credentials. Each environment has a distinct client ID; they must never be swapped. Check your configuration management system and ensure credentials are injected from environment variables, not hardcoded in source files.
AUTH_003: TIN Not Registered
The Taxpayer Identification Number presented in the request has not been activated in the IRBM MyInvois system. New businesses, recently registered entities, or TINs that were registered offline may not yet be provisioned for API access.
Resolution: Log in to the MyInvois portal and verify that the TIN is active and linked to your business entity. If the TIN is valid in the broader IRBM system but not yet active in MyInvois, contact IRBM support to request activation. This process can take up to five business days.
Mandatory Field Validation Errors
Field validation errors are the most common category of MyInvois rejections. They occur when required data is absent, incorrectly formatted, or logically inconsistent.
FIELD_001: Missing Supplier TIN
The supplier’s Taxpayer Identification Number is missing from the invoice. In most ERP systems, the supplier TIN is a one-time configuration — it should be set once and inherited by every outgoing invoice. If this error appears in production, it usually means TIN was not mapped during ERP integration setup, or a configuration migration wiped the value.
Resolution: Locate the supplier profile in your ERP and ensure the TIN field is populated with your registered IRBM TIN. Update the field mapping in your MyInvois integration to pull from this profile. Resubmit the affected invoices.
FIELD_002: Missing Buyer TIN for B2B
The buyer’s TIN is absent from a business-to-business invoice. This is the single most common data quality challenge in Malaysian e-invoicing rollouts. Unlike the supplier TIN — which is constant — buyer TINs must be collected from each B2B customer and stored accurately.
Resolution: Contact your customers and request their TINs. Many businesses have incorporated a TIN request into their customer onboarding forms since the mandate began. Create a customer TIN register in your CRM or ERP immediately if one does not exist. For historical customers, a bulk outreach with a simple reply form is the fastest path to data collection. Once collected, map the buyer TIN to the customer record so it populates automatically on every invoice.
FIELD_003: Invalid Date Format
IRBM expects all dates in ISO 8601 UTC format: YYYY-MM-DDTHH:MM:SSZ. Legacy ERP systems frequently output dates in formats like DD/MM/YYYY, MM-DD-YYYY, or localised strings. These will be rejected.
Resolution: Add a date normalization layer in your integration middleware that converts all date fields to ISO 8601 UTC before submission. Test with dates at timezone boundaries — a Malaysian business date of 31 January at 11:59 PM MYT becomes 31 January 15:59 UTC, but midnight MYT becomes the following day in UTC.
FIELD_004: Invoice Number Not Unique
IRBM enforces uniqueness of invoice numbers per supplier TIN. If your system submits the same invoice number twice — whether by accident, network retry, or a bug — the second submission is rejected.
Resolution: Implement idempotency in your submission layer. Before retrying a failed submission, check whether the invoice was already successfully issued (a 200 response may have been received but lost due to a network timeout). Maintain a local submission log keyed by invoice number and check it before each submission. For genuine re-issuances, always generate a new invoice number.
FIELD_005: Tax Calculation Mismatch
IRBM’s validation engine independently recalculates the tax amounts from your line items and compares the result to the totals you submitted. A mismatch — even by one sen — causes a rejection. This frequently happens due to rounding rule differences: your system may round line-item taxes to two decimal places before summing, while IRBM sums first and rounds last (or vice versa).
Resolution: Review IRBM’s published rounding rules and replicate them exactly in your tax calculation logic. The safest approach is to calculate tax totals using the same sequence IRBM uses: sum all taxable amounts first, then apply the tax rate, then round the final result. Avoid rounding at intermediate steps.
FIELD_006: Invalid Currency Code
The currency code in your invoice must be a valid ISO 4217 alphabetic code — for example, MYR, USD, or EUR. Some legacy billing systems store currencies as numeric codes (458 for MYR) or non-standard abbreviations. IRBM rejects these.
Resolution: Map your internal currency identifiers to their ISO 4217 alphabetic equivalents in your integration layer. This is typically a simple lookup table. Ensure the mapping covers all currencies your business transacts in, not just MYR.
Document Structure Errors
Structure errors indicate that the invoice document itself — the XML or JSON payload — does not conform to IRBM’s expected format.
XML_001: Schema Validation Failure
Your XML submission does not conform to IRBM’s published UBL (Universal Business Language) schema. This can happen due to missing required elements, incorrect element ordering, unexpected namespaces, or custom fields added outside the schema.
Resolution: Download IRBM’s published XSD (XML Schema Definition) files from the MyInvois developer portal and validate your XML against them locally before every submission. Build schema validation into your CI/CD pipeline so structural regressions are caught before deployment. Most XML libraries support XSD validation natively.
XML_002: Encoding Error
IRBM requires UTF-8 encoding throughout the submission. Characters outside the standard ASCII range — accented characters, Malay-specific symbols, or non-Latin script in company names or addresses — can cause encoding failures if your system outputs Latin-1 or Windows-1252 instead.
Resolution: Explicitly set UTF-8 encoding at every stage of your document generation pipeline: database queries, string concatenation, file writes, and HTTP request headers (Content-Type: application/xml; charset=utf-8). Test with real customer names and addresses that contain non-ASCII characters.
JSON_001: Malformed JSON
For integrations using the JSON submission path, a syntax error in the JSON payload — unclosed brackets, trailing commas, unescaped special characters — causes an immediate rejection.
Resolution: Always serialize JSON using a library rather than string concatenation. Validate the output with a JSON linter before submission. Log the raw payload on submission so that malformed requests can be inspected after the fact.
Business Rule Errors
Business rule errors occur when the invoice data is structurally valid but violates IRBM’s transactional rules.
BIZ_001: Invoice Date Cannot Be Future-Dated
IRBM will not accept invoices with an issue date more than a defined number of days in the future. This protects against pre-dating manipulations. The exact threshold is published in IRBM’s technical documentation and may be updated.
Resolution: Always set the invoice date to the current date at submission time unless your business legitimately needs advance dating (in which case, check the current threshold). Review your invoicing workflow — if invoices are created in batches and submitted later, ensure the submission date aligns with IRBM’s rules.
BIZ_002: Invoice Date Too Far in the Past
Invoices older than 72 hours from the time of submission may be rejected. This rule incentivises real-time or near-real-time e-invoice submission rather than batch submission at month end.
Resolution: Redesign your invoicing workflow to submit e-invoices within hours of issuance rather than weekly or monthly batches. For businesses with high volumes, integrate submission directly into the invoice generation step so that validation happens automatically before the invoice reaches the customer.
BIZ_003: Cancellation Window Expired
Credit notes and cancellation requests must be submitted within IRBM’s allowed cancellation window after the original invoice was issued. Attempting to cancel an invoice outside this window returns this error.
Resolution: Establish an internal SLA for credit note issuance that comfortably fits within IRBM’s window. For disputes or billing errors discovered late, contact IRBM support — in exceptional circumstances, manual correction may be possible through IRBM’s administrative process.
BIZ_004: Reference Invoice Not Found
Credit notes and debit notes must reference a valid, previously issued invoice. If the reference invoice UUID is incorrect, was never successfully issued, or belongs to a different taxpayer, IRBM rejects the adjustment document.
Resolution: Store the IRBM-issued UUID for every successfully validated invoice in your system. When generating credit or debit notes, always reference the UUID returned by IRBM — not your internal invoice number. If you cannot locate the UUID, check your submission log or query the MyInvois API’s invoice lookup endpoint.
Rate Limiting and System Errors
429 Too Many Requests
IRBM implements rate limits on API submissions. Exceeding these limits results in temporary blocks. The rate limits are published in IRBM’s developer documentation and cover both per-minute and per-day thresholds.
Resolution: Implement exponential backoff with jitter in your retry logic — after a 429, wait an increasing amount of time before retrying (e.g., 1 second, then 2, then 4, with random jitter added to prevent thundering herd). For high-volume submissions, use IRBM’s batch submission endpoint where available, which allows multiple invoices per API call and is more efficient than individual submissions.
500 Internal Server Error
A 500 response indicates a problem on IRBM’s servers, not in your submission. Your invoice may or may not have been processed — the outcome is indeterminate.
Resolution: Do not immediately retry on a 500. Implement a circuit breaker pattern: after a configurable number of 500 responses, pause all submissions for a defined cool-down period, then resume with a probe request. Before retrying any specific invoice, query IRBM’s invoice status endpoint to check whether it was in fact issued despite the 500 response — retrying an already-issued invoice will result in a duplicate invoice number error.
Building a Robust Error Handling Strategy
Logging an error code is not error handling. Every failed MyInvois submission should trigger a structured response:
- Alert the finance team immediately — use email, Slack, or your ERP’s notification system. Include the invoice number, error code, and a plain-English description of the issue.
- Log the full error context — invoice ID, error code, error message, field details, timestamp, and the original submission payload — to a structured error store (database table or log aggregation system).
- Queue for action — place the failed invoice in a review queue. Tag it with the error category (authentication, field validation, structure, business rule, system) so that triage is faster.
- Resolve and resubmit within your SLA — invoices that fail to validate are not legally issued. Establish an internal SLA for resolution, e.g., within 24 hours for field errors, within 4 hours for authentication errors (which block all submissions).
A simplified pseudocode flow:
submit_invoice(invoice):
response = api.post("/invoices", invoice)
if response.status == 200:
store_uuid(invoice.id, response.uuid)
return success
if response.status == 400:
log_error(invoice.id, response.error)
notify_finance_team(invoice.id, response.error)
enqueue_for_review(invoice.id, response.error.code)
return failure
if response.status == 429:
backoff_and_retry(invoice)
if response.status == 500:
circuit_breaker.record_failure()
log_uncertain_outcome(invoice.id)
schedule_status_check(invoice.id)
The goal is zero silent failures. Every rejected invoice must surface to a human who can act on it.
When to Contact IRBM vs Your Integration Partner
Not all errors require the same escalation path. Knowing who to call saves time.
Contact IRBM support when:
- A TIN is not activating despite correct registration (AUTH_003)
- You need to resolve a production account issue or access the admin environment
- You believe IRBM’s system has a bug that affects your valid submissions
- You need to perform a late cancellation outside the standard window
Contact your integration partner (such as Nematix) when:
- Your XML or JSON does not match IRBM’s schema (XML_001, JSON_001)
- Field mappings in your ERP are not populating correctly (FIELD_001, FIELD_002)
- Tax calculation logic needs to be updated to match IRBM’s rounding rules (FIELD_005)
- You need middleware-level changes to handle new IRBM API versions
- You want to build automated retry and alerting logic into your integration
Nematix maintains production MyInvois integrations for enterprise clients and handles the full lifecycle of API schema changes, error triage, and middleware updates — so your finance team can focus on resolution, not debugging.
Related Reading
- Malaysia E-Invoicing Mandate: A Business Guide — The complete compliance overview: who is affected, deadlines, and mandatory fields.
- MyInvois vs API Integration: Choosing Your E-Invoice Model — When to use the MyInvois portal and when to build API integration.
- How Nematix Handles E-Invoicing: From MyInvois to PEPPOL — How Nematix builds and maintains production MyInvois integrations for enterprise clients.
Ready to simplify your e-invoicing transition? Talk to our team about seamless MyInvois and PEPPOL integration for your business.