> ## Documentation Index
> Fetch the complete documentation index at: https://devzone.nayax.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DynamicQR

DynamicQR codes enable customers to complete payments by scanning the code with their mobile device, but with an added layer of security generating a unique code for each transaction, ensuring the QR code cannot be reused, making it ideal for high-value or secure transactions.

## How it works

The image below describes the typical usage flow of DynamicQR.

<Frame>
  <img src="https://mintcdn.com/nayax-44d6e37b/1pW0jXOF4OhjjY4f/images/docs/cortina-dynamicqr/image1.png?fit=max&auto=format&n=1pW0jXOF4OhjjY4f&q=85&s=3ca6f4a58404a60d24e20fd18bbd799b" alt="" width="1425" height="700" data-path="images/docs/cortina-dynamicqr/image1.png" />
</Frame>

Where:

1. The customer starts by selecting a product.
2. The customer chooses the QR payment option.
3. The device presents the generated QR code.
4. The customer scans this code to initiate the payment.
5. The payment is processed and approved.

<Warning>
  **Pre-Selection Only**

  Cortina Dynamic QR currently only supports Pre-Selection transaction types.
</Warning>

## Pre-Selection Flow

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 (the numbers inside the brackets relate to the different sources of timeout):

<Frame>
  <img src="https://mintcdn.com/nayax-44d6e37b/O8iZpHGXniXe_r1U/images/docs/cortina-dynamicqr/Cortina%20Dynamic%20QR.png?fit=max&auto=format&n=O8iZpHGXniXe_r1U&q=85&s=f85f669a7eafea8914f5f654e9775abf" width="2370" height="2470" data-path="images/docs/cortina-dynamicqr/Cortina Dynamic QR.png" />
</Frame>

The steps in this process are as follows:

1. The consumer presents a means of payment at the machine, selecting QR.
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 a Cortina Transaction Initiation request to the Nayax Server.
5. The Nayax Server sends a /Start Session request to the Integrator via the [Start Session](/reference/cortina/cortina/post-start-session) endpoint, and the Integrator returns a Start Session Response Success.
6. The Nayax Server sends a GenerateQR (Amount, Channel) request to the Integrator using the [DynamicQR GenerateQR](/reference/cortina/dynamicqr/cortina-dynamicqr-generateqr) endpoint.
7. The Integrator returns a Response including the QR code data to the Nayax Server.
8. The Nayax Server sends the QR Command Response to the Nayax Device, which then shows the QR code.
9. Once the user scans the QR and confirms via mobile, the Nayax Device sends a QR Payment Command Request to the Nayax Server.
10. The Nayax Server sends an Inquiry (Transaction ID) to the Integrator using the [DynamicQR Inquiry](/reference/cortina/dynamicqr/cortina-dynamicqr-inquiry) endpoint.
11. The Integrator returns the Response Status (Approved/Pending) to the Nayax Server.
12. The Nayax Server sends the QR Payment Command Response to the Nayax Device.
13. The Nayax Device sends a Vend Approved command to the Operator Service Machine.
14. The Operator Service Machine dispenses the product and sends a Vend Success notification to the Nayax Device.
15. The Nayax Device sends the Settlement Command to the Nayax Server.
16. The Nayax Server returns the Settlement Command Response (Always Approved) to the Nayax Device, which then displays a "Thank you" message.
