Full submission pipeline
Build UBL-in-JSON documents, sign them with XAdES, submit, poll to a terminal status, cancel or reject — one typed client for the whole flow.
Document building, XAdES (JSON) signing, submission, polling, taxpayer validation and built-in rate limiting for the LHDN MyInvois API.
npm install @ripwords/myinvois-client
# or: bun add / pnpm add / yarn add @ripwords/myinvois-clientimport { MyInvoisClient } from '@ripwords/myinvois-client'
const client = MyInvoisClient.fromP12(
clientId,
clientSecret,
'sandbox', // or 'production'
'path/to/certificate.p12',
passphrase,
)
const { data, status } = await client.submitDocument([invoice])
if (status === 202) {
const result = await client.getSubmissionStatus(data.submissionUid)
console.log(result.status) // 'Valid' | 'PartiallyValid' | 'Invalid' | ...
}Scope: Malaysia MyInvois only. Singapore's InvoiceNow / Peppol e-invoicing is a different system and out of scope.
Agents: a machine-readable summary of this site lives at llms.txt.