🍗 PCK ZRA Middleware Wiki

Micros POS Integration Guide

This is the integration contract for connecting Oracle Simphony (Micros POS) terminals to the middleware. It covers the endpoint, authentication, the full payload schema, field reference, document types, responses and errors.

Endpoint

POST  https://server.zra.co.zm/pckzra/api/taxint/pos/upload
HeaderValueDescription
Content-Typeapplication/jsonRequest body format
Acceptapplication/jsonExpected response format
AuthorizationBearer <JWT_TOKEN>Oracle Restaurant IDM JWT token

Use cases covered by this one endpoint: standard invoices (sales), credit notes (refunds/voids) and debit notes (adjustments). A health check is available at GET /pckzra/api/taxint/health.

Removed endpoints POST /pos/fiscal-update and GET /api/taxint/statistics are not supported. Statistics are available via the Reports API only.

Complete payload schema

{
  "DocumentInfo": {
    "FolioType": "Invoice",
    "FiscalFolioId": "",
    "Application": "POS",
    "PropertyTaxNumber": "1234567890"
  },
  "FolioInfo": {
    "FolioHeaderInfo": {
      "FolioType": "STD",
      "AssociatedBillFiscalBillNo": "",
      "InvoiceCurrencyCode": "ZMW",
      "InvoiceCurrencyRate": 1.0,
      "CashierNumber": "CASHIER01"
    },
    "Postings": [
      {
        "TrxNo": 1,
        "TrxCode": "ITEM-001",
        "UnitPrice": 100.00,
        "Quantity": 2,
        "NetAmount": 200.00,
        "GrossAmount": 232.00,
        "Product": "Product Description"
      }
    ],
    "TrxInfo": [
      {
        "Code": "ITEM-001",
        "TrxType": "C",
        "Description": "POS Transaction",
        "FiscalTrxCodeType": "A"
      }
    ]
  },
  "SellerInfo": {
    "SellerName": "Store Name",
    "Address": {
      "Address": "123 Main Street",
      "City": "Lusaka",
      "Country": "Zambia",
      "PostalCode": 10101,
      "State": "Lusaka Province"
    },
    "SellerContactDetails": { "Number": "+260 211 123456" },
    "SellerBRN": "BRN123456"
  },
  "PaymentInfo": {
    "PaymentType": "Cash",
    "TotalWoVat": 200.00,
    "Total": 232.00
  }
}

Field reference

DocumentInfo

FieldTypeRequiredDescriptionValid values
FolioTypeStringYesType of documentInvoice, CRN, DRN
FiscalFolioIdStringYesFolio identifier; must be non-blankAny string
ApplicationStringYesApplication typeAlways POS
PropertyTaxNumberStringYesStore TPIN for ZRAValid TPIN

FolioInfo.FolioHeaderInfo

FieldTypeRequiredDescription
FolioTypeStringYesSTD, CRN or DRN
AssociatedBillFiscalBillNoStringFor CRN/DRNOriginal invoice's fiscal bill number
InvoiceCurrencyCodeStringYesISO currency code, ZMW for Kwacha
InvoiceCurrencyRateDecimalYesExchange rate, 1.0 for local currency
CashierNumberStringYesCashier/register identifier — becomes the Chrilan auditNumber

FolioInfo.Postings (line items)

FieldTypeRequiredDescription
TrxNoIntegerYesSequential line number
TrxCodeStringYesProduct code — must match a TrxInfo Code
UnitPriceDecimalYesPrice per unit
QuantityDecimalYesQuantity sold
NetAmountDecimalYesAmount before tax (UnitPrice × Quantity)
GrossAmountDecimalYesAmount including tax
ProductStringYesProduct description
RemarkStringFor CRNReason for the credit note (at least one line)

FolioInfo.TrxInfo (VAT classification)

FieldTypeRequiredDescription
CodeStringYesMust match the Posting's TrxCode
TrxTypeStringYesTransaction type
DescriptionStringYesDescription
FiscalTrxCodeTypeStringYesVAT category code (see below)

