WhatsApp us

Blog6 min read29 Oct 2026

Malaysia e-invoicing checklist for agent-built invoices

Invoices produced by an agent or script must meet Malaysia's MyInvois e-invoicing rules for your turnover phase. Checklist for validation, SST, approval and records.

Malaysia e-invoicing checklist for agent-built invoices

By KYN AI Advisory Team — AI implementation specialists, Singapore

If an agent or script creates invoices for a Malaysian business, those invoices fall under LHDN's MyInvois e-invoicing system once your turnover phase starts. The agent must produce structured data, submit it through MyInvois or an intermediary, receive validation, and store the result. It should not issue an invoice to a customer before validation succeeds, and it should not decide tax treatment on its own. This checklist covers the data, the sequence, the approval gates and the records, so that an automated invoice is also a compliant one.

Which businesses must e-invoice, and when?

Malaysia rolled out MyInvois in phases by annual turnover. According to an LHDN presentation hosted by CTOS, the first phase for businesses above RM100 million began on 1 August 2024, and the second phase for RM25 million to RM100 million began on 1 January 2025.

Later phases for smaller businesses were adjusted. New Straits Times reported in June 2025 that the phase for revenue below RM5 million was deferred to 1 January 2026. Relaxation periods and thresholds have also changed over time. Because the dates have moved more than once, take your own phase from LHDN's current e-invoice guidance on its official site, not from this article.

For the agent, that means one configuration setting: the date from which each invoice must go through MyInvois. Store it as a value that one person can change, with a log entry, rather than hard coding it.

What does the agent need to produce?

An e-invoice is structured data, not a PDF with a number on it. LHDN's system accepts XML or JSON in its prescribed format and returns a validation result. Your agent therefore needs fields that map to the format:

  • supplier details: name, tax identification number, address, contact;
  • buyer details: name, tax identification number, address;
  • invoice number, date and time, currency and exchange rate if not ringgit;
  • line items with description, classification code, quantity, unit price, tax type, tax rate and tax amount;
  • totals before tax, tax total, and amount payable.

Check the field list and the code tables against LHDN's current specification before you build. The code tables change.

The common failure is a missing buyer tax identification number. Make it a required field for every business customer, collected before the first invoice, and block the draft when it is empty.

The 10-point checklist

  1. Confirm your phase and date. Read LHDN's current guidance. Store the date as a setting.
  2. Register for MyInvois. Obtain access for the company and, if you use a system-to-system connection, register the system and its credentials. Keep the credentials in a secrets manager.
  3. Decide direct submission or an intermediary. Direct integration with the API is cheaper per invoice and more work to maintain. A licensed intermediary adds a fee and handles format changes. Choose on volume and who maintains the code.
  4. Make master data clean. Customers need a legal name, address and tax identification number. Products need a classification code. The agent cannot invent either.
  5. Separate drafting from issuing. The agent drafts. A named person approves. The system submits, waits for validation, and only then sends the document to the customer.
  6. Handle rejection. If MyInvois rejects an invoice, the agent must stop, record the reason and queue a fix. It must not resend blindly or issue a second invoice number.
  7. Handle changes through the proper route. Corrections use credit notes, debit notes or cancellation within the rules LHDN sets. Do not let an agent edit a validated invoice.
  8. Store the validation record. Keep the unique identifier and the validation response with each invoice, and make both searchable.
  9. Log every action with the actor. Who drafted, approved, submitted and cancelled, and when.
  10. Test with real samples. Run 50 past invoices through the drafting step, covering foreign currency, discounts, mixed tax rates and credit notes. Compare the output to what a person would produce.

How should SST be handled?

Sales and Service Tax (SST) is separate from e-invoicing, but the invoice must show the tax correctly. Whether you charge sales tax or service tax, and at what rate, depends on your registration and what you sell. The Royal Malaysian Customs Department sets the rules and rates, and they have changed. Do not hard code a rate in an agent.

Handle tax in three steps:

  1. A person sets the tax rule per product or service, with the effective date.
  2. The agent applies the rule and shows its reasoning in the draft: which rule, which rate.
  3. A person reviews any line where the rule is missing or conflicts with the customer's status.

A tax rule is a decision. A lookup against the table a person approved is automation. Keep the two apart.

Where do agent-built invoices usually go wrong?

| Failure | Cause | Control | |---|---|---| | Rejected submission | Missing or malformed buyer tax number | Required field, checked before drafting | | Wrong tax line | Rate hard coded or out of date | Rule table with effective dates, owned by a person | | Duplicate invoice | Retry after a timeout | Idempotency key per invoice number | | Edited after validation | Agent or user changes the record | Lock validated invoices; corrections by credit note | | Customer receives an unvalidated invoice | Send step runs before validation | Send waits for the validation status | | Rounding differences | Line-level and total-level rounding disagree | Test against LHDN's validation, not your own arithmetic |

Idempotency matters most. If the network drops after you submit, the agent cannot know whether MyInvois received the invoice. It must check the status by the invoice number before it submits again.

How does this fit with the rest of the finance workflow?

E-invoicing is one step in a longer chain: quote, order, delivery, invoice, payment, reconciliation. If each step lives in a different tool, someone re-types the data, and that is where tax identification numbers go missing.

Build one record that carries the customer, the order and the invoice. Reconciliation then matches payments to validated invoices. See automated bank reconciliation for the matching logic, which is the same in Malaysia, and automated sales pipelines for Malaysian SMEs for the front of the chain.

Where KYN fits

KYN builds finance workflows in the client's own cloud account. For invoicing, the pattern is: the agent drafts from the order record, a named person approves, the system submits and stores the response, and nothing reaches the customer before validation. Money and filings wait for a named person, and every action is logged with the actor. See finance systems and integrations.

The first 14 days are a review of your stack and interviews with your team. A full build ships in under 90 days. We do not give tax advice; your accountant confirms the tax treatment.

Frequently asked questions

Can an AI agent submit invoices to MyInvois on its own?

Technically it can, through the API or an intermediary. We recommend it drafts and a named person approves, because an issued invoice has tax consequences and cannot be freely edited afterwards.

What happens if MyInvois rejects an invoice?

The invoice is not valid for e-invoicing purposes until it passes. The agent should record the rejection reason, stop, and queue the fix for a person. It should not create a replacement with a new number unless the rules allow it.

Do I still send customers a PDF?

Customers commonly receive a human-readable copy, and the format of the validated copy is set by LHDN. Send it only after validation, and confirm the current format requirements on LHDN's site.

Checked 30 October 2026.

Curious whether Marketing agents fits your business? Talk to KYN on WhatsApp — no forms, just a conversation.

Start Building →

Written 29 Oct 2026 · Checked 29 Oct 2026