Symptom
Requests fail with ErrorCondition: NotAllowed or ErrorCondition: LoggedOut, often after working previously.
LoggedOut — the session is gone
The terminal no longer has your session: it restarted, updated, or the session expired. Recovery is mechanical:
- Re-send Login.
- Verify
POISerialNumberagainst your stored value (see hardware swap troubleshooting if it changed). - Retry the failed request with a new ServiceID.
Build this as an automatic path — LoggedOut is normal life, not an incident.
NotAllowed — allowed for whom?
NotAllowed means the operation cannot run in the current state. Three distinct causes, in order of likelihood:
- No session open — you never logged in on this connection, or you assumed a session survived a POS restart. Fix: Login first, always, on startup.
- Service not configured — the operation (pre-auth, gift card, reconciliation type…) is not enabled for this merchant/terminal. Fix: confirm scope with Market Pay; this is configuration, not code.
- Wrong reference — reversals and status queries return NotAllowed with an explanatory
AdditionalResponse(e.g. "Transaction not found in database") when the referenced transaction does not exist. Fix: you referenced a SaleTransactionID or a stale ID — use the stored POITransactionID / original ServiceID.
Reading the response
Always log AdditionalResponse alongside ErrorCondition — it usually states the specific cause and turns a mystery into a one-line fix.