Error Codes
The most important high-level status is OverallResult.
Typical values include:
SuccessFailureAbortedTimedOutDeviceUnavailableFormatErrorParsingErrorValidationErrorMissingMandatoryDataLoggedoutPrintLastTicket
Recommended error handling model
Success
Treat the request as completed successfully. Store all references returned by the terminal, especially:
- terminal ID
- STAN
- approval code
- transaction reference number
- card circuit
- masked card number
- total amount
Failure
Treat as not successful, but still inspect any returned diagnosis information.
Aborted
Treat as user or cashier aborted.
TimedOut
Treat as result unknown until recovery has been performed.
DeviceUnavailable
The terminal is busy or temporarily not ready. Retry only after a short delay.
PrintLastTicket
The terminal expects the last receipt or journal output to be processed successfully before new transactions continue.
Diagnosis fields
When transaction information is requested, the response may include diagnostic values such as:
HostDeclineReasonTerminalDeclineReason
These should be:
- logged by the POS
- exposed in support logs
- mapped to cashier-friendly messages only where appropriate
What to persist in the POS
For supportability and follow-up flows, store at least:
- request ID
- request type
- workstation ID
- timestamp
- terminal ID
- STAN
- approval code
- transaction reference number
- card circuit
- masked PAN if returned
- total amount and currency
- overall result
- host decline reason
- terminal decline reason
- whether receipt and journal output succeeded