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

EnvironmentURL
Developmenthttps://dev-etax.siamprop.app
Productionhttps://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
StatusMeaning
RECEIVEDDocument accepted by gateway
VALIDATEDMetadata validated successfully
REJECTEDValidation failed
PDF_GENERATEDPDF created and stored
SUBMITTINGBeing sent to INET
SUBMITTEDSent to INET, awaiting acknowledgement
ACKNOWLEDGEDINET confirmed receipt
FAILEDSubmission 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