API Integration Developer Guide
The AECloud Integration API connects a merchant's POS, retail, ERP, accounting, or other downstream system to AECloud. AECloud acts as the intermediary and orchestration layer between that system and LHDN Malaysia's MyInvois services. It accepts business-oriented JSON, validates and stores the document, converts supported data into the required regulatory representation, schedules or starts submission, and provides endpoints for status checking, voiding, cancellation, TIN services, and reference codes.
The API covers eight document families:
- sale invoice;
- sale credit note;
- sale debit note;
- sale refund note;
- self-billed invoice;
- self-billed credit note;
- self-billed debit note; and
- self-billed refund note.
This guide documents the current API contract exported on 26 August 2026 and cross-checked against the live AECloud API catalogue. Environment hostnames and credentials are intentionally represented by placeholders. Obtain the correct sandbox and production values from AECloud.
In this guide
- Overview
- Access and environments
- Authentication
- Quick start
- Endpoint reference
- Payload reference
- Sale documents
- Self-billed documents
- Status and reconciliation
- Voiding and cancellation
- TIN and reference codes
- Responses and errors
- Retries and idempotency
- Testing and go-live
- Security
- Troubleshooting
- Glossary
Integration flow
- Complete the merchant, LHDN, outlet, and subscription setup in AECloud.
- Obtain the merchant's OAuth2 client ID and client secret.
- Request an access token using the client-credentials grant.
- Build an AECloud JSON document using valid merchant, buyer or supplier, tax, and item data.
- POST the document to the matching submission endpoint.
- Store the returned AECloud sale GUID and any LHDN identifiers.
- Query status by sale GUID or by submission date range until a terminal result is recorded.
- Use a void endpoint before LHDN processing, or the cancellation endpoint for an eligible validated document.
The merchant credential in step 2 authenticates the downstream system to AECloud. AECloud separately authenticates to MyInvois as an intermediary acting on behalf of the authorized taxpayer.
For environment access or unresolved integration issues, email support@einvoicecloud.com.