Skip to content

Skip the UBL Complexity

Submit e-Invoices to LHDN with a Simple REST API. No digital certificates. No UBL formatting. No 50+ field headaches. Just JSON in, valid e-invoice out.

Why Developers Choose InvoisX

Tired of wrestling with LHDN's MyInvois system?

Direct MyInvois Integration

  • Complex UBL 2.1 XML/JSON formatting
  • Managing digital certificates from MCMC CAs
  • Token expires every hour
  • 50+ data fields per invoice
  • Date/time must be UTC, specific format
  • TIN validation with prefix rules
  • Keeping up with LHDN spec changes

With InvoisX

  • Simple JSON REST API
  • No certificates required
  • We handle token management
  • Auto-fill from your line items
  • We convert all date formats
  • Built-in TIN validation
  • We track changes, your code stays the same
  • Full control when you need it

See How Simple It Is

Submit an e-invoice to LHDN in just a few lines of code:

javascript
// Using native fetch
const API = 'https://invoisx.com/api/v1';
const headers = {
  'Authorization': 'Bearer your-api-token',
  'Content-Type': 'application/json'
};

// Create invoice
const res = await fetch(`${API}/invoices`, {
  method: 'POST',
  headers,
  body: JSON.stringify({
    buyerId: 'buyer-uuid',
    autoCalculate: true,
    invoiceLines: [{
      productDescription: 'Consulting Services',
      quantity: 10, unitPrice: 500.00,
      invoiceLineTaxes: [{ taxType: '01', taxRate: 8 }]
    }]
  })
});
const invoice = await res.json();

// Validate and submit
await fetch(`${API}/documents/${invoice.data.id}/validate`, { method: 'POST', headers });
await fetch(`${API}/documents/${invoice.data.id}/submit`, { method: 'POST', headers });
python
import requests

API = 'https://invoisx.com/api/v1'
headers = {'Authorization': 'Bearer your-api-token'}

# Create invoice
invoice = requests.post(f'{API}/invoices', headers=headers, json={
    'buyerId': 'buyer-uuid',
    'autoCalculate': True,
    'invoiceLines': [{
        'productDescription': 'Consulting Services',
        'quantity': 10, 'unitPrice': 500.00,
        'invoiceLineTaxes': [{'taxType': '01', 'taxRate': 8}]
    }]
}).json()

# Validate and submit
requests.post(f"{API}/documents/{invoice['data']['id']}/validate", headers=headers)
requests.post(f"{API}/documents/{invoice['data']['id']}/submit", headers=headers)
php
use Illuminate\Support\Facades\Http;

$api = Http::withToken('your-api-token')
    ->baseUrl('https://invoisx.com/api/v1');

// Create invoice
$invoice = $api->post('/invoices', [
    'buyerId' => 'buyer-uuid',
    'autoCalculate' => true,
    'invoiceLines' => [[
        'productDescription' => 'Consulting Services',
        'quantity' => 10, 'unitPrice' => 500.00,
        'invoiceLineTaxes' => [['taxType' => '01', 'taxRate' => 8]]
    ]]
])->json('data');

// Validate and submit
$api->post("/documents/{$invoice['id']}/validate");
$api->post("/documents/{$invoice['id']}/submit");
php
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://invoisx.com/api/v1/',
    'headers' => ['Authorization' => 'Bearer your-api-token']
]);

// Create invoice
$res = $client->post('invoices', ['json' => [
    'buyerId' => 'buyer-uuid',
    'autoCalculate' => true,
    'invoiceLines' => [[
        'productDescription' => 'Consulting Services',
        'quantity' => 10, 'unitPrice' => 500.00,
        'invoiceLineTaxes' => [['taxType' => '01', 'taxRate' => 8]]
    ]]
]]);
$invoice = json_decode($res->getBody(), true)['data'];

// Validate and submit
$client->post("documents/{$invoice['id']}/validate");
$client->post("documents/{$invoice['id']}/submit");
java
import java.net.http.*;
import java.net.URI;

var client = HttpClient.newHttpClient();
var API = "https://invoisx.com/api/v1";

// Create invoice
var createReq = HttpRequest.newBuilder()
    .uri(URI.create(API + "/invoices"))
    .header("Authorization", "Bearer your-api-token")
    .header("Content-Type", "application/json")
    .POST(HttpRequest.BodyPublishers.ofString("""
        {"buyerId": "buyer-uuid", "autoCalculate": true,
         "invoiceLines": [{"productDescription": "Consulting Services",
           "quantity": 10, "unitPrice": 500.00,
           "invoiceLineTaxes": [{"taxType": "01", "taxRate": 8}]}]}"""))
    .build();
var res = client.send(createReq, HttpResponse.BodyHandlers.ofString());
var invoiceId = /* parse JSON response */;

// Validate and submit
client.send(HttpRequest.newBuilder()
    .uri(URI.create(API + "/documents/" + invoiceId + "/validate"))
    .header("Authorization", "Bearer your-api-token")
    .POST(HttpRequest.BodyPublishers.noBody()).build(),
    HttpResponse.BodyHandlers.ofString());
csharp
using System.Net.Http;
using System.Text.Json;

var client = new HttpClient {
    BaseAddress = new Uri("https://invoisx.com/api/v1")
};
client.DefaultRequestHeaders.Add("Authorization", "Bearer your-api-token");

// Create invoice
var invoice = new {
    buyerId = "buyer-uuid", autoCalculate = true,
    invoiceLines = new[] { new {
        productDescription = "Consulting Services",
        quantity = 10, unitPrice = 500.00,
        invoiceLineTaxes = new[] { new { taxType = "01", taxRate = 8 } }
    }}
};
var res = await client.PostAsJsonAsync("/invoices", invoice);
var data = await res.Content.ReadFromJsonAsync<JsonElement>();
var invoiceId = data.GetProperty("data").GetProperty("id").GetString();

// Validate and submit
await client.PostAsync($"/documents/{invoiceId}/validate", null);
await client.PostAsync($"/documents/{invoiceId}/submit", null);

How It Works

1

Create API Token

Generate a company-specific API token from your InvoisX dashboard in seconds.

2

Create Buyer

Add your customer with their TIN, address, and contact details.

3

Create Invoice

Build your invoice with line items. We auto-calculate all totals and taxes.

4

Validate

Check your invoice against LHDN requirements before submission.

5

Submit to LHDN

Send your validated invoice to LHDN's MyInvois system.

6

Get QR Code

Retrieve the LHDN verification QR code for your customers.

Frequently Asked Questions

Do I need a digital certificate?

No. InvoisX handles digital signing with our certificate. You don't need to obtain or manage certificates from MCMC-listed Certificate Authorities.

Do I need to learn UBL 2.1?

No. Send simple JSON via our REST API, and we convert it to LHDN-compliant UBL format automatically. No XML knowledge required.

What about the 50+ required fields?

We auto-fill most fields with smart defaults. You only need to provide your line items with quantities and prices - we handle the rest.

How do you handle token expiration?

We manage LHDN authentication internally. Your API token from InvoisX never expires unless you explicitly revoke it.

What happens when LHDN changes their spec?

We update our backend to comply with new LHDN requirements. Your integration code stays the same - no changes needed on your end.

Which programming languages are supported?

Any language that can make HTTP requests. We provide examples in PHP, Node.js, Python, Java, C#, and more. It's just a REST API.

What if I need full control over calculations?

Set autoCalculate to false and send every field yourself. We support all LHDN required and optional fields. Use auto-calculate for convenience, or disable it for precision - your choice.

InvoisX - Malaysia's Leading e-Invoice Platform