---
title: "checkCanRequestDocument(_:completion:)"
framework: passkit
role: symbol
role_heading: Instance Method
path: "passkit/pkidentityauthorizationcontroller/checkcanrequestdocument(_:completion:)"
---

# checkCanRequestDocument(_:completion:)

Returns whether an identity document is available to request.

## Declaration

```swift
func checkCanRequestDocument(_ descriptor: any PKIdentityDocumentDescriptor, completion: @escaping @Sendable (Bool) -> Void)
```

```swift
func canRequestDocument(_ descriptor: any PKIdentityDocumentDescriptor) async -> Bool
```

## Parameters

- `descriptor`: The object that describes the document the app requests.
- `completion`: The callback the system invokes after determining whether you can request the document you describe.

## Mentioned in

Requesting identity data from a Wallet pass

## Discussion

Discussion This method checks whether you have the correct entitlements and if the device has an ID in the Wallet app. // Check whether the app can request the document. controller.checkCanRequestDocument(descriptor) { canRequest in     if canRequest {         // Show the identity button for triggering the request.     } else {         // Hide the request button.     } }

## See Also

### Requesting a document

- [requestDocument(_:completion:)](passkit/pkidentityauthorizationcontroller/requestdocument(_:completion:).md)
