Skip to content

Settlement

METHOD NAME settlement

Requires state IDLE and during process moves to SETTLEMENT

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

  • host string REQUIRED
    Currently, the value is SHVA only

  • reportFormat ReportFormat
    The format for the report. Default NARROW
    (1) Show values

    1. ReportFormat

      The format of a report sent back from Shva.

      • NARROW Narrow paper printer
      • MEDIUM Medium sized paper printer
      • WIDE wide paper printer
      • XML XML format
    2. END

  • resetGen boolean
    Reset all parameters generation revision. Default false.

Result

object when a request is valid and settlement starts processing.

  • result Result
    Possible results are: OK, GENERAL_ERROR
    (1) Show values

    1. Result

      Result of new request. Each command has possible values in the field.

      • OK Request is ok
      • GENERAL_ERROR An error occurred
      • CANCELED Command was canceled either by the user (on-screen) or through cancel command,
      • TIMEOUT Operation was timed out.
      • HOST_ERROR Host returned an error regarding the request.
      • SMART_READER_ERROR An error occurred with the smart-reader
      • SMART_CARD_ERROR An error occurred with the smart card, or the reader couldn't communicate with the card.
      • NONE_CREDIT_CARD Industrial card was detected when performing a transaction.
      • CARD_NOT_ALLOWED When the detected card is not allowed to be processed
  • settlement Settlement
    Settlement payload

Errors

  • HostDisabled
  • MissingParams
  • IllegalState
  • ScreenNotReady

Example

Request

1
2
3
4
5
6
7
8
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "settlement",
  "params": {
        "host": "SHVA"    
    }
}

Response

{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "result": "OK",
    "settlement": {
        "terminalId": "0883198",
        "settlementId": "5b884a09-7d48-457a-91d6-fae615d6aeeb",
        "batchNo": "01649624",
        "report": " בדיקות ארנה          <!>מספר מסוף:  0884401   <!>תאריך:      27/11/2024<!>שעה:        19:34     <!>                      <!>מספר עסק ישראכרט      <!>   0071506            <!>מספר עסק כאל          <!>   0398021            <!>          MAX מספר עסק<!>   0300012            <!>AD30S30001     :PPCODE<!>......................",
        "settledTransactions": [
                {
                    "type": "R",
                    "referenceId": "5544a15f-2759-4622-8a97-53adfbbee184",
                    "transactionId": "24111020193508831988304"
                },
                {
                    "type": "R",
                    "referenceId": "65f0bf12-8a42-40d1-98aa-a91cb920cf1f",
                    "transactionId": "24111020204508831983607"
                }
        ],
        "time": "2024-11-28T01:34:00.264+08:00"
      }
    }
}