Skip to main content
The vmc_configuration class is used to set up various parameters and flags that control the behavior of the peripheral. Proper configuration is crucial for ensuring smooth operation and compatibility with different peripherals.

Configuration Object

The code block below displays the vmc_configuration class for the available SDK languages.
public class vmc_configuration 
      public Object port_vpos;
      public int port_vpos_baud;

      public String serial;
      public String model;
      public String sw_ver;
      public int    machine_type;
      boolean explicit_vend_success;
      public boolean price_not_final_support;
      public boolean mag_card_approved_by_vmc_support;
      public boolean mifare_approved_by_vmc_support;

      public boolean debug;
      public int dump_packets_level;

      public boolean reader_always_on;
      public boolean multi_session_support;
      public boolean multi_vend_support;
      public boolean always_idle;
      public 

Object Parameters

The table below describes the parameters of the class.
ParameterTypeDescription
port_vposStringThe PC COM port to which the Nayax device is connected.
port_vpos_baudintThe baud rate for the Nayax device communication port.
serialStringThe serial number of the machine. This enables precise tracking, effective inventory management, and streamlined maintenance scheduling.
modelStringModel name of the machine. It assists in troubleshooting by distinguishing different machine types in logs and reports.
sw_verStringThe software version of the peripheral.
machine_typeintThe type of peripheral.
explicit_vend_successboolFlag to indicate explicit vending status (success/failure). Relevant only for long vending process.
price_not_final_supportboolIndicates if the price is not final, meaning the settlement price can be different than the one authorized. Relevant for Multisession flow only.
mag_card_approved_by_vmc_supportboolSupport for magnetic card approval by the peripheral.
mifare_approved_by_vmc_supportboolSupport for MIFARE card approval by the peripheral.
debugboolEnables or disables debugging. Enabling it is mandatory in order to generate the SDK’s logs.
dump_packets_levelintSets the level of packet logging for debugging purposes.
reader_always_onboolIt keeps the Nayax device’s reader always enabled and ready for transactions. Used in cases in which the peripheral would like a card’s presentation to be a trigger for product selection.
multi_session_supportboolEnables support for Multi-Session flow
multi_vend_supportboolEnables support for Multi-vend flow.
always_idleboolConfigures the device to start transactions by product selection and have the authorized amount appear on Nayax’s device screen (instead of animations).

Mandatory Fields

When configuring a VMC (Vending Machine Controller), there are specific mandatory fields essential for the proper identification of the machine. Properly managing these fields leads to improved troubleshooting, enhanced system integration, and more efficient maintenance processes. Refer to the code block below for an example of the configuration for these mandatory fields.
vmc_config = new vmc_configuration();

vmc_config.model = "marshall-java-sdk";
vmc_config.serial = "01234567";
vmc_config.hw_ver = "01234567";
vmc_config.manuf_code = "manuf";
The table below describes the parameters:
ParameterTypeDescription
modelStringModel name of the machine. It assists in troubleshooting by distinguishing different machine types in logs and reports.
serialStringThe serial number of the machine. This enables precise tracking, effective inventory management, and streamlined maintenance scheduling.
hw_verStringHardware version of the machine. It ensures that the correct firmware and software are used. Different hardware versions may require specific drivers or compatibility adjustments.
manuf_codeStringIdentifies the machine’s manufacturer, enabling proper support and operation.

Nayax Core

These parameters will be saved in Nayax Core. You can find them in Operations > Machines. Find and select your machine and open the VMC tab, as shown in the following image.

See Also