---
title: VerifyIdentityWithWalletButton
framework: passkit
role: symbol
role_heading: Structure
path: passkit/verifyidentitywithwalletbutton
---

# VerifyIdentityWithWalletButton

A type that displays a button to present the identity verification flow.

## Declaration

```swift
@MainActor @preconcurrency struct VerifyIdentityWithWalletButton<Fallback> where Fallback : View
```

## Overview

Overview Use this structure as the SwiftUI equivalent to PKIdentityButton. The system allows one in-progress identity request at a time. Otherwise, it returns a PKIdentityError.Code.requestAlreadyInProgress error. This example shows an implementation of the Verify Identity with Wallet button. For more information, see Requesting identity data from a Wallet pass. // Create an identity request. func createRequest() -> PKIdentityRequest {     let descriptor = PKIdentityDriversLicenseDescriptor()     descriptor.addElements([.age(atLeast: 18)],                             intentToStore: .willNotStore)     descriptor.addElements([.givenName, .familyName, .portrait],                             intentToStore: .mayStore(days: 30))

let request = PKIdentityRequest()     request.descriptor = descriptor     // The merchant ID you configured in your Apple Developer account.     request.merchantIdentifier = <YOUR_MERCHANT_ID>      // The nonce your server generates.     request.nonce = <YOUR_NONCE_VALUE>  } // Show the Verify Identity with Wallet button and handle the identity request result. @ViewBuilder var verifiyIdentityButton: some View {     VerifyIdentityWithWalletButton(         .verifyIdentity,         request: createRequest(),     ) { result in         switch result {         case .success(let document):             // Securely transfer the document to the server for decryption and verification.         case .failure(let error):             switch error {             case PKIdentityError.cancelled:                 // Handle the cancellation error.             default:                 // Handle other errors.             }         }     } fallback: {         // Verify the person's identity another way.     } }

## Topics

### Creating the button

- [init(_:action:)](passkit/verifyidentitywithwalletbutton/init(_:action:).md)
- [init(_:request:onCompletion:)](passkit/verifyidentitywithwalletbutton/init(_:request:oncompletion:).md)
- [init(_:request:onCompletion:fallback:)](passkit/verifyidentitywithwalletbutton/init(_:request:oncompletion:fallback:).md)

## Relationships

### Conforms To

- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [View](swiftui/view.md)

## See Also

### Identity sheet interactions and authorization

- [PKIdentityAuthorizationController](passkit/pkidentityauthorizationcontroller.md)
- [PKIdentityRequest](passkit/pkidentityrequest.md)
- [PKIdentityDocument](passkit/pkidentitydocument.md)
- [PKIdentityElement](passkit/pkidentityelement.md)
- [PKIdentityButton](passkit/pkidentitybutton.md)
- [VerifyIdentityWithWalletButtonLabel](passkit/verifyidentitywithwalletbuttonlabel.md)
- [VerifyIdentityWithWalletButtonStyle](passkit/verifyidentitywithwalletbuttonstyle.md)
