Confirm Phase 4 applicability: taxpayers with annual turnover between RM 1 million and RM 5 million are in Phase 4, which became live on 1 January 2026 with full enforcement from 1 January 2027; businesses below RM 1 million are permanently exempt following the December 2025 Cabinet decision that cancelled Phase 5.
Register on the MyInvois portal with your company TIN and BRN, then apply for API access to receive a client ID and client secret from LHDN.
Authenticate via OAuth 2.0 client credentials flow against the MyInvois token endpoint to obtain an access token; tokens are short-lived and must be refreshed for long-running batch jobs.
Build each invoice as a JSON or XML document conforming to the MyInvois schema (55 mandatory fields including TIN, BRN, item-level tax amounts, and QR code data) and POST to the document submission endpoint at sdk.myinvois.hasil.gov.my.
Poll the document status endpoint with the returned submission UID until the status is Valid; a Valid response includes the LHDN-stamped document with a QR code that must be included on the invoice shared with the buyer.
Implement cancellation and rejection flows: a supplier may cancel within 72 hours of submission; a buyer may reject within 72 hours of receipt — both actions use dedicated API endpoints.
Known gotchas
Phase 5 (covering businesses below RM 1 million) was cancelled in December 2025; do not build mandatory flows for sub-RM 1 million entities unless they are voluntarily opting in.
The 72-hour cancellation and rejection windows are hard deadlines — after expiry the document is locked and cannot be reversed through the API; build monitoring to catch disputes within the window.
Sandbox credentials are separate from production credentials; testing with a production client ID in the sandbox environment or vice versa will cause authentication failures.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp