Multi-Session

The Multi-Session payment flow separates the consumer interaction into two distinct parts:

  1. Product selection.
  2. Authorization and settlement of the consumer’s card.

This differs from the Single-Session flow, in which settlement is performed immediately after product selection and authorization.

📘

Authorization and settlement can occur anywhere between 1 minute and 23 hours after initiating a transaction.

Why Use Multi-Session

The Multi-Session flow enables you to manage multiple concurrent transactions on a single device. It is ideal for peripherals with longer transaction times or those that serve several consumers simultaneously.

Concurrent Transactions

This flow is applicable in environments such as EV chargers, where multiple consumers may use the same station simultaneously but require independent payment processing.

Longer Transaction Times

Multi-Session is also helpful when the vending process is longer than the standard 4 minutes and 15 seconds.

The flow allows the peripheral to notify the Nayax Device that vending can begin immediately after the card is authorized. The Nayax Device then waits for a later update from the peripheral regarding the final vend status or service stop, which enables settlement.

Quicker Credit Release

The Multi-Session flow functions technically as a Pre-Selection flow. For some acquirers, this architecture can lead to a quicker release of captured credit than the Single-Session flow with Pre-Authorization.

If you use Single-Session with Pre-Authorization, the authorized credit amount may take days or weeks to be released, which can confuse consumers who may think they were charged the full Pre-Authorization amount. Multi-Session helps mitigate this issue.

Payment Flow

The diagrams below illustrate the sequence of events within the Multi-Session payment flow.

📘

In this flow there are two parts to the transaction process, therefore the are two separate diagrams, one for each step.

Below is a breakdown of the diagram:

  1. The Nayax Device sends a message to the consumer: "Please Select a Product."
  2. The consumer selects a product for the vending machine.
  3. The peripheral's SDK sends a vending request to the Nayax Device:
    vmc_vend_vend_request(vend_session_t *session)
    vmc_instance.vend.vend_request(session);
    m_vmc.vend.vend_request(m_sessions[m_active_session]);
  4. The Nayax Device sends a message to the consumer: "Please Present Card."
  5. The consumer 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 peripheral's SDK handles transaction data received from the Nayax Device via Transfer Data (said data includes information about the Nayax transaction ID and the consumer's card details):
    vmc_vend_event_handler_cb(vm_vend_event_on_transaction_info)
    vend_callbacks(onTransactionInfo(data))
    vmc_vend_events()
    (via onTransactionInfo(data))
  11. The SDK triggers "Vend Approved" events:
    vmc_vend_event_handler_cb(vm_vend_event_on_vend_approved)
    vend_callbacks()
    (via onVendApproved(session))
    vmc_vend_events()
    (via onVendApproved(session))
  12. The peripheral starts dispensing the product/ providing the service to the consumer.
  13. The SDK reports "vend success":
    vmc_vend_vend_status(&session, __true)
    vmc_vend_events()
    (via onVendApproved(session) -which would return "true")
    vmc_vend_events()
    (via onVendApproved(session) -which would return "true")
    and completes the vend session:
    vmc_vend_vend_session_complete_lowlevel()
    no such function in C# or Java due to the nature of the languages
    no such function in C# or Java due to the nature of the languages
  14. The first part of the transaction ends.
  1. The machine finishes dispensing the product/providing the service.
  2. Vending machine SDK settles the transaction (session):
    vmc_vend_session_close(session)
    vmc_instance.vend.session_close(session)
    m_vmc.vend.session_close(session)
  3. The Nayax Server forwards the settlement request to the Billing Provider.
  4. The Billing Provider sends a settlement response (OK) to the Nayax Server.
  5. Nayax Server returns the settlement response (OK) to the Nayax Device.
  6. The peripheral's SDK receives a status command regarding the settlement (whether the device was able to settle it or not) and triggers a "settlement" event:
    vmc_vend_event_handler_cb(vm_vend_event_on_settlement)
    vmc_vend_events()
    (via onSettlement(success) -which would return "true")
    vmc_vend_events()
    (via onSettlement(success) -which would return "true")
  7. Vending machine SDK transfers data and triggers a "transaction info" event:
    vmc_vend_event_handler_cb(vm_vend_event_on_transaction_info)
    vmc_vend_events()
    (via onTransactionInfo(data))
    vmc_vend_events()
    (via onTransactionInfo(data))
  8. Message to the consumer: "Thank you & Goodbye."

See also