Receipts

Receipts are POS-style documents. A SHORT receipt can be issued immediately at point-of-sale. If the buyer provides tax identification, it can later be converted to a FULL receipt (which generates a full tax invoice).

Receipt Types and Statuses

TypeStatusesDescription
SHORTSHORT_ACTIVE, SHORT_CANCELLEDIssued at POS without buyer tax ID
FULLFULL_PENDING → FULL_SUBMITTING → FULL_ACKNOWLEDGED / FULL_FAILEDFull tax receipt with buyer info

POST /api/v1/receipts

Create a new receipt (SHORT or FULL).

POST /api/v1/receipts

Headers

HeaderRequiredDescription
X-API-Key✓Your API key
X-Idempotency-Key✓Unique key per request
Content-Type✓application/json

Request Body

FieldTypeRequiredNotes
sourceIdstring✓Your source code
receiptTypeenum✓SHORT or FULL
receiptDatestring✓YYYY-MM-DD
receiptNostring—Auto-generated if omitted
sellerobject✓See Seller fields
buyerobjectFULL onlyRequired when receiptType=FULL
amountExVatnumber✓Amount excluding VAT
vatAmountnumber✓VAT amount
totalAmountnumber✓Must equal amountExVat + vatAmount + shippingCost - discountAmount
discountAmountnumber—Default: 0
shippingCostnumber—Default: 0
itemsarray—Line items (name, quantity, unitPrice, lineTotal)
paymentReceivednumber—Amount tendered
changeAmountnumber—Must equal paymentReceived - totalAmount
metadataobject—Free-form key-value

Seller fields: taxId (13-digit), name, branchCode (5-digit), address, phone?, email?

Buyer fields (FULL): taxId (13-digit), name, branchCode (5-digit), address

Example — SHORT Receipt

curl -X POST https://dev-etax.siamprop.app/api/v1/receipts \
  -H "X-API-Key: sk_etax_your_key" \
  -H "X-Idempotency-Key: idem-rcpt-2026-001" \
  -H "Content-Type: application/json" \
  -d '{
    "sourceId": "TESTSRC",
    "receiptType": "SHORT",
    "receiptDate": "2026-03-09",
    "seller": {
      "taxId": "0101234567890",
      "name": "ACME Co., Ltd.",
      "branchCode": "00000",
      "address": "99 Sukhumvit Rd, Bangkok 10110"
    },
    "amountExVat": 1000,
    "vatAmount": 70,
    "totalAmount": 1070,
    "items": [
      { "name": "Product A", "quantity": 1, "unitPrice": 1000, "lineTotal": 1000 }
    ]
  }'

Response — 201 Created

{
  "id": "01KK9PJC7M9QZJF4X5R2Y59MSM",
  "receiptType": "SHORT",
  "receiptNo": "RCPT-20260309-0001",
  "status": "SHORT_ACTIVE"
}

GET /api/v1/receipts/:id

GET /api/v1/receipts/{receiptId}?sourceId=TESTSRC

Query Parameters

ParameterRequiredDescription
sourceId✓Your source code

Example

curl "https://dev-etax.siamprop.app/api/v1/receipts/01KK9PJC7M9QZJF4X5R2Y59MSM?sourceId=TESTSRC" \
  -H "X-API-Key: sk_etax_your_key"

GET /api/v1/receipts

List receipts.

GET /api/v1/receipts?sourceId=TESTSRC&page=1&limit=20
ParameterRequiredDefaultDescription
sourceId✓—Your source code
receiptType—allSHORT or FULL
status—allFilter by status
receiptNo——Filter by receipt number
fromDate——YYYY-MM-DD
toDate——YYYY-MM-DD
page—1—
limit—20Max 100

POST /api/v1/receipts/:id/convert-to-full

Convert a SHORT receipt to a FULL receipt by providing buyer tax information.

POST /api/v1/receipts/{receiptId}/convert-to-full

Request Body

FieldTypeRequiredNotes
sourceIdstring✓Your source code
buyerobject—Buyer tax info (taxId, name, branchCode, address). buyer.taxId is required to generate a full tax invoice.
fullReceiptDatestring—Override receipt date (YYYY-MM-DD)

Example

curl -X POST "https://dev-etax.siamprop.app/api/v1/receipts/01KK9PJC7M9QZJF4X5R2Y59MSM/convert-to-full" \
  -H "X-API-Key: sk_etax_your_key" \
  -H "X-Idempotency-Key: idem-conv-2026-001" \
  -H "Content-Type: application/json" \
  -d '{
    "sourceId": "TESTSRC",
    "fullReceiptDate": "2026-03-09",
    "buyer": {
      "taxId": "0109876543210",
      "name": "Beta Corp Co., Ltd.",
      "branchCode": "00001",
      "address": "55 Silom Rd, Bangkok 10500"
    }
  }'

Error Cases

errorCodeHTTPCause
RECEIPT_NOT_SHORT422Receipt is not in SHORT_ACTIVE status
RECEIPT_ALREADY_CONVERTED422Already converted to full
RECEIPT_BUYER_TAX_INFO_REQUIRED422Buyer tax ID required
DUPLICATE_RECEIPT409Idempotency key conflict