Welcome to our new developer portal! Use the "Ask" button to chat with our AI Agent.
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Check contactless capability

Overview

Run this check if your digital wallet application supports contactless payments.

Call it after NFC Wallet SDK initialization, and before Enroll wallet and Tokenization.

If the device is not eligible for contactless payments, hide or disable contactless payment entry points for the end user.

SDK Integration

Use deviceEligibility with contactlessPaymentEligibility.

Handle these results:

  • supported: The device can make contactless payments.

  • deviceNotSupported: The device does not support NFC or HCE.

  • systemNotEligible: The device or Apple ID is not in the EEA (European Economic Area).

  • iosVersionNotSupported: The device does not meet the minimum iOS version (iOS 17.4).

let contactlessEligibility = await TSHPay.shared.deviceEligibility.contactlessPaymentEligibility
            
switch contactlessEligibility {
  case .deviceNotSupported(let reason):
      // Device is not eligible due to missing NFC or HCE support.
      break
  case .systemNotEligible:
      // System is not eligible because the device or Apple ID is not in the EEA.
      break
  case .iosVersionNotSupported(let currentVersion):
      // The OS version does not meet the minimum required version (iOS 17.4).
      break
  case .supported:
      // Device is eligible to make contactless payments.
      break
}

Run this check before you call Enroll wallet and Tokenize a card.

Last updated

Was this helpful?