---
title: "performTransaction(using:options:)"
framework: secureelementcredential
role: symbol
role_heading: Instance Method
path: "secureelementcredential/credentialtransaction/performtransaction(using:options:)"
---

# performTransaction(using:options:)

Prompts the user for authorization and then activates a credential for card emulation.

## Declaration

```swift
func performTransaction(using credential: Credential, options: CardEmulationOptions = .init()) async throws
```

## Parameters

- `credential`: The credential to activate and transition into card emulation state.
- `options`: The options to activate the credential with, defaults to none.

## Mentioned in

Accessing and using secure element credentials

## Discussion

Discussion If this call succeeds, the session state trasitions to CredentialSession.State.cardEmulation(credential:). Card emulation ends after 60 seconds, at which point the the event stream publishes a CredentialSession.Event.cardEmulationTimeout event. If you complete your transaction before the timeout, call endCardEmulation() to exit card emulation mode. The caller needs to invoke invalidate() after completing each transaction. important: Calling this method may generate a billable event to the credential provider.

## See Also

### Performing transactions

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