Skip to main content
The Nayax Marshall SDK includes a simulator to help developers test and debug their implementation with the Nayax payment system. The simulator replicates the behavior of the actual hardware and software interactions, allowing you to validate the vending process without needing physical hardware.

Simulator

When the Java SDK simulator is started on a terminal, its menu will look like this:
[0]: Start Vend Session 0
[1]: Cancel Session
[2]: Close Session 0
[3]: Info Session
[4]: Check balance
[5]: query opened sessions
[6]: query reader state
[7]: cash sale
[8]: alert
[9]: select brand
[10]: transfer custom transaction_id
[11]: display message
[12]: open socket
[13]: close socket
[14]: UI control
[15]: marshall parser
[q]: quit
[0]: Start Vend Session 0
[1]: Cancel Session
[2]: Close Session 0
[3]: query opened sessions
[4]: query reader state
[5]: cash sale
[6]: alert
[7]: display message
[8]: open socket
[9]: close socket
[10]: UI control
[q]: quit
The following table describes each option:
CommandDescription
Start Vend Session 0Starts a session (a transaction) with product code 0.
Cancel SessionCancels the transaction from the peripheral’s end. Can be sent up until the consumer’s card has been approved.
Close Session 0Only relevant in multisession. Closes the session (settles it) at the end of a transaction.
Info SessionRetrieves card details (BIN, PAN-HASH, 4 digits) without charging the consumer or vending a product
Check balanceRelevant only for the Japanese market (TMN)
Query opened sessionsGives information about which sessions are currently open. This option is relevant from 4.0.0.22 and above.
Query reader stateGives information about whether the reader is enabled (1)/ disabled (0). This option is Relevant from 4.0.0.22 and above.
Cash saleSimulates cash sale.
AlertSends an alert to the DCS. It can be seen in Last Alerts.
Select brandRelevant only for the Japanese market and firmware version. When selected prior to starting a transaction and then selecting a product, the desired brand selection would take place (without going into the brand selection screen). In order for the peripheral to know which brands are set on the device’s end, the devices sends the brands information during the pairing process
transfer custom transaction_idAllows the customer to send a custom transaction ID. Needs to be sent during an ongoing transaction process (before or after the authorization)
Display messageCurrently, this option is not available.
Open socketFor the peripheral, use Nayax’s modem for its own needs.
Close socketCloses the socket which was opened for the peripheral.
UI controlTests the Display Control feature. Needs configurations in Nayax Core.
Marshall parserIrrelevant, an internal testing tool
QuitQuits the simulator program.

Transaction Flow Examples

Below are examples of the flow for each transaction type:
  1. Regular Transaction (Single Session):
    1. Start a session: with [0]: Start session.
    2. Present card, wait for authorization and “Thank you” screen.
  2. Multi-Session Transaction:
    1. Start a session with [0]: Start session 0.
    2. Present card, wait for authorization and “Thank you” screen.
    3. Close the relevant session- in this case, use [2]: Close Session 0.

See Also