Settlement
METHOD NAME settlement
Requires state
IDLEand during process moves toSETTLEMENT
Description
Perform a settlement request to the host. Firstly, the terminal will update the parameters. Then, depending on the terminal configuration, it will pack the batch file and send all the transactions currently stored in the batch file. This settlement will have an id and batch number if any transaction is batched. This method returns once the request has been completed.
Parameters
object
-
hoststringREQUIRED
Currently, the value isSHVAonly -
reportFormatReportFormat
The format for the report. DefaultNARROW
(1) Show values-
ReportFormat
The format of a report sent back from Shva.
NARROWNarrow paper printerMEDIUMMedium sized paper printerWIDEwide paper printerXMLXML format
-
END
-
-
resetGenboolean
Reset all parameters generation revision. Defaultfalse.
Result
object when a request is valid and settlement starts processing.
-
resultResult
Possible results are:OK,NETWORK_ERROR,GENERAL_ERROR
(1) Show values-
Result
Result of new request. Each command has possible values in the field.
OKRequest is okGENERAL_ERRORAn error occurredCANCELEDCommand was canceled either by the user (on-screen) or throughcancelcommand.TIMEOUTOperation was timed out.NETWORK_ERRORNo internet connection is available.HOST_ERRORHost returned an error regarding the request.SMART_READER_ERRORAn error occurred with the smart-readerSMART_CARD_ERRORAn error occurred with the smart card, or the reader couldn't communicate with the card.NONE_CREDIT_CARDIndustrial card was detected when performing a transaction.CARD_NOT_ALLOWEDWhen the detected card is not allowed to be processed
-
-
settlementSettlement
Settlement payload
Important
Starting from version 1.4.5, the settlement object may be returned even when the result indicates a GENERAL_ERROR. The settlement process performs two independent tasks: updating terminal parameters and batching transactions (when working directly with the processor). Since transaction batching occurs in the middle of the parameters update process, a GENERAL_ERROR can occur in two scenarios:
- Parameter update succeeds, batching fails: The settlement object will contain basic data only (no batching details)
- Batching succeeds, parameter update fails: The settlement object will contain full batching data and report
Since batched transactions cannot be re-processed, the settlement object preserves transaction data when batching was successful, regardless of parameter update failures. Always check the settlement object content to determine which operations completed successfully.
Errors
HostDisabledMissingParamsIllegalStateScreenNotReadyInsufficientBattery