Opening the cash drawer

Using the REST Pay Display API, you can:

  • Open the cash drawer from the developer app so that merchants can handle cash transactions.
  • Retrieve a list of all the connected cash drawers supported by the merchant's Clover device.

When a cash drawer is discovered, it indicates either the cash drawer is already connected or a hardware port is available to connect. The behavior varies based on the type of cash drawer. Example:

  • Local RJ12-type cash drawers may or may not actually be connected at the time the operation is invoked, but will be discovered.
  • Other types of cash drawers such as USB cash drawers are only discovered if they are physically connected at the time of the call.

The REST Pay Display API provides two endpoints for controlling cash drawers:

Prerequisites

  • The cash drawer is connected correctly to the Clover device.
  • The cash drawer is unlocked.
  • The POS is connected to the device using a network or cloud connection.

Getting a list of cash drawers

  1. Send a GET request to the /v1/device/cash-drawers endpoint.
  2. Required. Include the required headers for your request.
    A list of cash drawers appears. Note the ID of the drawer you want to open.
{
  "drawers": [
    {
      "id": "com.clover.SEIKO_MINI_USB_001",
      "name": "Local Cash Drawer",
      "number": 1
    }
  ]
}

Opening a specific cash drawer

  1. Send a POST request to the /v1/device/cash-drawer/open {cashDrawerId} endpoint, where {cashDrawerId} is the id of the cash drawer to open.
  2. Required. Include the required headers for your request. The reason property is optional.
{
    "cashDrawerId": "com.clover.SEIKO_MINI_USB_001",
    "reason": "cash transaction"
}

A success message indicates the drawer that is requested to open.

{ "cashDrawerId": "com.clover.SEIKO_MINI_USB_001" }

Opening the default cash drawer

The default cash drawer is the first drawer that is returned on the list of discovered cash drawers. To open the default cash drawer:

  1. Send an empty POST request to the /v1/device/cash-drawer/open endpoint.
  2. Required. Include the required headers for your request.
    A success message indicates the drawer that is requested to open.
{
  "cashDrawerId": "com.clover.SEIKO_MINI_USB_001"
}

Did this page help you?