How to Integrate an MEI BNR Bill Recycler into Your Website with JavaScript

Dispense cash from your kiosk with an MEI BNR Bill Recycler
MEI BNR Bill Recycler

It’s easy to dispense bills from your kiosk like a cashier when you integrate an MEI BNR bill recycler into your website using JavaScript and KioskSimple.  This article will include a detailed JavaScript website code example so you can try it out for free.

You’re probably reading this article because you’ve decided to create a website which needs to accept cash payments, but also needs to dispense change in whole bills.  Maybe your website is running on a self-service kiosk or unattended payment solution.

Integrating a bill recycler can be extremely time-consuming and dispensing cash from your kiosk is fraught with risk.  Fortunately we’ve done all the heavy lifting in KioskSimple to provide you with a high-level, simple and straightforward JavaScript API for the MEI BNR so you can get started dispensing cash quickly.

The example website we’ve create to get you started quickly is pictured below and has the following features:

  • Enables and disable the MEI BNR bill recycler
  • Displays the user’s credit (see Session Funds)
  • Dispenses cash
  • Rolls back a transaction
  • Empties the bill recycler
  • Generates an audit report
  • Includes a Result Output window which displays diagnostics from the MEI BNR bill recycler when you insert bills
MEI BNR JavaScript Example
MEI BNR Bill Recycler JavaScript Example

You can see from the following JavaScript code example the basic flow for interacting with the MEI BNR bill recycler is as follows…

  1. Initialize the KioskSimple API “window.external.KioskSimpleAPIInit();”
  2. Wire-up the bank events for tracking the user’s credit (OnCreditChanged)
  3. Wire-up the MEI BNR bill recycler events (BNROnCashIn, BNROnDispense, etc…)
  4. Enable the MEI BNR bill recycler and wait for the user to insert cash “BNR.Enable(0);”

How to get this example working with a free demo of KioskSimple

KioskSimple configuration settings

  1. Download the example here called “MEI BNR Plugin Example – Web JavaScript” and store the uncompressed folder on your desktop.
  2. Download and install the free demo of KioskSimple.
  3. Connect an MEI BNR bill recycler to your PC.
  4. Run the KioskSimple Configuration Tool and navigate to the PLUGIN STORE.
  5. Install the MEI BNR Bill Recycler Plugin.  The configuration tool will restart and some dependencies will be installed.  You should now see a menu option called BILL ACCEPTORS.  Navigate there and select CONFIGURE.
  6. Under the Device Settings ensure that the device is enabled then click DETECT AND RESET the MEI BNR bill recycler to ensure its installed correctly.
  7. To configure the MEI BNR you need to use the proprietary BNR Configuration Tool provided by MEI.  MEI has requested that KioskSimple customers contact MEI directly to obtain this tool.  Please mention that you’re needing to integrate the MEI BNR with KioskSimple and they’ll get you a copy of their BNR configuration tool.
  8. Navigate to BROWSER->BROWSER SETTINGS and set the Start-up Web Page to the HTML file in this example.  In the case of my PC the path is “file:///C:/Users/Andrew/Desktop/web/Web/BNRTest.html”.  This could also point to your web server if you stored the folder there, but I find it easier to store the files locally for this example.
  9. Save your settings and close the KioskSimple Configuration Tool.

Running the example in KioskSimple

  1. Start KioskSimple.
  2. Select “Try the Demo” and then “Test Mode”.
  3. Now you’ll see the MEI BNR bill recycler website example shown above.  Press “Accept Cash” and the device should be ready to start accepting bills.  Now if you insert a bill you should see the Session Funds update and the Result Output change.
  4. When you’re done press ESC and any password will work while KioskSimple is unregistered.

Got Questions?

Please contact us and we’ll get you in touch with a developer.  We offer free phone and email technical support for all of our code examples.  Try finding that anywhere else in this industry.

We’re dedicated to making your next kiosk project a success and we’re happy to hold your hand through the hardware integration.

Andrew Savala
Follow me

Author: Andrew Savala

Andrew Savala is the CEO of RedSwimmer, with a background in designing and deploying complex payment kiosk systems. Andrew offers high-value, strategic consulting services to companies looking to develop their payment kiosks.