### GET content(for:) Source: https://developer.apple.com/documentation/proximityreader/proximityreaderdiscovery/contentlist Fetches specific content for a defined topic within the ProximityReaderDiscovery framework. ```APIDOC ## GET content(for:) ### Description Fetches the content associated with a specific `ProximityReaderDiscovery.Topic`. ### Method GET ### Endpoint ProximityReaderDiscovery.content(for: Topic) ### Parameters #### Path Parameters - **topic** (ProximityReaderDiscovery.Topic) - Required - The specific topic to retrieve content for. ### Request Example content(for: .paymentTerminal) ### Response #### Success Response (200) - **content** (ProximityReaderDiscovery.Content) - The content object for the requested topic. #### Response Example { "topic": "paymentTerminal", "data": "..." } ``` -------------------------------- ### GET contentList Source: https://developer.apple.com/documentation/proximityreader/proximityreaderdiscovery/contentlist Retrieves the list of available content structures for the current device based on its region. ```APIDOC ## GET contentList ### Description Retrieves an array of `ProximityReaderDiscovery.Content` structures available for the current device's country. This property is used to display topics not covered by the standard `Topic` enum. ### Method GET ### Endpoint ProximityReaderDiscovery.contentList ### Parameters None ### Request Example N/A (Property access) ### Response #### Success Response (200) - **contentList** (Array) - A list of available content structures. #### Response Example [ { "id": "topic_1", "title": "Example Topic" } ] ``` -------------------------------- ### Configure VASRequest for Loyalty Passes Source: https://developer.apple.com/documentation/proximityreader/accepting-loyalty-passes-from-wallet Demonstrates how to initialize VASRequest.Merchant structures to define which loyalty passes to read. This setup allows the app to specify pass identifiers, provisioning URLs, and localized names for the loyalty program. ```Swift let loyaltyPass1 = VASRequest.Merchant(id: "pass.com.example-company.loyaltypass1", url: URL(string: "https://example-company.com/foo/v1/passes/pass.com.example-company.loyaltypass1/"), localizedName: "Example Company Loyalty Pass 1") let loyaltyPass2 = VASRequest.Merchant(id: "pass.com.example-company.loyaltypass2", url: URL(string: "https://example-company.com/foo/v1/passes/pass.com.example-company.loyaltypass2/"), localizedName: "Example Company Loyalty Pass 2") let request = VASRequest(vasMerchants: [loyaltyPass1, loyaltyPass2], localizedVASType: "Example Company Loyalty Program") ``` -------------------------------- ### Initialize MobileDocumentDisplayRequest Source: https://developer.apple.com/documentation/proximityreader/mobiledocumentdisplayrequest/init%28elements%3Aoptions%3A%29 Creates a new mobile document display request with optional elements and options. This initializer is available on iOS, iPadOS, Mac Catalyst, and visionOS starting from version 26.0. It allows customization of the document elements and display options for the request. ```swift init( elements: [MobileDocumentDisplayRequest.Element] = [], options: MobileDocumentDisplayRequest.Options = .init() ) ``` -------------------------------- ### GET /ProximityReader/isSupported Source: https://developer.apple.com/documentation/proximityreader/paymentcardreader/issupported Checks the device capability for Tap to Pay on iPhone. ```APIDOC ## GET isSupported ### Description A Boolean value that indicates whether the current device model supports Tap to Pay on iPhone. This property checks hardware capability (iPhone XS or newer) rather than OS version. ### Method GET ### Endpoint ProximityReader.isSupported ### Parameters None ### Request Example N/A (Static property access) ### Response #### Success Response (200) - **isSupported** (Boolean) - Returns true if the device model is iPhone XS or newer, false otherwise. #### Response Example { "isSupported": true } ``` -------------------------------- ### Configure Mobile Document Reader Session Source: https://developer.apple.com/documentation/proximityreader/mobiledocumentreader/prepare%28using%3A%29 The prepare(using:) method initializes the device for document reading. It takes an optional server-generated token and returns a MobileDocumentReaderSession, throwing an error if configuration fails. ```swift final func prepare(using token: MobileDocumentReader.Token? = nil) async throws -> MobileDocumentReaderSession ``` -------------------------------- ### Get isoCountryCode Property (Swift) Source: https://developer.apple.com/documentation/proximityreader/mobiledriverslicensedatarequest/response/documentelements-swift.struct/issuingauthority-swift.struct/isocountrycode Retrieves the ISO country code of the issuing authority from an identity document. This property is optional and available on iOS, iPadOS, Mac Catalyst, and visionOS starting from version 17.0. ```swift let isoCountryCode: String? ``` -------------------------------- ### Get vehicleCategoryCode - Swift Source: https://developer.apple.com/documentation/proximityreader/mobiledriverslicensedatarequest/response/documentelements-swift.struct/drivingprivilege/vehiclecategorycode Retrieves the vehicle category code associated with a driving privilege. This property is a String and is available on iOS, iPadOS, Mac Catalyst, and visionOS 1.0+ (all starting from iOS 17.0+). ```swift let vehicleCategoryCode: String ``` -------------------------------- ### Configure PaymentCardReader session using Swift Source: https://developer.apple.com/documentation/proximityreader/paymentcardreader/prepare%28using%3A%29 Initializes the Tap to Pay on iPhone pipeline by providing a signed token. This asynchronous method returns a PaymentCardReaderSession upon successful device configuration and validation. ```Swift func prepare(using token: PaymentCardReader.Token) async throws -> PaymentCardReaderSession ``` -------------------------------- ### Define installment payment structure in Swift Source: https://developer.apple.com/documentation/proximityreader/paymentcardtransactionrequest/transactionamountdescription/installment%28_%3Aamount%3Apayments%3A%29 This snippet defines the installment case for a transaction amount description. It requires a payment cycle, the amount per installment, and the total number of payments, applicable only to purchase transaction types. ```swift case installment( PaymentCardTransactionRequest.PaymentCycle, amount: Decimal, payments: Int ) ``` -------------------------------- ### ProximityReader Initialization Source: https://developer.apple.com/documentation/proximityreader/paymentcardreader/options-swift.struct/init%28%29 This section describes how to initialize the ProximityReader, including its default options. ```APIDOC ## init() ### Description Creates a new options structure with default values for the ProximityReader. ### Method `init()` ### Endpoint N/A (This is a constructor method) ### Parameters None ### Request Example ```javascript const reader = new ProximityReader(); ``` ### Response #### Success Response (N/A) This method does not return a value directly but initializes the ProximityReader object. #### Response Example N/A ``` -------------------------------- ### Instance Method: prepare(using:) Source: https://developer.apple.com/documentation/proximityreader/mobiledocumentreader/prepare%28using%3A%29 Configures the device to read mobile documents. This method prepares the device and returns a MobileDocumentReaderSession object for reading documents. It can return an existing session, retrieve a new one, or throw an error. ```APIDOC ## POST /websites/developer_apple_proximityreader/prepare ### Description Configures the device to read mobile documents. This method prepares the device and returns a `MobileDocumentReaderSession` object for reading documents. It can return an existing session, retrieve a new one, or throw an error. ### Method POST ### Endpoint /websites/developer_apple_proximityreader/prepare ### Parameters #### Query Parameters - **token** (MobileDocumentReader.Token) - Optional - An optional reader token generated from your server. ### Request Example ```json { "token": "your_optional_reader_token" } ``` ### Response #### Success Response (200) - **session** (MobileDocumentReaderSession) - The session object used to read mobile documents. #### Response Example ```json { "session": { "id": "session_id_123", "status": "active" } } ``` ### Throws - **MobileDocumentReaderError**: If the method fails to configure the device. ``` -------------------------------- ### Declare MobileDocumentReaderSession Class Source: https://developer.apple.com/documentation/proximityreader/mobiledocumentreadersession This Swift code snippet shows the declaration of the final class MobileDocumentReaderSession. This class is the primary object used to start reading a mobile document and is available on iOS, iPadOS, Mac Catalyst, and visionOS starting from version 17.0. ```swift final class MobileDocumentReaderSession ``` -------------------------------- ### GET PaymentCardReaderSession.ReadError.errorName Source: https://developer.apple.com/documentation/proximityreader/paymentcardreadersession/readerror/errorname Retrieves the name of the error encountered during a PaymentCardReaderSession. ```APIDOC ## GET PaymentCardReaderSession.ReadError.errorName ### Description Returns the name of the error as a String. This property is used to identify specific error types within the ProximityReader framework. ### Method GET ### Endpoint PaymentCardReaderSession.ReadError.errorName ### Parameters None ### Request Example N/A (Instance Property) ### Response #### Success Response (200) - **errorName** (String) - The name of the error. #### Response Example { "errorName": "InvalidCardData" } ``` -------------------------------- ### Presenting Proximity Reader Discovery Content in Swift Source: https://developer.apple.com/documentation/proximityreader/proximityreaderdiscovery This snippet demonstrates how to initialize a ProximityReaderDiscovery object, fetch a specific payment-related help topic, and present the resulting content as a view controller from the current context. ```Swift let proximityReaderDiscovery = ProximityReaderDiscovery() Task { do { let content = try await proximityReaderDiscovery.content(for: ProximityReaderDiscovery.Topic.payment(.howToTap)) try await proximityReaderDiscovery.presentContent(content, from: myCurrentViewController) } catch { // Handle content display errors. } } ``` -------------------------------- ### ProximityReader.prepareStoreAndForward() Source: https://developer.apple.com/documentation/proximityreader/paymentcardreader/preparestoreandforward%28%29 Configures the pipeline for reading payment or loyalty cards in Store and Forward mode. This method verifies device readiness and proper configuration for processing reads in Store and Forward mode. ```APIDOC ## prepareStoreAndForward() ### Description Configures the pipeline for reading payment or loyalty cards in Store and Forward mode. This method verifies that the device is able to read contactless cards and is properly configured to process reads in Store and Forward mode. ### Method `async throws` ### Endpoint N/A (Instance Method) ### Parameters None ### Request Example N/A ### Response #### Success Response - **StoreAndForwardPaymentCardReaderSession** - Returned when the device is successfully configured. #### Response Example ```json { "session": "" } ``` #### Throws - **PaymentCardReaderError** - If the method fails to configure the device. ``` -------------------------------- ### GET PaymentCardReader.Event.name Source: https://developer.apple.com/documentation/proximityreader/paymentcardreader/event/name Retrieves the name of the event associated with the PaymentCardReader. ```APIDOC ## GET PaymentCardReader.Event.name ### Description Returns the name of the event as a string. This property is used to identify the specific type of event triggered by the PaymentCardReader. ### Method GET ### Endpoint PaymentCardReader.Event.name ### Parameters None ### Request Example N/A (Instance Property Access) ### Response #### Success Response (200) - **name** (String) - The name of the event. #### Response Example { "name": "cardReadSuccess" } ``` -------------------------------- ### Example of PaymentCardReaderError Cases - Swift Source: https://developer.apple.com/documentation/proximityreader/paymentcardreadererror/serviceconnectionerror This snippet provides examples of various error cases within the `PaymentCardReaderError` enum, used for handling different scenarios in payment card reading operations. It includes cases like `accountAlreadyLinked`, `accountDeactivated`, and `serviceConnectionError`, showcasing potential error states and their associated data, if any. ```swift case accountAlreadyLinked case accountDeactivated case accountLinkingCancelled case accountLinkingCheckFailed case accountLinkingFailed case accountLinkingRequiresiCloudSignIn case accountNotLinked case backgroundRequestNotAllowed case deviceBanned(Date?) case emptyReaderToken case invalidMerchant case invalidReaderToken(String?) case merchantBlocked case modelNotSupported case networkAuthenticationError case serviceConnectionError ``` -------------------------------- ### Initialize Payment Card Reader with Options (Swift) Source: https://developer.apple.com/documentation/proximityreader/paymentcardreader/init%28options%3A%29 Creates a payment card reader instance using the provided configuration options. It's crucial to maintain a strong reference to the returned object throughout the reader session. This method is available on iOS 15.4+, iPadOS 15.4+, and Mac Catalyst 17.0+. ```swift init(options: PaymentCardReader.Options = .init()) ``` -------------------------------- ### Configure Store and Forward session in Swift Source: https://developer.apple.com/documentation/proximityreader/paymentcardreader/preparestoreandforward%28%29 This method configures the pipeline for reading payment or loyalty cards in Store and Forward mode. It returns a StoreAndForwardPaymentCardReaderSession upon success and throws a PaymentCardReaderError if configuration fails. ```swift func prepareStoreAndForward() async throws -> StoreAndForwardPaymentCardReaderSession ``` -------------------------------- ### Configure PaymentCardReaderSession in Swift Source: https://developer.apple.com/documentation/proximityreader/adding-support-for-tap-to-pay-on-iphone-to-your-app This snippet demonstrates how to initialize a PaymentCardReaderSession by calling the prepare(using:) method. It includes a task to monitor progress events asynchronously and error handling for the configuration process. ```swift extension MyPaymentProcessor { var session: PaymentCardReaderSession? public func configureDevice(tokenData: String) async throws { guard let reader = self.reader else { return } guard let token = PaymentCardReader.Token(rawValue: tokenData) else { return } let events = reader.events do { // Create a task to monitor progress events. Task { @MainActor in for await event in events { if case .updateProgress = event { // Update the UI with the current progress value. } } } // Prepare the device. session = try await reader.prepare(using: token) } catch { // Handle any errors that occur during preparation. // (see PaymentCardReaderError). } } } ``` -------------------------------- ### GET readerInstanceIdentifier Source: https://developer.apple.com/documentation/proximityreader/mobiledocumentreader/configuration-swift.struct/readerinstanceidentifier Retrieves the unique identifier for a specific mobile document reader instance. ```APIDOC ## Property: readerInstanceIdentifier ### Description The `readerInstanceIdentifier` is a unique string identifier assigned to a mobile document reader instance. It is required for tracking and generating reader tokens for the Verifier API. ### Type String ### Availability - iOS 17.0+ - iPadOS 17.0+ - Mac Catalyst 17.0+ - visionOS 1.0+ ### Implementation Example ```swift let readerInstanceIdentifier: String ``` ### Usage This identifier is primarily used when communicating with the Verifier API to authenticate and authorize document reading sessions. ``` -------------------------------- ### Initializer: init(currencyCode:for:) Source: https://developer.apple.com/documentation/proximityreader/paymentcardverificationrequest/init%28currencycode%3Afor%3A%29 Creates a new verification request using the specified currency and reason information for the ProximityReader framework. ```APIDOC ## init(currencyCode:for:) ### Description Creates a new verification request using the specified currency and reason information. This is used to initiate a payment card verification session. ### Method Initializer ### Endpoint PaymentCardVerificationRequest.init(currencyCode:for:) ### Parameters #### Path Parameters - **currencyCode** (String) - Required - The ISO 4217 code for the requested currency type. - **reason** (PaymentCardVerificationRequest.Reason) - Optional - The reason for the verification request, which determines the system UI message. ### Request Example ```swift let request = PaymentCardVerificationRequest(currencyCode: "USD", for: .other) ``` ### Response #### Success Response - **instance** (PaymentCardVerificationRequest) - A new instance of the verification request. #### Error Handling - Throws `PaymentCardReaderSession.ReadError.invalidCurrencyCode` if the currencyCode is an empty string. ``` -------------------------------- ### PaymentCardReader prepare(using:updateHandler:) Source: https://developer.apple.com/documentation/proximityreader/paymentcardreader/prepare%28using%3Aupdatehandler%3A%29 Configures the pipeline for reading payment or loyalty cards. This method verifies device readiness for contactless card transactions. ```APIDOC ## POST /websites/developer_apple_proximityreader/prepare ### Description Configures the pipeline for reading payment or loyalty cards. This method verifies that the device is able to read contactless cards and is properly configured to process transactions. ### Method POST ### Endpoint /websites/developer_apple_proximityreader/prepare ### Parameters #### Request Body - **token** (PaymentCardReader.Token) - Required - Valid and signed token from a participating payment service provider. - **updateHandler** ((PaymentCardReader.UpdateEvent) -> Void)? - Optional - Returns configuration progress or session state change. ### Request Example ```json { "token": "YOUR_SIGNED_TOKEN", "updateHandler": "// function to handle updates" } ``` ### Response #### Success Response (200) - **PaymentCardReaderSession** - An object used to read card information. The session remains active while your app is in the foreground. #### Response Example ```json { "session": "ACTIVE_PAYMENT_CARD_READER_SESSION_OBJECT" } ``` ### Throws - **PaymentCardReaderError** - If the method fails to configure the device. ``` -------------------------------- ### Get Event Name (Swift) Source: https://developer.apple.com/documentation/proximityreader/paymentcardreader/event/name Retrieves the name of the ProximityReader event. This property is read-only and returns a String. ```swift var name: String { get } ``` -------------------------------- ### Prepare device for mobile document reading Source: https://developer.apple.com/documentation/proximityreader/mobiledocumentreader/token This asynchronous function configures the device to begin reading mobile documents using a provided Token instance. ```swift func prepare(using token: MobileDocumentReader.Token?) async throws -> MobileDocumentReaderSession ``` -------------------------------- ### init(id:url:localizedName:) Source: https://developer.apple.com/documentation/proximityreader/vasrequest/merchant/init%28id%3Aurl%3Alocalizedname%3A%29 Initializes a new merchant object for use with ProximityReader VAS requests. ```APIDOC ## POST init(id:url:localizedName:) ### Description Creates a new merchant object with the specified information to be used in a Value Added Services (VAS) request. ### Method Initializer ### Endpoint VASRequest.Merchant.init(id:url:localizedName:) ### Parameters #### Path Parameters - **id** (String) - Required - The merchant’s unique identifier. - **url** (URL?) - Optional - The URL to display if the customer doesn’t belong to the merchant’s loyalty program. - **localizedName** (String?) - Optional - The name of the merchant, localized for the current device. ### Request Example { "id": "merchant_12345", "url": "https://loyalty.example.com", "localizedName": "Example Merchant" } ### Response #### Success Response - **Merchant** (Object) - Returns an initialized VASRequest.Merchant instance. ``` -------------------------------- ### GET MobilePhotoIDDataRequest.address Source: https://developer.apple.com/documentation/proximityreader/mobilephotoiddatarequest/element/address Defines the address element for requesting the photo ID holder's address from an issuer. ```APIDOC ## GET MobilePhotoIDDataRequest.address ### Description Retrieves the photo ID holder’s address on record with the issuer. ### Method GET ### Endpoint MobilePhotoIDDataRequest.address ### Parameters None ### Request Example N/A ### Response #### Success Response (200) - **address** (String) - The physical address associated with the photo ID. #### Response Example { "address": "123 Apple Park Way, Cupertino, CA 95014" } ``` -------------------------------- ### GET MobileDriversLicenseDataRequest.Response.DocumentElements.height Source: https://developer.apple.com/documentation/proximityreader/mobiledriverslicensedatarequest/response/documentelements-swift.struct/height Retrieves the height property from the mobile identity document holder's record. ```APIDOC ## GET MobileDriversLicenseDataRequest.Response.DocumentElements.height ### Description Returns the mobile identity document holder’s height as recorded by the issuer. ### Method GET ### Endpoint MobileDriversLicenseDataRequest.Response.DocumentElements.height ### Parameters None ### Request Example N/A ### Response #### Success Response (200) - **height** (Measurement?) - The height of the document holder. #### Response Example { "height": { "value": 180, "unit": "cm" } } ``` -------------------------------- ### PaymentCardReader Initialization Source: https://developer.apple.com/documentation/proximityreader/paymentcardreader Initializes a PaymentCardReader object with specified options. ```APIDOC ## POST /PaymentCardReader/init ### Description Creates a payment card reader with the specified options. ### Method POST ### Endpoint /PaymentCardReader/init ### Parameters #### Request Body - **options** (PaymentCardReader.Options) - Required - Additional information to configure the payment card reader. ### Request Example { "options": { "example_option": "value" } } ### Response #### Success Response (200) - **PaymentCardReader** (PaymentCardReader) - The initialized payment card reader object. #### Response Example { "readerIdentifier": "unique_reader_id", "options": { "example_option": "value" } } ``` -------------------------------- ### Accessing PaymentCardReader Options Source: https://developer.apple.com/documentation/proximityreader/paymentcardreader/options-swift.property Retrieve the configuration settings for a PaymentCardReader instance. ```APIDOC ## GET /websites/developer_apple_proximityreader/options ### Description Retrieves the defined configuration settings for the ProximityReader when it was created. ### Method GET ### Endpoint /websites/developer_apple_proximityreader/options ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **options** (PaymentCardReader.Options) - The configuration settings of the reader. #### Response Example ```json { "options": { "setting1": "value1", "setting2": "value2" } } ``` ``` -------------------------------- ### Get Eye Color Source: https://developer.apple.com/documentation/proximityreader/mobiledriverslicensedatarequest/element/eyecolor Retrieves the eye color of the mobile driver's license holder. ```APIDOC ## GET /websites/developer_apple_proximityreader/eyeColor ### Description Retrieves the eye color of the mobile driver's license holder as recorded by the issuer. ### Method GET ### Endpoint /websites/developer_apple_proximityreader/eyeColor ### Parameters #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **eyeColor** (string) - The eye color of the license holder. #### Response Example { "eyeColor": "blue" } ``` -------------------------------- ### Observing PaymentCardReader Events Source: https://developer.apple.com/documentation/proximityreader/paymentcardreader/event Demonstrates how to observe a stream of PaymentCardReader.Event objects. This asynchronous stream allows applications to react to real-time changes in the payment card reader's state. ```swift let events: AsyncStream ``` -------------------------------- ### GET MobileDriversLicenseDataRequest.Response.DocumentElements.eyeColor Source: https://developer.apple.com/documentation/proximityreader/mobiledriverslicensedatarequest/response/documentelements-swift.struct/eyecolor-swift.enum Retrieves the eye color property from the mobile identity document holder's record. ```APIDOC ## GET MobileDriversLicenseDataRequest.Response.DocumentElements.eyeColor ### Description Returns the mobile identity document holder’s eye color as recorded by the issuing authority. ### Method GET ### Endpoint MobileDriversLicenseDataRequest.Response.DocumentElements.eyeColor ### Parameters None ### Request Example N/A (Property access) ### Response #### Success Response (200) - **eyeColor** (MobileDriversLicenseDataRequest.Response.DocumentElements.EyeColor?) - The eye color of the document holder. #### Response Example { "eyeColor": "blue" } ``` -------------------------------- ### GET PaymentCardReadResult.applicationTypeIdentifier Source: https://developer.apple.com/documentation/proximityreader/paymentcardreadresult/applicationtypeidentifier Retrieves the string identifier representing the payment application type (kernel) used to read a payment card. ```APIDOC ## GET PaymentCardReadResult.applicationTypeIdentifier ### Description A string identifier that represents the payment application type (kernel) used to read the card. This property is available in iOS 18.0+, iPadOS 18.0+, Mac Catalyst 18.0+, and visionOS 2.0+. ### Method GET ### Endpoint PaymentCardReadResult.applicationTypeIdentifier ### Parameters None ### Request Example N/A (Instance Property) ### Response #### Success Response (200) - **applicationTypeIdentifier** (String?) - The identifier for the payment application type. #### Response Example { "applicationTypeIdentifier": "com.apple.proximityreader.kernel.emv" } ``` -------------------------------- ### POST /PaymentCardReaderSession/PINToken/init Source: https://developer.apple.com/documentation/proximityreader/paymentcardreadersession/pintoken/init%28rawvalue%3A%29 Initializes a new PINToken instance using a raw string provided by a payment service provider. ```APIDOC ## POST /PaymentCardReaderSession/PINToken/init ### Description Creates a new PINToken instance required for secure payment card reader sessions. This initializer consumes a raw string token provided by your payment service provider. ### Method POST ### Endpoint /PaymentCardReaderSession/PINToken/init ### Parameters #### Request Body - **rawValue** (String) - Required - The token string provided by your payment service provider. ### Request Example { "rawValue": "your-provider-token-string" } ### Response #### Success Response (200) - **status** (String) - Indicates successful token initialization. #### Response Example { "status": "success" } ``` -------------------------------- ### Create Mobile Document Reader Options (Swift) Source: https://developer.apple.com/documentation/proximityreader/mobiledocumentdisplayrequest/options-swift.struct/init%28alloweddocumenttypes%3Avalidationmode%3A%29 Initializes a MobileDocumentDisplayRequest.Options object, allowing configuration of allowed document types and validation mode. Dependencies include the MobileDocumentDisplayRequest framework. Inputs are arrays of document types and a validation mode enum. Outputs are configured options for document requests. ```swift init( allowedDocumentTypes: [MobileDocumentDisplayRequest.Options.DocumentType] = [], validationMode: MobileDocumentDisplayRequest.Options.ValidationMode = .check ) ``` -------------------------------- ### GET portraitData Source: https://developer.apple.com/documentation/proximityreader/mobilenationalidcarddatarequest/response/documentelements-swift.struct/portraitdata Accesses the portrait image data of the mobile national ID card holder as provided by the issuer. ```APIDOC ## GET portraitData ### Description Retrieves the portrait data of the mobile national ID card holder on record with the issuer. ### Method GET ### Endpoint MobileNationalIDCardDataRequest.Response.portraitData ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - None ### Request Example N/A (Property access) ### Response #### Success Response (200) - **portraitData** (Data?) - The image data of the card holder. #### Response Example { "portraitData": "" } ``` -------------------------------- ### PaymentCardReader Session Preparation Source: https://developer.apple.com/documentation/proximityreader/paymentcardreader Configures the pipeline for reading payment or loyalty cards. ```APIDOC ## POST /PaymentCardReader/prepare ### Description Configures the pipeline for reading payment or loyalty cards. ### Method POST ### Endpoint /PaymentCardReader/prepare ### Parameters #### Request Body - **token** (PaymentCardReader.Token) - Required - A secure token received from your participating payment service provider. ### Request Example { "token": { "jwt": "your_secure_token" } } ### Response #### Success Response (200) - **PaymentCardReaderSession** (PaymentCardReaderSession) - The session object used to read card information. #### Response Example { "sessionId": "session_abc123", "status": "ready" } ``` -------------------------------- ### GET aamvaDrivingPrivileges Source: https://developer.apple.com/documentation/proximityreader/mobiledriverslicensedatarequest/response/documentelements-swift.struct/aamvadrivingprivileges Access the driving privileges data associated with a mobile driver's license document element. ```APIDOC ## GET aamvaDrivingPrivileges ### Description Retrieves the AAMVA driving privileges from the mobile driver's license holder's data response. ### Method GET ### Endpoint MobileDriversLicenseDataRequest.Response.DocumentElements.aamvaDrivingPrivileges ### Parameters #### Path Parameters - **None** ### Request Example N/A (Property access) ### Response #### Success Response (200) - **aamvaDrivingPrivileges** (Array) - A list of MobileDriversLicenseDataRequest.Response.DocumentElements.AAMVADrivingPrivilege objects. #### Response Example { "aamvaDrivingPrivileges": [ { "vehicleClass": "C", "restrictions": "None", "endorsements": "None" } ] } ``` -------------------------------- ### GET dhsTemporaryLawfulStatus Source: https://developer.apple.com/documentation/proximityreader/mobiledriverslicenserawdatarequest/element/dhstemporarylawfulstatus Retrieves the temporary lawful status of a mobile document holder as reported by the U.S. Department of Homeland Security. ```APIDOC ## GET dhsTemporaryLawfulStatus ### Description Indicates whether the mobile document holder has temporary lawful status based on information from the U.S. Department of Homeland Security (DHS). ### Method GET ### Endpoint MobileDriversLicenseRawDataRequest.dhsTemporaryLawfulStatus ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - None ### Request Example N/A (Property access) ### Response #### Success Response (200) - **dhsTemporaryLawfulStatus** (MobileDriversLicenseRawDataRequest.Element) - The status indicator for the document holder. #### Response Example { "dhsTemporaryLawfulStatus": "static let dhsTemporaryLawfulStatus: MobileDriversLicenseRawDataRequest.Element" } ``` -------------------------------- ### Initialize MobileDocumentDisplayRequest.Options Source: https://developer.apple.com/documentation/proximityreader/mobiledocumentdisplayrequest/options-swift.struct Initializes a new instance of MobileDocumentDisplayRequest.Options. This initializer requires specifying the allowed document types and the desired validation mode for the request. It is a key component for setting up document display configurations. ```swift init(allowedDocumentTypes: [MobileDocumentDisplayRequest.Options.DocumentType], validationMode: MobileDocumentDisplayRequest.Options.ValidationMode) ``` -------------------------------- ### GET MobileDriversLicenseDisplayRequest.Options.ValidationMode.check Source: https://developer.apple.com/documentation/proximityreader/mobiledriverslicensedisplayrequest/options-swift.struct/validationmode-swift.struct/check Defines the 'check' validation mode property used to enable a user to perform a single document request within the ProximityReader framework. ```APIDOC ## GET MobileDriversLicenseDisplayRequest.Options.ValidationMode.check ### Description A static property that enables the user to perform a single document request. This is part of the validation options for mobile driver's license display requests. ### Method GET ### Endpoint MobileDriversLicenseDisplayRequest.Options.ValidationMode.check ### Parameters #### Path Parameters - N/A #### Query Parameters - N/A #### Request Body - N/A ### Request Example N/A ### Response #### Success Response (200) - **type** (MobileDriversLicenseDisplayRequest.Options.ValidationMode) - The static validation mode instance. #### Response Example { "validationMode": "check" } ``` -------------------------------- ### Configure Payment Card Reader Pipeline (Swift) Source: https://developer.apple.com/documentation/proximityreader/paymentcardreader/prepare%28using%3Aupdatehandler%3A%29 Configures the pipeline for reading payment or loyalty cards using a provided token and an update handler. This method verifies device readiness and returns a session for processing transactions. It's deprecated in iOS 15.4–16.0, iPadOS 15.4–16.0, and Mac Catalyst 17.0–17.0. ```swift func prepare( using token: PaymentCardReader.Token, updateHandler: ((PaymentCardReader.UpdateEvent) -> Void)? ) async throws -> PaymentCardReaderSession ``` -------------------------------- ### GET portraitData Source: https://developer.apple.com/documentation/proximityreader/mobiledriverslicensedatarequest/response/documentelements-swift.struct/portraitdata Retrieves the portrait image data of the mobile driver's license holder as provided by the issuing authority. ```APIDOC ## GET portraitData ### Description The `portraitData` property provides the raw image data representing the portrait of the mobile driver's license holder on record with the issuer. ### Method GET ### Endpoint MobileDriversLicenseDataRequest.Response.portraitData ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - None ### Request Example N/A (Property access) ### Response #### Success Response (200) - **portraitData** (Data?) - The binary image data of the license holder's portrait, or nil if unavailable. #### Response Example { "portraitData": "" } ``` -------------------------------- ### GET vehicleCategoryCode Source: https://developer.apple.com/documentation/proximityreader/mobiledriverslicensedatarequest/response/documentelements-swift.struct/drivingprivilege/vehiclecategorycode Retrieves the vehicle category code associated with a driving privilege from a mobile driver's license data request. ```APIDOC ## GET MobileDriversLicenseDataRequest.Response.DocumentElements.DrivingPrivilege.vehicleCategoryCode ### Description Returns the vehicle category code of the driving privilege extracted from the mobile driver's license data. ### Method GET ### Endpoint /MobileDriversLicenseDataRequest/Response/DocumentElements/DrivingPrivilege/vehicleCategoryCode ### Parameters #### Path Parameters - **None** ### Request Example N/A (Instance Property Access) ### Response #### Success Response (200) - **vehicleCategoryCode** (String) - The category code representing the vehicle type (e.g., "C", "A"). #### Response Example { "vehicleCategoryCode": "C" } ``` -------------------------------- ### Initialize ProximityReader mobile document request Source: https://developer.apple.com/documentation/proximityreader/mobiledocumentanyofdatarequest/init%28%29 The init() method initializes a new instance of a composite mobile document data request. This method is available on iOS, iPadOS, Mac Catalyst, and visionOS versions 26.0 and later. ```swift init() ``` -------------------------------- ### Enumeration: TransactionAmountDescription Source: https://developer.apple.com/documentation/proximityreader/paymentcardtransactionrequest/transactionamountdescription Defines the various types of transaction amount descriptions available for payment card requests, including installments, memberships, and preauthorizations. ```APIDOC ## Enumeration: TransactionAmountDescription ### Description Provides additional information about the transaction amount displayed in the system UI. These values are used to clarify the nature of the transaction, such as recurring payments or surcharges. ### Availability - iOS 18.0+ - iPadOS 18.0+ - Mac Catalyst 18.0+ - visionOS 2.0+ ### Enumeration Cases - **installment**(PaymentCycle, amount: Decimal, payments: Int) - Total upfront authorized amount for purchase cycles. - **membership**(PaymentCycle) - Recurring charge amount for purchase cycles. - **preauthorization** - Temporary hold on account for purchase cycles. - **preauthorizationAmount**(Decimal) - Temporary hold for a specific amount for purchase cycles. - **preauthorizationRelease** - Releases a temporary deposit for refund cycles. - **surchargeAmount**(Decimal) - The specific surcharge amount for purchase cycles. - **surchargePercent**(Double) - The maximum surcharge percentage for purchase cycles. ### Relationships - **Conforms To**: Sendable, SendableMetatype ### Related Properties - **amount** (Decimal): The total transaction value. - **currencyCode** (String): ISO 4217 currency code. - **type** (TransactionType): The category of transaction (purchase or refund). ``` -------------------------------- ### PaymentCardReader Store and Forward Preparation Source: https://developer.apple.com/documentation/proximityreader/paymentcardreader Configures the pipeline for reading payment or loyalty cards in Store and Forward mode. ```APIDOC ## POST /PaymentCardReader/prepareStoreAndForward ### Description Configures the pipeline for reading payment or loyalty cards in Store and Forward mode. ### Method POST ### Endpoint /PaymentCardReader/prepareStoreAndForward ### Response #### Success Response (200) - **StoreAndForwardPaymentCardReaderSession** (StoreAndForwardPaymentCardReaderSession) - The session object for Store and Forward mode. #### Response Example { "sessionId": "sf_session_456", "status": "ready_for_store_forward" } ``` -------------------------------- ### MobileDocumentAnyOfDataRequest init() Source: https://developer.apple.com/documentation/proximityreader/mobiledocumentanyofdatarequest/init%28%29 Initializes a new composite mobile document data request for proximity-based operations. ```APIDOC ## init() ### Description Returns a composite mobile document data request. This initializer is used to prepare a request for mobile document data within the ProximityReader framework. ### Method N/A (Initializer) ### Endpoint MobileDocumentAnyOfDataRequest.init() ### Parameters None ### Availability - iOS 26.0+ - iPadOS 26.0+ - Mac Catalyst 26.0+ - visionOS 26.0+ ### Request Example ```swift let request = MobileDocumentAnyOfDataRequest() ``` ### Response #### Success Response - **instance** (MobileDocumentAnyOfDataRequest) - A new instance of the data request object. ``` -------------------------------- ### MobilePhotoIDDataRequest.Element.givenName Source: https://developer.apple.com/documentation/proximityreader/mobilephotoiddatarequest/element/givenname Represents the photo ID holder's given name or first name. Available on iOS, iPadOS, Mac Catalyst, and visionOS starting from version 26.0. ```APIDOC ## Property: givenName ### Description The photo ID holder’s given name or first name. ### Availability iOS 26.0+ iPadOS 26.0+ Mac Catalyst 26.0+ visionOS 26.0+ ### Declaration ```swift static let givenName: MobilePhotoIDDataRequest.Element ``` ``` -------------------------------- ### Present ProximityReader Content Sheet (Swift) Source: https://developer.apple.com/documentation/proximityreader/proximityreaderdiscovery/presentcontent%28_%3Afrom%3A%29 This Swift code snippet demonstrates how to present an instructional sheet for ProximityReader features. It requires a `ProximityReaderDiscovery.Content` object and a `UIViewController` to present from. The method is asynchronous and can throw a `ProximityReaderDiscovery.ContentError` if the presentation fails. ```swift final func presentContent( _ content: ProximityReaderDiscovery.Content, from viewController: UIViewController ) async throws ``` -------------------------------- ### Access documentExpirationDate property in Swift Source: https://developer.apple.com/documentation/proximityreader/mobilephotoiddatarequest/element/documentexpirationdate Defines the static property documentExpirationDate as an element of MobilePhotoIDDataRequest. This property is available starting from iOS 26.0 and related Apple platforms. ```swift static let documentExpirationDate: MobilePhotoIDDataRequest.Element ``` -------------------------------- ### Session Transcript Source: https://developer.apple.com/documentation/proximityreader/mobiledocumentanyofrawdatarequest/response/sessiontranscript Retrieves the session transcript of a document request. This property is available for iOS, iPadOS, Mac Catalyst, and visionOS starting from version 26.0. ```APIDOC ## GET /websites/developer_apple_proximityreader/sessionTranscript ### Description Retrieves the session transcript of the document request. ### Method GET ### Endpoint /websites/developer_apple_proximityreader/sessionTranscript ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **sessionTranscript** (Data) - The session transcript of the document request. #### Response Example ```json { "sessionTranscript": "" } ``` ``` -------------------------------- ### Document Response Source: https://developer.apple.com/documentation/proximityreader/mobiledocumentanyofdatarequest/response/documentresponse Retrieves the document response from a successful request. This property is available on iOS, iPadOS, Mac Catalyst, and visionOS starting from version 26.0. ```APIDOC ## GET /websites/developer_apple_proximityreader/documentResponse ### Description This endpoint provides access to the `documentResponse` property, which contains the response data from a successful document request. ### Method GET ### Endpoint /websites/developer_apple_proximityreader/documentResponse ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **documentResponse** (any MobileDocumentDataResponse) - The response data from a successful document request. #### Response Example ```json { "documentResponse": { ... MobileDocumentDataResponse object ... } } ``` ``` -------------------------------- ### Initialize PaymentCardVerificationRequest in Swift Source: https://developer.apple.com/documentation/proximityreader/paymentcardverificationrequest/init%28currencycode%3Afor%3A%29 Creates a new instance of a verification request. It requires an ISO 4217 currency code string and an optional reason parameter, which defaults to .other. ```Swift init( currencyCode: String, for reason: PaymentCardVerificationRequest.Reason = .other ) ``` -------------------------------- ### Get PaymentCardReader.Token Raw Value Swift Source: https://developer.apple.com/documentation/proximityreader/paymentcardreader/token Retrieves the original string representation of the secure token. This raw value is what you receive from your payment service provider. ```swift let rawValue: String ``` -------------------------------- ### ProximityReader Initializer Source: https://developer.apple.com/documentation/proximityreader/vasrequest/merchant/init%28id%3Aurl%3Ashouldsendurlonly%3Alocalizedname%3A%29 Creates a new merchant object with the specified information. This initializer is deprecated. ```APIDOC ## init(id:url:shouldSendURLOnly:localizedName:) ### Description Creates a new merchant object with the specified information. ### Method Initializer ### Endpoint N/A (Initializer) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```swift init( id: String, url: URL? = nil, shouldSendURLOnly: Bool = false, localizedName: String? = nil ) ``` ### Response #### Success Response (200) N/A (Initializer) #### Response Example N/A (Initializer) ### Deprecation - iOS: 15.4–16.4 - iPadOS: 15.4–16.4 - Mac Catalyst: 17.0–17.0 ``` -------------------------------- ### PaymentCardReader.Token Initializer Source: https://developer.apple.com/documentation/proximityreader/paymentcardreader/token/init%28rawvalue%3A%29 Initializes a PaymentCardReader.Token with a raw string value obtained from your payment service provider. ```APIDOC ## init(rawValue:) ### Description Creates a token with the string your payment service provider gave you. ### Method Initializer ### Endpoint N/A (Initializes a type) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```swift let token = PaymentCardReader.Token(rawValue: "your_payment_provider_token_string") ``` ### Response #### Success Response (200) N/A (Initializes a type) #### Response Example N/A (Initializes a type) ### Platform Availability iOS 15.4+ iPadOS 15.4+ Mac Catalyst 17.0+ ``` -------------------------------- ### MobileDriversLicenseDisplayRequest.Response.ValidationOutcome.rejected Source: https://developer.apple.com/documentation/proximityreader/mobiledriverslicensedisplayrequest/response/validationoutcome-swift.enum/rejected This section describes the 'rejected' case, which signifies that the user has rejected the document response. It is available on iOS, iPadOS, macOS Catalyst, and visionOS starting from version 17.0. ```APIDOC ## MobileDriversLicenseDisplayRequest.Response.ValidationOutcome.rejected ### Description A message that indicates the user rejected the document response. ### Supported Platforms - iOS 17.0+ - iPadOS 17.0+ - Mac Catalyst 17.0+ - visionOS 1.0+ ### Case ```swift case rejected ``` ``` -------------------------------- ### Initializer: init(allowedDocumentTypes:validationMode:) Source: https://developer.apple.com/documentation/proximityreader/mobiledocumentdisplayrequest/options-swift.struct/init%28alloweddocumenttypes%3Avalidationmode%3A%29 Creates a mobile document reader display request options type with specified document types and validation settings. ```APIDOC ## INITIALIZER init(allowedDocumentTypes:validationMode:) ### Description Creates a new instance of MobileDocumentDisplayRequest.Options to configure how a mobile document reader processes requests. ### Method N/A (Swift Initializer) ### Endpoint MobileDocumentDisplayRequest.Options.init(allowedDocumentTypes:validationMode:) ### Parameters #### Path Parameters - **allowedDocumentTypes** ([MobileDocumentDisplayRequest.Options.DocumentType]) - Optional - The allowed document types for the mobile document request. Defaults to an empty array. - **validationMode** (MobileDocumentDisplayRequest.Options.ValidationMode) - Optional - The validation mode of the mobile document request. Defaults to .check. ### Request Example ```swift let options = MobileDocumentDisplayRequest.Options( allowedDocumentTypes: [.drivingLicense], validationMode: .check ) ``` ### Response #### Success Response - **instance** (MobileDocumentDisplayRequest.Options) - Returns a configured options object for the display request. ``` -------------------------------- ### MobileDriversLicenseDataRequest.Element - dateOfBirth Source: https://developer.apple.com/documentation/proximityreader/mobiledriverslicensedatarequest/element/dateofbirth The date of birth of the mobile driver’s license holder. This element is available starting from iOS 17.0, iPadOS 17.0, Mac Catalyst 17.0, and visionOS 1.0. ```APIDOC ## MobileDriversLicenseDataRequest.Element - dateOfBirth ### Description The date of birth of the mobile driver’s license holder. ### Supported Platforms - iOS 17.0+ - iPadOS 17.0+ - Mac Catalyst 17.0+ - visionOS 1.0+ ### Usage ```swift static let dateOfBirth: MobileDriversLicenseDataRequest.Element ``` ``` -------------------------------- ### Photo ID Document Type Source: https://developer.apple.com/documentation/proximityreader/mobiledocumentdisplayrequest/options-swift.struct/documenttype/photoid Represents a photo ID document type for use with MobileDocumentDisplayRequest. This type is available on iOS, iPadOS, Mac Catalyst, and visionOS starting from version 26.0. ```APIDOC ## Photo ID Document Type ### Description Represents a document of type photo ID. ### Method N/A (This is a type definition, not an endpoint) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response #### Success Response (N/A) N/A #### Response Example N/A ### Type Definition ```swift static let photoID: MobileDocumentDisplayRequest.Options.DocumentType ``` ### Availability iOS 26.0+ iPadOS 26.0+ Mac Catalyst 26.0+ visionOS 26.0+ ``` -------------------------------- ### Initializer: init(retainedElements:nonRetainedElements:) Source: https://developer.apple.com/documentation/proximityreader/mobiledriverslicenserawdatarequest/init%28retainedelements%3Anonretainedelements%3A%29 Initializes a new MobileDriversLicenseRawDataRequest. This request specifies which elements from a mobile driver's license should be retained indefinitely and which should only be kept for real-time processing. ```APIDOC ## Initializer: init(retainedElements:nonRetainedElements:) ### Description Returns a mobile driver’s license raw data request. This initializer allows you to specify which elements of the driver's license data you intend to retain and which you intend to discard after real-time processing. ### Method Initializer ### Endpoint N/A (Initializers are not endpoints) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```swift let request = MobileDriversLicenseRawDataRequest(retainedElements: [.name, .address], nonRetainedElements: [.photo]) ``` ### Response #### Success Response (N/A for initializers) N/A #### Response Example N/A ### See Also - `retainedElements`: The document elements you’re requesting and intend to retain for an indefinite period of time. - `nonRetainedElements`: The document elements you’re requesting and intend to retain no longer than is necessary to process the result in realtime. - `Element`: A type representing an element that you can request from a mobile driver’s license. ``` -------------------------------- ### Swift Enum Case: installment Source: https://developer.apple.com/documentation/proximityreader/paymentcardtransactionrequest/transactionamountdescription Represents a purchase where the total amount is authorized upfront, and the customer pays a specified amount per payment cycle. This case is only allowed for PaymentCardTransactionRequest.TransactionType.purchase. ```swift case installment(PaymentCardTransactionRequest.PaymentCycle, amount: Decimal, payments: Int) ``` -------------------------------- ### Accessing PaymentCardReader options Source: https://developer.apple.com/documentation/proximityreader/paymentcardreader/options-swift.property Retrieves the configuration settings defined during the creation of the PaymentCardReader instance. This property is a constant value of type PaymentCardReader.Options. ```swift final let options: PaymentCardReader.Options ``` -------------------------------- ### Access StoreAndForwardBatch properties Source: https://developer.apple.com/documentation/proximityreader/storeandforwardbatch/intermediatecertificate These properties define the structure of a batch, including its unique identifier, payment count, leaf certificate, payment results, and integrity signature. ```Swift let id: String let count: Int let leafCertificate: String let payments: [StoreAndForwardBatch.StoredPaymentCardReadResult] let signature: String ``` -------------------------------- ### MobileNationalIDCardDataRequest.Response.DocumentElements.Sex Source: https://developer.apple.com/documentation/proximityreader/mobilenationalidcarddatarequest/response/documentelements-swift.struct/sex-swift.property Represents the sex of the mobile national ID card holder. This property is optional and available on iOS, iPadOS, Mac Catalyst, and visionOS starting from specific versions. ```APIDOC ## MobileNationalIDCardDataRequest.Response.DocumentElements.Sex ### Description The mobile national ID card holder's sex. ### Method N/A (Instance Property) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response #### Success Response (200) - **sex** (MobileNationalIDCardDataRequest.Response.DocumentElements.Sex?) - The sex of the ID card holder. #### Response Example ```swift // Example usage within a response object let sex: MobileNationalIDCardDataRequest.Response.DocumentElements.Sex? ``` ``` -------------------------------- ### Access Issuing Authority Name (Swift) Source: https://developer.apple.com/documentation/proximityreader/mobiledriverslicensedatarequest/response/documentelements-swift.struct/issuingauthority-swift.struct/name Retrieves the name of the state or government that issued the identity document. This property is optional and available on iOS, iPadOS, macOS, and visionOS starting from version 17.0. ```swift let name: String? ``` -------------------------------- ### POST /MobileDocumentDisplayRequest Source: https://developer.apple.com/documentation/proximityreader/mobiledocumentdisplayrequest Initializes a request to display specific mobile document elements onscreen for visual inspection. ```APIDOC ## POST /MobileDocumentDisplayRequest ### Description Creates a new request to retrieve elements from a mobile document and display them onscreen for visual inspection by a verifier. ### Method POST ### Endpoint /MobileDocumentDisplayRequest ### Parameters #### Request Body - **elements** (Array) - Required - The specific document elements to be retrieved and displayed. - **options** (Options) - Optional - Configuration object to customize the display request behavior. ### Request Example { "elements": ["given_name", "family_name", "portrait"], "options": { "presentation_style": "full_screen" } } ### Response #### Success Response (200) - **status** (String) - The status of the display request. - **response** (Response) - The resulting information from the successful display operation. #### Response Example { "status": "success", "response": { "display_id": "req_12345", "timestamp": "2023-10-27T10:00:00Z" } } ```