A dispensing system includes a replenishment container. The replenishment container includes a container door, a container lock for the container door, and an identifier to indicate an identification of the container contents. The system also includes a dispenser to receive the replenishment container. The dispenser includes a dispenser door to selectively communicate the dispenser with the container, a container detector to continuously detect a presence or absence of the identifier and provide a signal corresponding to the identification of the contents of the container, a switch to detect when the dispenser door is not fully closed, and a controller. The controller receives the identification signal from the container detector, compares the identification of the contents of the container with an expected identification, unlocks the container lock if the identifications match, and prevents the dispenser from dispensing if the identifications do not match or if no identifier is detected.