Skip to main content
Prepaid card transactions work similarly to credit card payments but are used with pre-loaded cards. These cards do not require a connection to a bank account, making them ideal for closed-loop systems such as gift cards or loyalty cards. Prepaid cards are validated during the transaction, ensuring sufficient funds are available for the purchase. Cortina supports two types of prepaid card transaction flows:
  • Pre-selection
  • Pre-authorization
Both flows involve interactions between various components, including the CardHolder, Nayax Device, Machine (MDB), Nayax Engine, and Integrator. See the sections below for more details on each flow.

Pre-Selection

The Pre-selection flow simplifies the payment process by merging the steps of product/service selection and authorization into a single transaction. This flow is typically used for low-value or quick transactions, where the customer’s selection and payment authorization are handled together in one step. See the diagram below:
![](/images/docs/prepaid-card-flows/Cortina V2 External Prepaid API - Pre-selection.png)
The steps in this process are as follows:
  1. The card holder presents a card (Insert, tap, or swipe) to the Nayax Device.
  2. The Nayax Device sends a Begin Vending Session (Default, credit…) command to the Operator Service Machine.
  3. The user selects a product, and the Operator Service Machine sends a Vend Request (Code, price…) to the Nayax Device.
  4. The Nayax Device sends an Authorization Command Request to the Nayax Server.
  5. The Nayax Server sends a /Start Session request to the Payment Provider via the Start Session endpoint.
  6. The Nayax Server sends a /Sale request (default, credit…) to the Payment Provider via the Prepaid Sale endpoint.
  7. The Nayax Server returns an Authorization Command Response (Approved) to the Nayax Device.
  8. The Nayax Device sends a Vend Approved command to the Operator Service Machine.
  9. The Operator Service Machine dispenses the product and sends a Vend Success notification to the Nayax Device.
  10. The Nayax Device sends a Settlement Command Request to the Nayax Server.
  11. (Optional) The Nayax Server sends a /SaleEndNotification (TransactionID…) to the Payment Provider via the Sale End Notification endpoint.
  12. The Nayax Server returns a Settlement Command Response (Always Approved) to the Nayax Device, which then displays a “Thank you” message.
This response is typically always approved in this flow, as the authorization has already been granted.

Exception Handling

In the event of a failure at any critical junction (marked with a black circle in the diagram), the transaction is terminated. Because the payment occurs before the product is dispensed in this flow, specific Void logic is required to ensure customers are not charged for failed dispenses.
ScenarioDiagram Step ReferenceTechnical Resolution
Selection Timeout3.bOccurs if the user fails to choose a valid product within the machine’s allowed timeframe. The session is closed before any payment is initiated.
Start Session Failed5.bOccurs if the /Start Session request fails or times out. The transaction is aborted before the Sale request.
Sale Request Failed6.bIf the /Sale request fails, returns an error, or receives a 992 response code, the session is aborted. In cases of a gateway timeout, the Prepaid Void endpoint is triggered with the flag isGatewayTimeout: True.
Vend Failed9.bIf the machine fails to dispense the product after payment is authorized, the Nayax Engine triggers the Prepaid Void endpoint to reverse the charge.
Notification Failure11.bOccurs if the optional /SaleEndNotification fails. As this is a reporting step, the transaction on the device is usually finalized, but the error is logged for reconciliation.
For a comprehensive list of financial response codes and authorization failures, refer to the Prepaid Card Decline Reasons page.

Pre-Authorization

The Pre-authorization flow is used for transactions that require a two-step process. First, a session is initiated, followed by an authorization check. This flow ensures the transaction is valid and the customer has sufficient funds on the prepaid card before settlement. See the diagram below:
[!](/images/docs/prepaid-card-flows/Cortina V2 External Prepaid API - Pre-auth.png)
Where:
  1. The card holder presents a card (Insert, tap, or swipe) to the Nayax Device.
  2. The Nayax Device sends an Authorization Command Request to the Nayax Server.
  3. The Nayax Server sends a /Start Session request to the Payment Provider via the Start Session endpoint.
  4. The Payment Provider returns a Start Session Response Success to the Nayax Server.
  5. The Nayax Server sends an /Authorization request (default amount) to the Payment Provider via the Prepaid Authorization endpoint.
  6. The Nayax Server returns an Authorization Command Response (Approved) to the Nayax Device.
  7. The Nayax Device sends a Begin Vending Session (Default Code…) command to the Operator Service Machine.
  8. The user selects a product, and the Operator Service Machine sends a Vend Request (Code, price…) to the Nayax Device.
  9. The Nayax Device sends a Vend Approved (Always approved) response to the Operator Service Machine.
  10. The product is dispensed, and the Operator Service Machine sends a Vend Success notification to the Nayax Device.
  11. The Nayax Device sends a Settlement Command to the Nayax Server.
  12. The Nayax Server sends a /Settlement request (Final Amount) to the Payment Provider via the Prepaid Settlement endpoint.
  13. The Nayax Server returns a Settlement Command Response (Approved) to the Nayax Device, which then displays a “Thank you” message.

Exception Handling

In the event of a failure at any critical junction (marked with a black circle in the diagram), the transaction is terminated. The following table outlines the recovery actions taken by the Nayax Engine:
ScenarioDiagram Step ReferenceTechnical Resolution
Start Session Failed4.bOccurs if the /Start Session request times out or returns an error. The session is aborted immediately.
Authorization Failed5.bOccurs if the provider denies the default credit amount. The transaction is terminated.
Selection Timeout8.bOccurs if the user fails to choose a valid product within the machine’s allowed timeframe.
Vend Failed10.bIf the machine fails to dispense (e.g., jam), the system triggers the Prepaid Cancel endpoint to release the Pre-Authorization and the transaction.
Settlement Failed12.bOccurs if the final settlement request fails or times out. This requires system logging for manual reconciliation.
Timeout / VoidN/AIf no Sale Response is received within the timeout period, or a 992 response code is received- the Prepaid Void endpoint is triggered.
For a comprehensive list of financial response codes and authorization failures, refer to the Prepaid Card Decline Reasons page.