---
title: "performTransactionInWiredMode(using:instanceAID:)"
framework: secureelementcredential
role: symbol
role_heading: Instance Method
path: "secureelementcredential/credentialtransaction/performtransactioninwiredmode(using:instanceaid:)"
---

# performTransactionInWiredMode(using:instanceAID:)

Enters wired mode to perform a transaction.

## Declaration

```swift
func performTransactionInWiredMode(using credential: Credential, instanceAID: Data) async throws
```

## Parameters

- `credential`: The installed credential to enter wired mode with.
- `instanceAID`: The instance applet instance identifier of the installed credential to authorize.

## Mentioned in

Accessing and using secure element credentials

## Discussion

Discussion After you call this method, the system shows an authorization screen to the person using the app. If they choose to authorize, the specified instance receives an authentication token. The instance receives this token through the broker interface on the Secure Element as described in the Apple Business Register Secure Element documents. If the person using the app declines the authorization, the session throws CredentialSession.ErrorCode.accessDenied. You can call this method in any session state. The state transitions to CredentialSession.State.wired(credential:) if successful. If an error occurs, the state is unchanged, unless the error is CredentialSession.ErrorCode.resourceUnavailable, which transitions the state back to CredentialSession.State.management. The caller must invoke invalidate() after completing each transaction.

## See Also

### Performing transactions

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