> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/nfc-wallet-sdk-ios/implement-nfc-wallet/make-payments/implement-contactless-payment/2.-manage-the-default-payment-application.md).

# 2. Manage the default payment application

The default payment application is launched when the end user performs a [double-click](/nfc-wallet-sdk-ios/implement-nfc-wallet/make-payments/implement-contactless-payment.md#double-click) or [field-detect](/nfc-wallet-sdk-ios/implement-nfc-wallet/make-payments/implement-contactless-payment.md#field-detect) action.

The double-click payment experience can be enabled or disabled by the end user.

<figure><img src="/files/fzRcMg1gwwWKQG7kQa12" alt="" width="563"><figcaption><p>End-user settings for the default payment application</p></figcaption></figure>

If your application receives the NFC launch events below when the end user performs a double-click or field-detect action, it indicates that your payment application is set as the default payment application.

{% code expandable="true" %}

```swift
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
        
    // to support initiate contactless payments by double-click or field-detect action 
    // when application is not running + application is the default payment application
    func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
        
        if #available(iOS 17.4, *) {
            if let nfcEvent = connectionOptions.nfcEvent {
                switch nfcEvent {
                case .presentation:
                    // use case for double-click
                    break
                case .readerDetected:
                    // use case for field-detect
                    break
                @unknown default: break
                }
            }
        }
    }

}


extension SceneDelegate: NFCWindowSceneDelegate {
    @available(iOS 17.4, *)
    // to support initiate contactless payments by double-click or field-detect action when application is background or foreground and is the default payment application
    func windowScene(_ windowScene: UIWindowScene, didReceiveNFCWindowSceneEvent event: NFCWindowSceneEvent) {
        switch event {
        case .presentation:
            // use case for double-click
            break
        case .readerDetected:
            // use case for field-detect
            break
        @unknown default: break
        }
    }
}
```

{% endcode %}

{% hint style="info" %}
You can still perform a contactless payment when the application is not set as the default payment application. However, a double-click or field-detect action may bring the default application to the foreground.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.payments.thalescloud.io/nfc-wallet-sdk-ios/implement-nfc-wallet/make-payments/implement-contactless-payment/2.-manage-the-default-payment-application.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
