---
title: CredentialTransaction
framework: secureelementcredential
role: symbol
role_heading: Class
path: secureelementcredential/credentialtransaction
---

# CredentialTransaction

A transaction object for performing wired and contactless operations in SwiftUI views.

## Declaration

```swift
class CredentialTransaction
```

## Mentioned in

Accessing and using secure element credentials

## Overview

Overview Use the transactionTask(_:action:) view modifier to create a task for working with a credential. The action closure receives a CredentialTransaction instance that it can perform actions on. You can call the methods of CredentialTransaction and CredentialTransaction.Configuration from both apps and app extensions. warning: Don’t import UIKit in any file that imports this type. This causes ambiguity resolving the SecureElementCredential framework’s SwiftUI and UIKit symbols.

## Topics

### Configuring transactions

- [CredentialTransaction.Configuration](secureelementcredential/credentialtransaction/configuration.md)

### Performing transactions

- [performTransaction(using:options:)](secureelementcredential/credentialtransaction/performtransaction(using:options:).md)
- [performTransactionInWiredMode(using:instanceAID:)](secureelementcredential/credentialtransaction/performtransactioninwiredmode(using:instanceaid:).md)
- [performCardEmulationTransactionWithCurrentCredential(options:)](secureelementcredential/credentialtransaction/performcardemulationtransactionwithcurrentcredential(options:).md)

### Supporting types

- [Credential](secureelementcredential/credential.md)
- [CardEmulationOptions](secureelementcredential/cardemulationoptions.md)
