Multi-Session
The Marshall Multi-session payment flow consists of 2 separate parts:
- Product selection.
- Authorization and settlement of the consumerās card.
Unlike the Single-session flow, in which the settlement is done right after the product selection and authorization.
Authorization and settlement occur anywhere between 1 minute and 23 hours after initiating a transaction.
This flow enables you to manageĀ multiple concurrent transactions. It is applicable in peripherals such as EV chargers, where several consumers use the same station simultaneously but use different pumps and require independent payment processing. In addition, it isĀ helpful in cases where the vending process is on the longer sideĀ (longer than 4 minutes and 15 seconds), as the Nayax Device would not expect the transaction to settle right after the peripheral lets it vend the product and changes the vend status during the settlement stage. This means the peripheral can start notifying the Nayax Device that it can begin providing the product/service right after the cardās authorization. Still, if something happens, such as the vending being unsuccessful or service stopping, the peripheral can notify the Nayax Device afterward.
Another use for Multi-session is that it behaves similarly to the Single session with Pre-Authorization flow. In Multi-session, the transaction process starts with authorization for the highest amount the peripheral would be willing to charge the consumer. The final price at the settlement stage can be equal to or lower than this price. The reason to use Multi-session over Single session with Pre-Authorization is that for some acquirers, the fact that Multi-session flow is technically a Pre-Selection flow wouldĀ sometimes allow for quicker release of the captured credit- the credit that the consumerās card was authorized for, and can take days or even weeks in some cases to be released. Meaning the final price may take quite some time to update on the acquirerās end, and during that timeframe, the consumer may think he was charged for the full authorization amount, even if that wasnāt the case.
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:
- The Nayax Device sends a message to the consumer: "Please Select a Product."
- The consumer selects a product for the vending machine.
- 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]); - The Nayax Device sends a message to the consumer: "Please Present Card."
- The consumer presents their payment card.
- The Nayax Device sends an authorization request to the Nayax Server.
- The Nayax Server forwards the authorization request to the Billing Provider.
- The Billing Provider sends an authorization response (approved) to the Nayax Server.
- The Nayax Server sends the authorization response (approved) back to the Nayax Device.
- 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)) - 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)) - The peripheral starts dispensing the product/ providing the service to the consumer.
- The SDK reports "vend success":
and completes the vend session:
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")vmc_vend_vend_session_complete_lowlevel()no such function in C# or Java due to the nature of the languagesno such function in C# or Java due to the nature of the languages
- The first part of the transaction ends.
- The machine finishes dispensing the product / providing the service.
- Vending machine SDK settles the transaction (session):
vmc_vend_session_close(session)vmc_instance.vend.session_close(session)m_vmc.vend.session_close(session) - The Nayax Server forwards the settlement request to the Billing Provider.
- The billing Provider sends a settlement response (OK) to the Nayax Server.
- Nayax Server returns the settlement response (OK) to the Nayax Device.
- 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") - 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)) - Message to the consumer: "Thank you & Goodbye."
See also
Updated 6 days ago