VAT category codes

CodeDescriptionZRA classification
AStandard rateStandard VAT (16%)
DZero ratedZero-rated by nature
EExemptTax exempt
TTourism levyTreated as standard rated

SellerInfo

FieldTypeRequiredDescription
SellerNameStringYesStore identifier used for the API-key lookup — must exactly match the registered store
SellerBRNStringNoBusiness Registration Number
AddressObjectYesStore address details
SellerContactDetailsObjectYesStore contact information (Number becomes the Chrilan cell)

PaymentInfo

FieldTypeRequiredDescription
PaymentTypeStringYesCash or Card
TotalWoVatDecimalYesTotal excluding VAT (sum of NetAmount)
TotalDecimalYesTotal including VAT (sum of GrossAmount)

BuyerInfo (optional)

FieldDescription
BuyerTINBuyer/customer TPIN — mapped to the Chrilan tpin field (empty string if absent)
BuyerLpoLPO number — sets Chrilan lpo and isLpo
Buyer address fieldsPassed through to the response for POS check printing

Successful response (HTTP 200)

{
  "fiscalFolioNo": "211",
  "fiscalBillGenerationDateTime": "2026-01-14T11:32:01",
  "fiscalOutputs": {
    "output": [
      { "name": "COLL_TAX1",              "value": "211" },
      { "name": "QR_CODE_URL",            "value": "https://siportal.zra.org.zm/common/link/ebm/receipt/indexEbmReceiptData?Data=..." },
      { "name": "BASE64_TO_IMAGE",        "value": "iVBORw0KGgoAAAANSUhEUg..." },
      { "name": "sdcId",                  "value": "SDC0010022742" },
      { "name": "mrcNo",                  "value": "WIS00037264" },
      { "name": "intrlData",              "value": "IXCI2VHBMB3QWYTQJC4G5W6L4M" },
      { "name": "rcptSign",               "value": "4BQOZAXZVTQGRLAQ" },
      { "name": "taxData",                "value": "ZRA Invoice: INV0010022742/3470\n..." },
      { "name": "vsdcRcptPbctDate",       "value": "20260114113201" },
      { "name": "$PartnerFiscalStatus$",  "value": "COMPLETED" }
    ]
  },
  "statusMessages": { "messages": [] }
}
FieldDescription
fiscalFolioNoZRA fiscal receipt number
QR_CODE_URL / BASE64_TO_IMAGEQR code as URL and as base64 image for printing
sdcId, mrcNoSmart Device Controller ID and MRC number
rcptSignDigital receipt signature
taxDataTax breakdown text for the receipt
$PartnerFiscalStatus$COMPLETED or FAILED

Document types

Standard invoice (STD)

Normal sale: DocumentInfo.FolioType = "Invoice", FolioHeaderInfo.FolioType = "STD".

Credit note (CRN)

Refund or void. Requirements:

The middleware automatically looks up the original receipt number and SDC ID from its database and links the refund at ZRA.

Error handling

HTTPMeaningTypical cause
200SuccessInvoice registered at ZRA
400Bad RequestValidation failed — missing/invalid fields
401UnauthorizedInvalid or missing JWT
403ForbiddenStore not registered or inactive
500Server ErrorChrilan API failure or internal error
{
  "error": "Validation failed",
  "details": [
    "PropertyTaxNumber is required",
    "FolioType must be Invoice, CRN, or DRN"
  ]
}
ErrorCauseResolution
SellerName is requiredMissing SellerInfo/SellerNameInclude the SellerInfo block with SellerName
Store not registered: XSellerName not in the middleware databaseRegister the store; check exact spelling
PropertyTaxNumber is requiredMissing TPINInclude a valid TPIN in DocumentInfo
TrxInfo missing for TrxCodeA Posting has no matching TrxInfo entryEnsure every TrxCode has a TrxInfo.Code

Critical integration rules

TrxCode linkage Every Posting must have a TrxInfo entry with a matching Code. This linkage determines the VAT treatment of the line.