Single Session with Pre-Selection

Pre-selection is a vending machine payment process in which the customer first selects a product before initiating payment. In this flow, the vending machine remains idle, waiting for product selection. Once the user chooses a product, the payment terminal requests card authorization and, upon approval, dispenses the product. This method ensures a smooth, secure transaction by separating product selection from payment authorization within a single vending session.

Single Session Flow

See the diagram below:

Where:

  1. Message to Card Holder: "Please Select a Product."
  2. The cardholder selects a product for the vending machine.
  3. The vending machine SDK sends a vending request (vmc_vend_vend_request(vend_session_t *session)) to the Nayax Device.
  4. Message to Card Holder: "Please Present Card."
  5. Card Holder presents their payment card.
  6. The Nayax Device sends an authorization request to the Nayax Server.
  7. The Nayax Server forwards the authorization request to the Billing Provider.
  8. The Billing Provider sends an authorization response (approved) to the Nayax Server.
  9. The Nayax Server sends the authorization response (approved) back to the Nayax Device.
  10. The vending machine SDK handles transaction data (vmc_vend_event_handler_cb(vm_vend_event_on_transaction_info)).
  11. The SDK triggers vend approved events (vmc_vend_event_handler_cb(vm_vend_event_on_vend_approved)).
  12. The vending machine dispenses the product.
  13. The SDK reports vend success (vmc_vend_vend_status(&session, __true)) and completes the vend session (vmc_vend_vend_session_complete_lowlevel()).
  14. Message to Card Holder: "Please Take Product."
  15. The Nayax Device sends a settlement request to the Nayax Server.
  16. The Nayax Server forwards the settlement request to the Billing Provider.
  17. The Billing Provider sends a settlement response (OK) to the Nayax Server.
  18. The Nayax Server returns the settlement response (OK) to the Nayax Device.
  19. The vending session ends.
  20. Message to Card Holder: "Thank you & Goodbye."