> ## Documentation Index
> Fetch the complete documentation index at: https://devzone.nayax.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Remote Management

The EMV Core SDK includes management features that streamline device configuration, firmware updates, and diagnostics. These capabilities reduce maintenance overhead and enhance reliability by allowing centralized control through Nayax’s Terminal Management System (TMS) or local updates when necessary.

The following methods are used for managing the SDK:

* [Destroy](#destroy)
* [GetAttribute](#getattribute)
* [GetKioskID](#getkioskid)
* [GetPollStatus](#getpollstatus)
* [GetStatus](#getstatus)
* [GetVersion](#getversion)
* [Initialize](#initialize)
* [isEMVCoreConnected](#isemvcoreconnected)
* [SetManagementCallbacks](#setmanagementcallbacks)
* [SetPaymentCallbacks](#setpaymentcallbacks)
* [ShowMessage](#showmessage)
* [UpdateMachineAttributes](#updatemachineattributes)

See the sections below for more details on each method.

***

## `Destroy`

<Warning>
  This method is only available for the Android SDK.
</Warning>

Terminates the session with the reader and releases any associated resources. Use this during application shutdown or when the reader is no longer needed to prevent resource leaks and ensure the proper cleanup of SDK-related processes.

See the `Destroy` API signature in the code below:

```java Android theme={null}
void Destroy();
```

***

## `GetAttribute`

Called by the POS application to retrieve a specific attribute value from the EMV Core configuration file.

See the `GetAttribute` API signature in the code below:

<Tabs>
  <Tab title="JSON">
    Request:

    ```json theme={null}
    {"jsonrpc":"2.0","method":"GetAttribute", "params": {"Key":"PRE_AUTH_AMOUNT"}, "id":12}
    ```

    Response when the requested attribute exists in the configuration file:

    ```json theme={null}
       {"jsonrpc":"2.0", "result":"150", "id":12}
    ```

    Response when the requested attribute doesn’t exist in the configuration file:

    ```json theme={null}
     {"jsonrpc":"2.0", "error":{"code": -1, "message": "Get attribute key not found"}, "id":12}
    ```

    **Parameters:**

    | Parameter | Description                                                               |
    | :-------- | :------------------------------------------------------------------------ |
    | **id**    | Command ID.                                                               |
    | **key**   | Label of the requested configuration attribute (e.g., `PRE_AUTH_AMOUNT`). |
  </Tab>

  <Tab title="Android">
    ```java Java theme={null}
    String GetAttribute(String key) throws EmvCoreException;
    ```

    **Parameters:**

    | Parameter | Description                                                                                                                                                         |
    | :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
    | `key`     | The attribute key in the configuration file. For example, if the config file includes `PRE_AUTH_AMOUNT=100`, providing the key `PRE_AUTH_AMOUNT` will return `100`. |
  </Tab>

  <Tab title="Linux">
    ```c C theme={null}
    KIOSK_RET LibOtiKiosk_GetAttribute(char* attribute_name, char* out_value,
    int max_out_size);
    ```

    **Parameters:**

    | Parameter        | Description                                                                                                                             |
    | :--------------- | :-------------------------------------------------------------------------------------------------------------------------------------- |
    | `attribute_name` | A null-terminated string representing the attribute key in the configuration file (e.g., `"PRE_AUTH_AMOUNT"`).                          |
    | `out_value`      | A pointer to a caller-allocated buffer where the attribute value will be stored as a null-terminated string.                            |
    | `max_out_size`   | The maximum capacity of the `out_value` buffer in bytes. This prevents buffer overflows if the retrieved value is longer than expected. |
  </Tab>
</Tabs>

***

## `GetKioskID`

Returns the device's unique identification number, which the Nayax server uses to link transactions, configurations, and monitoring to this device.

See the `GetKioskID` API signature in the code below:

<Tabs>
  <Tab title="JSON">
    Request:

    ```json theme={null}
    {"jsonrpc": "2.0", "method": "GetKioskID", "params": {}, "id": 902}
    ```

    Response:

    ```json theme={null}
       {"jsonrpc":"2.0", "result":"00130226001C9C69", "id":902}
    ```
  </Tab>

  <Tab title="Android">
    ```java Java theme={null}
    String GetKioskID() throws EmvCoreException;
    ```
  </Tab>

  <Tab title="Linux">
    ```c C theme={null}
    KIOSK_RET LibOtiKiosk_GetKioskId(char* out_id, int max_out_size);
    ```
  </Tab>
</Tabs>

***

## `GetPollStatus`

Returns separate status values for the card-polling state and for reader and network resource availability.

See the `GetPollStatus` API signature in the code below:

<Tabs>
  <Tab title="JSON">
    Request:

    ```json theme={null}
    {"jsonrpc": "2.0", "method": "GetPollStatus", "params": {}, "id": 14}
    ```

    Response:

    ```json theme={null}
    {"jsonrpc":"2.0", "result":{"Polling":false, "Resources":"Ready"}, "id":14}
    ```

    The possible values are: `Polling`: `true` or `false`. `Resources`: `Ready`, `NoReader`, or `NoNetwork`.
  </Tab>

  <Tab title="Linux">
    ```c C theme={null}
    KIOSK_RET LibOtiKiosk_GetPollStatus(otiKioskPollStatus *out_poll_status);
    ```
  </Tab>
</Tabs>

***

## `GetStatus`

Retrieves the reader's current status, including its transaction readiness and connectivity state. This is useful for monitoring the device state during integration or deployment.

See the `GetStatus` API signature in the code below:

<Tabs>
  <Tab title="JSON">
    Request:

    ```json theme={null}
    {"jsonrpc": "2.0", "method": "GetStatus", "id": 805}
    ```

    Response:

    ```json theme={null}
     {"jsonrpc": "2.0", "result": "Ready", "id": 805}
    ```
  </Tab>

  <Tab title="Android">
    ```java Java theme={null}
    EmvCoreStatus GetStatus() throws EmvCoreException;
    ```
  </Tab>

  <Tab title="Linux">
    ```c C theme={null}
    KIOSK_STATUS status;
    KIOSK_RET result = LibOtiKiosk_GetStatus(&status);
    if (result == KIOSK_RET_OK) {
    switch (status) {
    case OK_READY:
    printf("Kiosk is ready for transactions\n");
    break;
    case OK_NOT_READY:
    printf("Kiosk is not ready\n");
    break;
    // Handle other status values...
    }
    }
    ```
  </Tab>
</Tabs>

The possible result values are: `NotReady`, `Ready`, `PaymentTransaction`, `Update`, `NoReader`, `NoTerminalId`, `NoNetwork`, and `NoTransaction`.

<Note>
  * **`Update`**: Indicates the EMV Core is busy with TMS updates (e.g., new firmware or configuration).
  * **`NoTerminalId`**: Indicates the EMV Core does not have a configured Terminal ID.
</Note>

<Warning>
  If `GetStatus` times out, retry up to three times with a five-second interval. If there is still no response, assume EMV Core is unresponsive and restart the process.
</Warning>

***

## `GetVersion`

Fetches the reader's firmware version and the EMV Core SDK version. This is used to verify that the latest updates have been applied.

<Tabs>
  <Tab title="JSON">
    Request:

    ```json theme={null}
    {"jsonrpc": "2.0", "method": "GetVersion", "params":{"SoftwareComponent":
    "Reader"}, "id": 5}

    ```

    Response:

    ```json theme={null}
    {"jsonrpc": "2.0", "result": "EMVS_v071585", "id": 5}

    ```

    | Parameter             | Description                                                                                          |
    | :-------------------- | :--------------------------------------------------------------------------------------------------- |
    | **id**                | Command ID.                                                                                          |
    | **SoftwareComponent** | The software component to check. Accepted values: `otiKiosk` (for the EMV Core version) or `Reader`. |
  </Tab>

  <Tab title="Android">
    ```java Java theme={null}
    String GetEmvCoreVersion() throws EmvCoreException;
    String GetReaderVersion() throws EmvCoreException;
    ```
  </Tab>

  <Tab title="Linux">
    ```c C theme={null}
    KIOSK_RET LibOtiKiosk_GetKioskVersion(char* out_version, int max_out_size);
    ```
  </Tab>
</Tabs>

***

## `Initialize`

Initializes the EMV Core SDK and establishes a session with the reader. Call this once during application startup before performing any transactions or management tasks.

See the `Initialize` API signature in the code below:

<Tabs>
  <Tab title="Android">
    ```java Java theme={null}
    void Initialize(Context context);
    ```
  </Tab>

  <Tab title="Linux">
    ```c C theme={null}
    // TCP connection to localhost
    bool success = LibOtiKiosk_Init(NULL, false);
    // TCP connection to specific server
    bool success = LibOtiKiosk_Init("192.168.1.100", false);
    // Unix domain socket
    bool success = LibOtiKiosk_Init("/tmp/kiosk_sockets", true);
    ```

    ### Parameters

    | Parameter        | Description                                                                                                                                    |
    | :--------------- | :--------------------------------------------------------------------------------------------------------------------------------------------- |
    | `server_address` | **Unix Domain Sockets:** Path to the folder containing sockets (can be NULL). **TCP Sockets:** IP address or hostname (defaults to localhost). |
    | `is_local`       | Set to `true` for Unix domain sockets, or `false` for TCP sockets.                                                                             |

    ### Returns

    * **`true`**: Initialization was successful.
    * **`false`**: Initialization failed.

    ### Example Usage

    ```c C theme={null}
    // TCP connection to localhost
    bool success = LibOtiKiosk_Init(NULL, false);

    // TCP connection to a specific server
    bool success = LibOtiKiosk_Init("192.168.1.100", false);

    // Unix domain socket connection
    bool success = LibOtiKiosk_Init("/tmp/kiosk_sockets", true);
    ```
  </Tab>
</Tabs>

***

## `isEMVCoreConnected`

<Warning>
  This method is only available for the Android SDK.
</Warning>

Retrieves the current status of the reader, including its transaction readiness and connectivity state.

See the `isEMVCoreConnected` API signature in the code below:

```java Android theme={null}
boolean isEmvCoreConnected();
```

***

## `SetManagementCallbacks`

<Warning>
  This method is only available for the Android SDK.
</Warning>

Registers callbacks for system-level EMV Core events. This includes the `SystemStatusChanged` event, which lets your application monitor the health and maintenance status of the SDK.

See the `SetManagementCallbacks` API signature in the code below:

```java Android theme={null}
void SetManagementCallbacks(IManagementCallbacks iMaintenanceCallbacks);
```

**Parameters:**

`iMaintenanceCallbacks`: Maintenance details and system event handlers.

<Note>
  To learn more about implementation, see the [Event Callbacks](/docs/integrate-pos-device/emv-core/sdk-methods-functions/event-callbacks) documentation.
</Note>

***

## `SetPaymentCallbacks`

Registers callbacks called by the EMV Core and implemented by the sales application regarding payment functionality. This includes handling events such as `TransactionComplete` and `ReaderMessage`.

See the `SetPaymentCallbacks` API signature in the code below:

<Tabs>
  <Tab title="Android">
    ```java Java theme={null}
    void SetPaymentCallbacks(IPaymentCallbacks iPaymentCallbacks);
    ```

    **Parameters:**

    * `iPaymentCallbacks`: Payment transaction details and event handlers.
  </Tab>

  <Tab title="Linux">
    ```c C theme={null}
    void LibOtiKiosk_Register_TransactionComplete_Callback(TransactionCompleteCb_t
    cb);

    ```
  </Tab>
</Tabs>

***

## `ShowMessage`

Displays a custom message on the reader’s screen (available only if the reader has a display).

See the `ShowMessage` API signature in the code below:

<Tabs>
  <Tab title="JSON">
    Request:

    ```json theme={null}
    {"jsonrpc": "2.0", "method": "ShowMessage", "params":
    {"line1": "Please Select", "line2": "Your Product"}, "id": 901}
    ```

    Response:

    ```json theme={null}
       {"jsonrpc": "2.0", "result": true, "id": 901}
    ```

    | Parameter | Description                                                                    |
    | :-------- | :----------------------------------------------------------------------------- |
    | **id**    | Command ID.                                                                    |
    | **line1** | Text to show in the 1st line of the reader display (limited to 16 characters). |
    | **line2** | Text to show in the 2nd line of the reader display (limited to 16 characters). |
  </Tab>

  <Tab title="Android">
    ```java Java theme={null}
    void ShowMessage(String line1, String line2) throws EmvCoreException;
    ```
  </Tab>

  <Tab title="Linux">
    ```c C theme={null}
    KIOSK_RET result = LibOtiKiosk_ShowMessage("Welcome!", "Tap Card");
    ```
  </Tab>
</Tabs>

<Warning>
  This method is exclusive to the **UNO-PLUS** reader.
</Warning>

***

## `UpdateMachineAttributes`

Updates host machine attributes in Nayax Core. These values are informational only and do not affect payment processing. They are available in Nayax Core for reporting and diagnostics.

<Tabs>
  <Tab title="JSON">
    **Request:**

    ```json theme={null}
    {
      "jsonrpc": "2.0",
      "method": "UpdateMachineAttributes",
      "params": [
        {"id": 542, "value": "AC Charger 1"},
        {"id": 543, "value": "ACC1-1234567"},
        {"id": 544, "value": "1.0.35-A"},
        {"id": 593, "value": "1.2-G3"},
        {"id": 541, "value": "manuf-123"}
      ],
      "id": 801
    }
    ```

    **Response:**

    ```json theme={null}
    {"jsonrpc": "2.0", "result": true, "id": 801}
    ```
  </Tab>

  <Tab title="Android">
    ```java Java theme={null}
    String UpdateMachineAttributes(List<NayaxMachineAttribute> attributes) throws EmvCoreException;
    ```
  </Tab>

  <Tab title="Linux">
    ```c C theme={null}
    KIOSK_RET LibOtiKiosk_UpdateMachineAttributes(NayaxMachineAttribute attributes[], int count, char* result, int max_result_size);
    ```
  </Tab>
</Tabs>

**Parameters:**

**`key`**: A list of machine attributes to be updated on Nayax Core. The relevant attribute IDs are:

| ID    | Attribute          | Required |
| :---- | :----------------- | :------- |
| `541` | Manufacturer Code  | Yes      |
| `542` | Machine Model      | Yes      |
| `543` | Serial Number      | Yes      |
| `544` | Machine SW Version | Yes      |
| `551` | Type               | No       |
| `593` | VMC HW Version     | No       |

<Warning>
  You must send attributes `541`, `542`, `543`, and `544` on every call:

  * **`541` Manufacturer Code**: the manufacturer's English name (for example, `myCompanyName`).
  * **`542` Machine Model**: the machine model.
  * **`543` Serial Number**: the machine serial number as it appears on the machine.
  * **`544` Machine SW Version**: the machine software version.

  Omitting any of these attributes can result in incomplete reporting and diagnostics data in Nayax Core.
</Warning>
