<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 17.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ProximityReader",
  "identifier" : "/documentation/ProximityReader/PaymentCardReaderSession/capturePIN(using:cardReaderTransactionID:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "ProximityReader"
    ],
    "preciseIdentifier" : "s:15ProximityReader011PaymentCardB7SessionC10capturePIN5using04cardB13TransactionIDAA0cD10ReadResultVAC8PINTokenV_SStYaKF"
  },
  "title" : "capturePIN(using:cardReaderTransactionID:)"
}
-->

# capturePIN(using:cardReaderTransactionID:)

Presents a sheet to capture the PIN when required by the payment card issuer,
and returns the previously encrypted card data including newly captured PIN data.

```
func capturePIN(using token: PaymentCardReaderSession.PINToken, cardReaderTransactionID: String) async throws -> PaymentCardReadResult
```

## Parameters

`token`

Valid and signed PIN token from a participating payment service provider.

`cardReaderTransactionID`

The [`id`](/documentation/ProximityReader/PaymentCardReadResult/id) of the previous read.

## Return Value

[`PaymentCardReadResult`](/documentation/ProximityReader/PaymentCardReadResult) if the PIN was successfully captured.

## Discussion

Call this method when the payment card issuer requests a PIN for the current transaction.
When you call this method, the system displays UI with instructions
on what the person needs to do. This UI remains onscreen until the system reads
the person’s PIN, you cancel the operation, or an error occurs.

> Important: The encrypted payment card data are only kept 55 seconds after previous read
> if the PIN was not requested by the card.
> After this delay, this method will return ``doc://com.apple.ProximityReader/documentation/ProximityReader/PaymentCardReaderSession/ReadError/pinEntryFailed``

> throws: This method throws a ``doc://com.apple.ProximityReader/documentation/ProximityReader/PaymentCardReaderSession/ReadError`` if a person dismisses the sheet
> or the sheet fails to appear.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)