Appearance
Prerequisites
Before you start integrating with the InvoisX API, make sure you have the following set up.
1. InvoisX Account
You need an InvoisX account with a registered company. If you don't have one:
- Visit invoisx.com and sign up
- Complete your company profile with business details
- Configure your company's LHDN credentials
2. LHDN Credentials
Your company must be registered with LHDN's MyInvois system. You'll need:
| Credential | Description |
|---|---|
| TIN (Tax Identification Number) | Your company's tax ID from LHDN |
| Client ID | OAuth client ID from LHDN portal |
| Client Secret | OAuth client secret from LHDN portal |
Testing Environment
For testing, you can use LHDN's preprod (sandbox) credentials. These are separate from your production credentials and allow you to test without affecting real invoices.
Setting Up LHDN Credentials
- Log in to your InvoisX dashboard
- Navigate to Company Settings > LHDN Integration
- Enter your LHDN credentials
- Choose environment: Preprod (testing) or Production
- Click Save & Verify
3. Active Subscription
An active InvoisX subscription is required to submit documents to LHDN. Check your subscription status in Settings > Billing.
4. Development Environment
You'll need a way to make HTTP requests. Here are some options:
bash
# Test your connection
curl -X GET https://invoisx.com/api/v1/states \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"javascript
// Using fetch (Node.js 18+)
const response = await fetch('https://invoisx.com/api/v1/states', {
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Accept': 'application/json'
}
});python
import requests
response = requests.get(
'https://invoisx.com/api/v1/states',
headers={
'Authorization': 'Bearer YOUR_API_TOKEN',
'Accept': 'application/json'
}
)php
$response = Http::withToken('YOUR_API_TOKEN')
->accept('application/json')
->get('https://invoisx.com/api/v1/states');Checklist
Before proceeding, ensure you have:
- [ ] InvoisX account created
- [ ] Company profile completed
- [ ] LHDN credentials configured (preprod for testing)
- [ ] Active subscription
- [ ] API token ready (create one here)
Next Steps
Once you have everything ready, proceed to Authentication to create your API token.
