CashDrawer CashDrawer CashDrawer CashDrawer CashDrawer Class


A cash drawer device in a retail scenario.

public : sealed class CashDrawer : IClosable
struct winrt::Windows::Devices::PointOfService::CashDrawer : IClosable
public sealed class CashDrawer : IDisposable
Public NotInheritable Class CashDrawer Implements IDisposable
// This class does not provide a public constructor.

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


To get a CashDrawer object, use the FromIdAsync or GetDefaultAsync static methods.

See the cash drawer sample for an example implementation.

Version history

Windows version SDK version Value added
1703 15063 GetDeviceSelector(PosConnectionTypes)


Capabilities Capabilities Capabilities Capabilities Capabilities

The functionality of the cash drawer device as exposed by API.

DeviceId DeviceId DeviceId DeviceId DeviceId

The identifier string of the cash drawer device.

DrawerEventSource DrawerEventSource DrawerEventSource DrawerEventSource DrawerEventSource

Gets the CashDrawerEventSource to allow the app to detect the open/close state of the drawer. The actual current state is reported by IsDrawerOpen..

IsDrawerOpen IsDrawerOpen IsDrawerOpen IsDrawerOpen IsDrawerOpen

Indicates whether the cash drawer is open.

Status Status Status Status Status

Get the current power and availability status of the cash drawer.


CheckHealthAsync(UnifiedPosHealthCheckLevel) CheckHealthAsync(UnifiedPosHealthCheckLevel) CheckHealthAsync(UnifiedPosHealthCheckLevel) CheckHealthAsync(UnifiedPosHealthCheckLevel) CheckHealthAsync(UnifiedPosHealthCheckLevel)

Gets the device's health state asynchronously.

ClaimDrawerAsync() ClaimDrawerAsync() ClaimDrawerAsync() ClaimDrawerAsync() ClaimDrawerAsync()

Attempts to get exclusive access on the cash drawer.

Close() Close() Close() Close() Close()

Close the cash drawer session.

Dispose() Dispose() Dispose() Dispose() Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

FromIdAsync(String) FromIdAsync(String) FromIdAsync(String) FromIdAsync(String) FromIdAsync(String)

Creates CashDrawer object from the DeviceInformation.Id.

GetDefaultAsync() GetDefaultAsync() GetDefaultAsync() GetDefaultAsync() GetDefaultAsync()

Gets the default paired or locally-connected cash drawer.

GetDeviceSelector() GetDeviceSelector() GetDeviceSelector() GetDeviceSelector() GetDeviceSelector()

Gets an Advanced Query Syntax (AQS) string that you can use to list the available cash drawers.

GetDeviceSelector(PosConnectionTypes) GetDeviceSelector(PosConnectionTypes) GetDeviceSelector(PosConnectionTypes) GetDeviceSelector(PosConnectionTypes) GetDeviceSelector(PosConnectionTypes)

Gets an Advanced Query Syntax (AQS) string that you can use to list the cash drawers available over the specified connection types

GetStatisticsAsync(IIterable<String>) GetStatisticsAsync(IIterable<String>) GetStatisticsAsync(IIterable<String>) GetStatisticsAsync(IIterable<String>) GetStatisticsAsync(IIterable<String>)

Retrieves the requested statistics from the cash drawer.


StatusUpdated StatusUpdated StatusUpdated StatusUpdated StatusUpdated

Indicates there has been a change in the power availability status of the drawer.

See also