> For the complete documentation index, see [llms.txt](https://docs.verifone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.verifone.com/psdk-latest/reference-material/code-labs/administrative-operations.md).

# Administrative Operations

{% columns %}
{% column %} <i class="fa-clock">:clock:</i> 3 minutes reading time\ <i class="fa-calendar">:calendar:</i> Last updated: 10th October, 2025
{% endcolumn %}

{% column %}

{% endcolumn %}

{% column %}
✅ DeviceManagement Actions

✅ Diagnostics
{% endcolumn %}
{% endcolumns %}

{% stepper %}
{% step %}

## Introduction

This code lab describes different administrative operations in PSDK.

### What you should already know

* The device you will be using for integration.
* Setting up the device and development environment for developing PSDK application

### What you'll need

* Any Verifone device with necessary software loaded.
* Watch the PSDK Getting started code labs for more details on devices and software.
* A working terminal
  {% endstep %}

{% step %}

## Device Management

Some operations like Reboot, Reset, Shutdown, Test host connection, Changing and Resetting Manager passcodes and invoking terminal heartbeat are part of DeviceManagement. In PSDK DeviceManagement Enumeration class provides some of the useful Device Management operations.

#### DeviceManagement Actions

[***DeviceManagementAction*** ](https://docs.verifone.com/psdk-api-latest/android-java/index/devicemanagementaction)performs an action on the payment terminal. some of the most frequently used diagnostic actions are such as reboot, shutdown, test host connection, check for terminal heartbeat, change password and reset password.

Diagnostic actions Test host connection, check for terminal heartbeat, change password and reset password are applicable only for AGPA solutions

* [DeviceManagementAction.REBOOT](https://docs.verifone.com/psdk-api-latest/android-java/index/devicemanagementaction) - The diagnostic action **Reboot** up on calling reboots the payment terminal.
* [DeviceManagementAction.SHUTDOWN](https://docs.verifone.com/psdk-api-latest/android-java/index/devicemanagementaction) - The diagnostic action **Shutdown** up on calling shutdowns the payment terminal.
* [DeviceManagementAction.TEST\_HOST\_CONNECTION](https://docs.verifone.com/psdk-api-latest/android-java/index/devicemanagementaction) - The diagnostic action **Host Connection Test** is used to test whether the live host is reachable or not.
* [DeviceManagementAction.TMS\_MANUAL\_HEARTBEAT](https://docs.verifone.com/psdk-api-latest/android-java/index/devicemanagementaction) - Request payment application to trigger a manual **VHQ heartbeat**.
* [DeviceManagementAction.VF\_CHANGE\_PASSWORD](https://docs.verifone.com/psdk-api-latest/android-java/index/devicemanagementaction) - Request payment application to start **change (manager) password flow**.
* [DeviceManagementAction.VF\_RESET\_PASSWORD](https://docs.verifone.com/psdk-api-latest/android-java/index/devicemanagementaction) - Request payment application to start **reset (manager) password flow**.

Below API shows how to perform device management actions.

```
    Status status =  paymentSdk.getTransactionManager().performDeviceManagement(DeviceManagementAction);
```

Handle the result of the API call in the [CommerceListenerAdapter ](https://app.gitbook.com/s/yzyMJNwlQJZoQOIC8vZ8/api/moduleindex-4/_commerce_listener_adapter_8java)callback method [handleDeviceManagementEvent ](https://app.gitbook.com/s/yzyMJNwlQJZoQOIC8vZ8/api/moduleindex-4/_commerce_listener_adapter_8java#cppv4n3com8verifone11payment_sdk19phonynameduetoerror27handledevicemanagementevente21devicemanageme)The handle [***DeviceManagementEvent***](https://docs.verifone.com/psdk-api-latest/android-java/index/devicemanagementevent) is received when a specific [***DeviceManagementAction***](https://docs.verifone.com/psdk-api-latest/android-java/index/devicemanagementaction) has been sent to do something on the payment terminal.

```
@Override
public void handleDeviceManagementEvent(DeviceManagementEvent deviceManagementEvent) {

  switch(event.getActionType())
        {
            case REBOOT:
                // reboot terminal
                break;

            case SHUTDOWN:
                // Shutdown the terminal
                break;

            // Do Validation of the host connection
            case TEST_HOST_CONNECTION:
                if(event.getStatus() == StatusCode.SUCCESS)
                {
                    // Host connection success
                } else {
                    // Host connection failed
                }
                break;

            // Check for manual heartbeat
            case TMS_MANUAL_HEARTBEAT:
                if(event.getStatus() == StatusCode.SUCCESS) 
                {
                    // TMS Heart beat request success ;
                } else {
                    // TMS Heart beat request Error ;
                }
                break;

            // Do Validation for password change
            case VF_CHANGE_PASSWORD:
                if(event.getStatus() == StatusCode.SUCCESS) {
                    //DeviceManagement, VF_CHANGE_PASSWORD success;
                } else {
                    //DeviceManagement, VF_CHANGE_PASSWORD error;
                }
                break;

            // Do Validation for password reset
            case VF_RESET_PASSWORD:
                if(event.getStatus() == StatusCode.SUCCESS) {
                    //DeviceManagement, VF_RESET_PASSWORD success;
                } else {
                    //DeviceManagement, VF_RESET_PASSWORD Error;
                }
                break;
        } // End switch
}
```

Password change and reset password requires userinput request from terminal to be handled in POS application.Please refer psdk-device-functions code labs for handling password prompts in your pos application. Configuration parameters like [**TransactionManager.PASSWORD\_AT\_POS\_CAPABILITY**](https://docs.verifone.com/psdk-api-latest/android-java/index/transactionmanager) and [**TransactionManager.INPUT\_CONFIRMATION\_CAPABILITY**](https://docs.verifone.com/psdk-api-latest/android-java/index/transactionmanager) should be enabled to handle password inputs(required for change and reset password) at the POS side during login request,please refer login code labs for setting the config during login.
{% endstep %}

{% step %}

## Diagnostics

You can perform diagnostics of the terminal by checking some of the properties of the terminal using PSDK [DeviceVitals ](https://docs.verifone.com/psdk-api-latest/android-java/index/devicevitals)class.

* The TransactionManagerstate should be Logged\_In to receive the callback [handleDeviceVitalsInformationEvent ](https://app.gitbook.com/s/yzyMJNwlQJZoQOIC8vZ8/api/moduleindex-4/_commerce_listener_adapter_8java#cppv4n3com8verifone11payment_sdk19phonynameduetoerror34handledevicevitalsinformationevente28devicev)([DeviceVitalsInformationEvent ](https://docs.verifone.com/psdk-api-latest/android-java/index/devicevitalsinformationevent)event) automatically.
* The callback [handleDeviceVitalsInformationEvent ](https://app.gitbook.com/s/yzyMJNwlQJZoQOIC8vZ8/api/moduleindex-4/_commerce_listener_adapter_8java#cppv4n3com8verifone11payment_sdk19phonynameduetoerror34handledevicevitalsinformationevente28devicev)can also be invoked expilcitly by calling API [requestDeviceVitals()](https://docs.verifone.com/psdk-api-latest/android-java/index/transactionmanager#requestdevicevitals) when transaction manager state is not logged in.

Please refer below code snippet for fetching some of the terminal device vitals information.

```
//check the state of the transactionManager
if(paymentSdk.getTransactionManager().getState() == TransactionManagerState.LOGGED_IN)
{
    // call requestDeviceVitals API 
    Status s = PaymentSdk.getTransactionManager().requestDeviceVitals();
}

//Get the device vital information in the below callback 
@Override
public void handleDeviceVitalsInformationEvent(DeviceVitalsInformationEvent event) {
//Get device vitals object from the DeviceVitalsInformationEvent
DeviceVitals dv = event.getDeviceVitals();
//Get terminal printer status using device vitals object 
PrinterStatus printerstatus = dv.getPrinterStatus();

//Indicates if the PIN-entry device is working and usable.
Boolean isPedworking = dv.getIsPedOk();

//Indicates if the security module of the terminal is working and usable.
Boolean isSecurityOK = dv.getIsSecurityOk();

//Indicates if the card reader is working and usable
Boolean isCardreaderOK = dv.getIsCardReaderOk();
}
```

<br>

Additionally, check [TransactionManagerState ](https://docs.verifone.com/psdk-api-latest/android-java/index/transactionmanager#getstate)to ensure the transaction manager is in the correct state.
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.verifone.com/psdk-latest/reference-material/code-labs/administrative-operations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
