Skip to content

Outcomes and errors ​

Status codes ​

StatusMeaning
200a read — the existing document
201the document is issued and fiscalized
202the document is kept, but the tax authority did not accept it (see below)
401 / 402 / 403key, subscription, module, IP address or scope
404no such document or route
409the account's state does not allow the request (setup, shift, conflict)
422invalid request
429too many requests
502nothing was stored because of a tax-authority failure
503the cash register is busy issuing other documents; no document was stored (see REGISTER_BUSY below)

Error envelope ​

json
{ "error": { "code": "VALIDATION_ERROR", "message": "…", "details": { } }, "request_id": "…" }

Branch on code, never on the text in message.

Check before sending ​

Before anything is sent to the tax authority, Konty checks the account's setup. If something is missing, the API answers 409 and stores nothing:

MarketCode and details.reasonWhat is missing
MontenegroFISCAL_SETUP_INCOMPLETE: certificate_missing / certificate_expiredthe fiscal certificate
MontenegroFISCAL_SETUP_INCOMPLETE: venue_identity_missingthe venue's tax id or business unit code
MontenegroFISCAL_SETUP_INCOMPLETE: tcr_missingthe key's cash register is not registered with the tax authority
MontenegroFISCAL_SETUP_INCOMPLETE: operator_code_missingthe key's user has no operator code
MontenegroFISCAL_SETUP_INCOMPLETE: operator_code_refusedthe tax authority refused the operator code of the key's user
MontenegroFISCAL_SETUP_INCOMPLETE: day_deposit_missinga regular register without today's opening deposit (cash or card payments)
MontenegroFISCAL_SETUP_INCOMPLETE: fiscalization_disabledfiscalization is switched off on this environment
SerbiaVSDC_CERTIFICATE_MISSINGno valid VSDC certificate (receipts)
SerbiaFISCAL_SETUP_INCOMPLETE: einvoice_api_key_missingno SEF API key (e-invoices)

The venue owner fixes it in the back office; then send the request again.

Document kept without fiscalization ​

If the tax authority refuses the document or does not answer, the document is kept and the API answers 202:

json
{ "data": { "external_reference": "WC-10045", "fiscalized": false, "register_status": "failed",
    "fiscal_error": { "code": "FISCAL_STATUS_UNKNOWN", "message": "…", "details": { } } },
  "request_id": "…" }
fiscal_error.codeMeaning
FISCAL_REJECTEDthe tax authority refused it (details says why)
FISCAL_SERVICE_UNAVAILABLEthe tax authority could not be reached
FISCAL_STATUS_UNKNOWNthe answer was lost; the authority may already hold the document

Caution

Do not send such a document again under a new reference, and do not change it. It is re-sent nightly with the same identifiers (in Montenegro as a subsequent delivery with the same number and IIC); GET /orders/{reference} then shows fiscalized: true. A request with the same reference answers 409 DUPLICATE_REFERENCE with the kept document and does not contact the tax authority.

502 is answered only when nothing was stored: the day's opening deposit of a Montenegrin shared register could not be registered (FISCAL_SERVICE_UNAVAILABLE, safe to retry), or a Serbian e-invoice storno failed — after FISCAL_STATUS_UNKNOWN SEF may have taken it, so check einvoice_status before retrying.

Common codes ​

CodeWhat to do
SHIFT_CLOSEDopen a shift on the key's regular register (or bind the key to a shared register)
REGISTER_UNAVAILABLE / USER_UNAVAILABLEthe key's register or user is inactive — edit the key
VALIDATION_ERRORdetails.errors names the fields
PRODUCT_NOT_FOUNDdetails.item_index names the item
PRODUCT_TAX_MISMATCH / TAX_RATE_AMBIGUOUS / TAX_RATE_NOT_FOUNDa described item's tax rate — see Products from your system
PAYMENT_TOTAL_MISMATCHthe payments do not add up — use details.order_total
COUNTRY_MISMATCHthe key belongs to another country's account (send expect_country)
DUPLICATE_REFERENCEthe reference was already used; details.order is the existing document
VOID_NOT_ALLOWEDthe document cannot be voided (details.reason)
MARKET_NOT_SUPPORTEDthe account's market is not served (Bosnia and Herzegovina)
REGISTER_BUSYwait the seconds in the Retry-After header, then send the same request with the same external_reference

Busy cash register ​

Konty issues one document at a time on a cash register. A request that arrives while other documents are being issued waits for its turn for up to 10 seconds. If the turn does not come, the API answers 503 REGISTER_BUSY with a Retry-After header and stores no document.

Send the same request again after that many seconds, with the same external_reference. Do not send several documents for one cash register at the same moment: send them one after another.

Any other 503 (code HTTP_ERROR, or an answer without the API envelope) means the service is temporarily unavailable, for example during maintenance. Nothing was stored then either: send the same request again later, after the Retry-After header when the answer has one.

The full list of codes is in the Reference.

Konty POS for hospitality and retail: konty.com