Skip to content

Get Settlement

METHOD NAME getSettlement

Requires state IDLE

Description

Get settlement from the device. Method results were considered a success when the required settlement was found.

Info

The device stores only settlement records in a non-empty batch file. If a settlement request is returned without settlementId or transactions in the batch file, the settlement record is not stored or retrievable.

Parameters

object

  • lookupMethod SettlementLookupMethod REQUIRED
    The query method to use to search for the required settlement
    (1) Show values

    1. SettlementLookupMethod

      Describe a method to query a settlement.

      • SETTLEMENT_ID query with settlement settlementId.
      • BATCH_NO query with settlement batchNo
      • LAST_SETTLEMENT query the last settlement completed on the device.
  • lookupValue string
    The value to search with according to the lookupMethod
    REQUIRED if lookupMethod is SETTLEMENT_ID or BATCH_NO

Result

object on success

Errors

  • MissingParams
  • InvalidParams
  • IllegalState
  • SettlementNotFound

Example

Request

1
2
3
4
5
6
7
8
9
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "getSettlement",
  "params": {
        "lookupMethod": "SETTLEMENT_ID",
        "lookupValue": "5b884a09-7d48-457a-91d6-fae615d6aeeb"
    }
}

Response

{
    "jsonrpc": "2.0",
    "id": "1234567890",
    "result": {
        "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"
      }
    }
}