Downstream System Integration
Merchants with a POS, retail, ERP, or accounting system can integrate that system with AECloud. The downstream system uploads transaction data as JSON; AECloud validates the data, stores the transaction, converts it into the required e-Invoice document, and sends it into the LHDN submission workflow according to the merchant's submission preference.
This chapter provides an operational overview for merchant users. Payload schemas, authentication, response bodies, and implementation examples belong in the AECloud Developer Guide and API documentation.
Supported document APIs
The integration provides submission endpoints for:
sale/invoice_submissionsale/credit_note_submissionsale/debit_note_submissionsale/refund_note_submissionself_billed/invoice_submissionself_billed/credit_note_submissionself_billed/debit_note_submissionself_billed/refund_note_submission
For each document family, related services are available to check status by document identifier or submission, request cancellation, and void a document by its AECloud sale code or document identifier.
Reference services are also available for classification codes, currencies, payment methods, tax types, units of measurement, and taxpayer TIN search or validation.
Typical integration flow
- Obtain the merchant's authorized OAuth2 API credential.
- Retrieve or map the required LHDN reference codes.
- Build the JSON payload for the correct document type.
- Include the merchant, outlet, document, customer or supplier, item, tax, charge, total, and submission-preference information required by that endpoint.
- Upload the payload to the matching submission endpoint.
- Record the returned AECloud identifiers and response.
- Check status using the appropriate status endpoint.
- Review the document in the corresponding LHDN Submission list in the Merchant Console.
- Correct rejected data at its source before resubmitting.
Where integrated documents appear
An accepted integration request is reviewed in the LHDN Submission list matching its endpoint family:
- Sales invoice requests appear under Sale Invoice.
- Sales credit, debit, and refund requests appear under their matching standard document lists.
- Self-billed requests appear under the matching Self-Billed document lists.
The Self-Service lists are not an integration inbox. They are the merchant's manual preparation workspace.
When an upload cannot be located, check the merchant credential, outlet identity, endpoint family, returned document identifiers, and request time before raising a support case.
Immediate and scheduled submission
The API payload can request immediate processing, while merchant configuration can also support scheduled submission. Integration owners must align the payload and merchant submission settings with the intended business workflow.
Important data groups
A transaction payload can include:
- AECloud merchant and outlet context
- Document number, date, time, currency, and submission preference
- Customer information for sales documents
- Supplier information for self-billed documents
- Original-document references for credit, debit, and refund notes
- Product or service lines
- Classification, quantity, unit price, discount, tax, and additional-charge information
- Document totals and rounding
Use the current API specification for exact field names and requirements. Do not construct production payloads from examples in an end-user guide.
MyInvois processing considerations
The official MyInvois submission service accepts JSON or XML documents, performs initial synchronous validation, and returns submission and document identifiers for accepted records. Full validation continues after that response, so integrations must check the later result.
MyInvois currently documents a maximum of 100 documents per submission, 5 MB per submission, and 300 KB per document, and recommends a rate of 100 requests per minute per client ID. Integration developers must verify the latest limits in the official MyInvois Submit Documents documentation before implementation.
Security
- Keep client IDs and client secrets outside source code and user documentation.
- Use approved secret storage.
- Do not log complete credentials or unnecessary personal information.
- Restrict production credentials to authorized systems and personnel.
- Treat JSON payloads and status responses as confidential transaction records.