Cash Drawer SDK

The Cash Drawer SDK allows your Android application to open a connected cash drawer through a Dejavoo P18 payment terminal. This guide explains how to add the SDK to your project, configure the required dependency, and initialize the cash drawer in your application.

Prerequisites

  • The host application should be listed on DvStore
  • An iPOSpays-powered Dejavoo P18 payment terminal
  • Access to the iPOSpays Portal
  • The Cash Drawer SDK (cashdrawer.aar) provided with your cash drawer kit

For Sandbox (UAT)

Users should be onboarded on iPOSpays sandbox (UAT) environment as a merchant and have a valid POS TPN.

For Production (Live)

Users should be onboarded on iPOSpays production environment as a merchant and have a valid POS TPN.

If you do not have a TPN, contact your ISO or devsupport@dejavoo.io.


Supported Devices

  • P18

The cashdrawer.aar file is provided with the kit. Download from here

Add the Cash Drawer SDK

  1. Locate the cashdrawer.aar file included with your Cash Drawer SDK package and copy it into your project's libs directory.
app/
└── libs/
    └── cashdrawer.aar
  1. Open your app-level build.gradle file and add the following dependency:
dependencies {
    implementation files('libs/cashdrawer.aar')
}
  1. In Android Studio, select Sync Project with Gradle Files to load the SDK into your application.

Initialize the Cash Drawer

Create a CashDrawerOpener instance by detecting the connected device and returning the appropriate implementation.

fun create(): CashDrawerOpener? {
    val opener = when {
        isKozenP18Device() -> KozenP18CashDrawerOpener(context, cashDrawerLogger)
        else -> null
    }

    if (opener != null) {
        logger.info(
            TAG,
            "Resolved device cash drawer opener: ${opener.type}, exclusive=${isExclusiveDevice()}"
        )
    } else {
        logger.debug(TAG, "No device-native cash drawer opener for this device")
    }

    return opener
}

The SDK automatically checks whether the connected device is a supported P18 terminal and returns the appropriate CashDrawerOpener instance.

Open the Cash Drawer

After initializing the cash drawer, call the open() method to trigger the cash drawer.

opener?.open()

Last updated on November 3, 2026

On this page