eTax Gateway API
eTax Gateway is a REST API for receiving Thai tax documents, generating certified PDFs, and submitting them to the INET e-Tax service. It also handles receipts, payments, and webhook notifications.
Base URL
| Environment | URL |
|---|---|
| Development | https://dev-etax.siamprop.app |
| Production | https://etax.siamprop.app |
Authentication
All API requests require an X-API-Key header. Contact your administrator to obtain an API key (sk_etax_...).
X-API-Key: sk_etax_your_key_here
See Authentication for details.
Idempotency
All POST endpoints require an X-Idempotency-Key header. This key ensures that duplicate requests return the same response without creating duplicate records.
- Format:
[a-zA-Z0-9._:-]{8,128} - Generate a unique key per request (e.g. UUID or timestamp-based)
- Reuse the same key to safely retry a failed request
X-Idempotency-Key: idem-2026-03-09-order-12345
Document Lifecycle
Tax documents move through the following statuses:
RECEIVED → VALIDATED → PDF_GENERATED → SUBMITTING → SUBMITTED → ACKNOWLEDGED
↓ ↓
REJECTED FAILED
| Status | Meaning |
|---|---|
RECEIVED | Document accepted by gateway |
VALIDATED | Metadata validated successfully |
REJECTED | Validation failed |
PDF_GENERATED | PDF created and stored |
SUBMITTING | Being sent to INET |
SUBMITTED | Sent to INET, awaiting acknowledgement |
ACKNOWLEDGED | INET confirmed receipt |
FAILED | Submission to INET failed |
API Sections
- Documents — Tax invoice receipts, credit notes, debit notes
- Receipts — POS receipts with optional full tax invoice conversion
- Payments — Payment tracking and provider integration
- Webhooks — Inbound payment provider webhooks (KBank)
- Error Reference — All error codes explained