---
title: "QES (Qualified Electronic Signature)"
url: "https://developer.incode.com/sdk-reference/module-qes/"
section: "sdk-reference"
group: "iOS SDK / iOS Individual Modules"
version: "v1.1"
status: "live"
---
# QES (Qualified Electronic Signature)

The QES (Qualified Electronic Signature) module shows the user documents to sign, collects their consent, and captures a Qualified Electronic Signature (QES), the highest-assurance electronic signature under the [EU eIDAS Regulation](https://eur-lex.europa.eu/eli/reg/2014/910/oj/eng). A qualified certificate from a Qualified Trust Service Provider (QTSP) backs the signature, making it legally equivalent to a handwritten signature across EU member states.

For an overview of this module and how it works, see [Qualified Electronic Signature](/features-and-modules/qualified-electronic-signature/).

How you use this module depends on your integration pattern. When the app defines the steps in code, you add the module to an `IncdOnboardingFlowConfiguration` as shown below; when the flow is defined in Dashboard, you reference it by ID. See [Integration Approaches](/sdk-reference/ios-flow-configuration/).

**Availability:** All variants.

## Add QES

1. Add identity check modules before QES. [ID Capture](/sdk-reference/module-id-scan/), [Phone](/sdk-reference/module-phone/), and [Selfie](/sdk-reference/module-selfie/) must come before QES when included in the flow.
2. Add the module with `addQes()`.
   ```swift
   flowConfig.addQes(configuration: QESConfiguration(uploadDocument: true, downloadDocument: true))
   ```

QES uses the Incode Design System V2 experience.

## Configuration Options

Configure the module by passing a `QESConfiguration` to `addQes(configuration:)`.

| Option             | Type      | Description                                                                |
| ------------------ | --------- | -------------------------------------------------------------------------- |
| `downloadDocument` | `Bool?`   | When `true`, offers the signed document for download. Defaults to `false`.                         |
| `providerCode`     | `String?` | The QTSP provider code used for the signature. Optional.                                           |
| `uploadDocument`   | `Bool?`   | When `true`, lets the user select and upload a PDF before the signing screen. Defaults to `false`. |

When `uploadDocument` is enabled, the user picks and uploads a PDF before the signing screen. `providerCode` selects the qualified signature provider for the session: for example, `QES_3` for Namirial. It is normally supplied by the Flow configuration in Dashboard.

## Provider Behavior

For Namirial (`providerCode`: `QES_3`), the back end supplies the consent checkbox labels. The Terms & Conditions and Privacy Policy appear as links on the Review and Sign screen; the previous separate Terms & Conditions screen is no longer shown. After signing, the module displays the signer's name and signing date.

If signing fails, the module shows "Signature failed". The back-end reason determines if the user can retry. An expired signing certificate can be retried. Mismatched or missing identity data and signing-provider failures close the module because retrying cannot resolve them.



## Result

`onQESCompleted` is called regardless of the outcome, and the user continues with any modules configured after QES.

```swift
func onQESCompleted(result: QESResult)
```

`QESResult` fields:

- `success: Bool`: `true` if the documents were signed successfully.
- `error: QESError?`: The signing error, or `nil` if there was no error.

`QESError` cases:

- `noDocuments`: No documents were available for the session.
- `failedToSign`: Signing failed.

<br />