> For the complete documentation index, see [llms.txt](https://amast-einvoice.gitbook.io/amast-einvoice-sass/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://amast-einvoice.gitbook.io/amast-einvoice-sass/introduction.md).

# Introduction

Integrate your ERP, POS, or billing system with Malaysia **LHDN MyInvois** e-Invoice through our AMAST eInvoice. We act as your **intermediary**: you send using our structured yet simplified JSON as we handle the heavy lifting; UBL generation, digital signing, LHDN submission and more. You just have to provide an accurate einvoice details.

## What you can do

| Capability                    | Description                                      |
| ----------------------------- | ------------------------------------------------ |
| Submit invoices, credit notes | Batch up to 100 documents per request            |
| Poll submission status        | Per-batch and per-document pipeline + LHDN state |
| Validate buyer TIN            | Proxy to LHDN Validate Taxpayer TIN              |
| Cancel valid documents        | Cancellation for LHDN-valid documents            |

## Base URL

All paths are under:

```
https://teinvoice.amastsales-sandbox.com/api
```

Example Submit Document API URL:

```
POST https://teinvoice.amastsales-sandbox.com/api/v1/einvoice/submit
```

## Prerequisites

1. **Account** — Sign up and complete organisation onboarding (supplier TIN, BRN/NRIC, address).
2. **API key** — Create in the dashboard (**API Keys**). Never expose keys in browsers or mobile apps.
3. **Credits** — Prepaid document credits (1 credit per document in batch submission; 1 credit per document cancellation). Top up in **Billing** when you receive `402`.

{% hint style="warning" %}
API keys come in two environments: **production** and **sandbox**. Production keys submit e-Invoices to LHDN MyTax production, while sandbox keys go to the LHDN sandbox. Use the correct key for the intended environment.
{% endhint %}

## Supported document types

| `invoice`     | 01 | Standard sales invoice                                              |
| ------------- | -- | ------------------------------------------------------------------- |
| `credit_note` | 02 | Standard sales credit note, require Valid Invoice submitted to LHDN |

## API surface (overview)

<table><thead><tr><th width="116.7777099609375">Method</th><th width="358.3333740234375">Path</th><th>Purpose</th></tr></thead><tbody><tr><td><code>POST</code></td><td><code>/v1/einvoice/submit</code></td><td>Queue one batch of documents</td></tr><tr><td><code>GET</code></td><td><code>/v1/saas/submissions/{submissionBatchId}/status</code></td><td>Poll batch status</td></tr><tr><td><code>GET</code></td><td><code>/v1/einvoice/validate-taxpayer-tin/{tin}</code></td><td>Validate buyer TIN + BRN/IC</td></tr><tr><td><code>POST</code></td><td><code>/v1/einvoice/cancel</code></td><td>Cancel a Valid document</td></tr></tbody></table>

## External references

* [LHDN MyInvois SDK — Validate Taxpayer TIN](https://sdk.myinvois.hasil.gov.my/einvoicingapi/01-validate-taxpayer-tin/)

## Next steps

→ [Quick start](/amast-einvoice-sass/quick-start.md)\
→ [Integration workflow](/amast-einvoice-sass/integration-workflow.md)\
→ [Submit documents API](/amast-einvoice-sass/api/list-of-api/submit-document-api.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://amast-einvoice.gitbook.io/amast-einvoice-sass/introduction.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
