---
title: "forMetadata(_:completion:)"
framework: passkit
role: symbol
role_heading: Type Method
path: "passkit/pkaddidentitydocumentconfiguration/formetadata(_:completion:)"
---

# forMetadata(_:completion:)

Returns the identity document configuration.

## Declaration

```swift
class func forMetadata(_ metadata: PKIdentityDocumentMetadata, completion: @escaping @Sendable (PKAddIdentityDocumentConfiguration?, (any Error)?) -> Void)
```

```swift
class func forMetadata(_ metadata: PKIdentityDocumentMetadata) async throws -> PKAddIdentityDocumentConfiguration
```

## Parameters

- `metadata`: The configurable metadata that defines the required information to add the corresponding pass to Wallet.
- `completion`: Returns the identity document configration.

## See Also

### Setting the metadata

- [metadata](passkit/pkaddidentitydocumentconfiguration/metadata.md)
