QR Code Scanning

Some invoices have a QR code that allows the user to get the payment data just by scanning it from the camera screen. Scanning and processing happens automatically. When a supported QR code is detected with valid payment data, white camera frame will turn into the green color with proper message that QR code is detected.

If the QR code does not have a supported payment format, white camera frame will turn into the yellow color with proper message that QR code is not supported.

Please find the list of the supported QR codes.

Enable QR code scanning

The QR code scanning feature is disabled by default, so in case that you what to use it you just need to enable it in the GiniConfiguration, like so:

    let giniConfiguration = GiniConfiguration.shared
    ...
    ...
    ...     
    giniConfiguration.qrCodeScanningEnabled = true

For activating QR code-only mode without the ability to take images, you need to enable the flag in the GiniConfiguration, but also the QR scanning ability, like so:

    let giniConfiguration = GiniConfiguration.shared
    ...
    ...
    ...        
    giniConfiguration.qrCodeScanningEnabled = true
    giniConfiguration.onlyQRCodeScanningEnabled = true

During QR Code only mode the capture and import controls will be hidden from the camera screen.

Handle and process the Payment Data

Once the QR code has been detected, processing will happen automatically and the payment data will be returned. In order to handle the Payment Data from the QR code: the GiniQRCodeDocument is received in the delegate method GiniCaptureDelegate.didCapture(document:), where it must be sent to the API as though it was an image or a pdf.

Customization

All customization options are available in here.

Supported QR codes

The supported QR codes are: