FILTER BY TAG

Managing Device Enrollment

Use this information to manage device enrollment in the Tap to Pay on iPhone SDK. The enrollment workflow guides you through the device enrollment activity.

Enroll a New Device

Use the
enroll
function to enroll a new device. This function shows options in a merchant-facing UI for enrolling a new device.
switch await mposUi.enroll() { case .success(let deviceId): print("Enrollment successful with device id: %@", deviceId) case .cancelledByUser: print("Enrollment cancelled.") case .error(let developerInfo): print("Enrollment failed. Info: %@", developerInfo) }

Enroll a Previously Enrolled Device

Use the
enroll
function to enroll a previously enrolled device. This function enables you to perform device re-enrollment through the SDK by supplying a stored serial number. The streamlined workflow eliminates the need for the merchant to manually select or enter the serial number during re-enrollment.
switch await mposUi.enroll(with: "serialNumber") { case .success(let deviceId): print("Enrollment successful with device id: %@", deviceId) case .cancelledByUser: print("Enrollment cancelled.") case .error(let developerInfo): print("Enrollment failed. Info: %@", developerInfo) }

View the Device Enrollment Result

Before you can view the device enrollment result, you must enroll a device.
Use the
enrollmentStatus
function to view the device enrollment result.
switch await mposUi.enrollmentStatus() { case .enrolled: print("Device enrolled.") case .enrolling: print("Enrollment in progress. Please do not start a new one.") case .notEnrolled: print("Device not enrolled. Please enroll device.") }

Show Merchant Education Screens

When a device enrollment is completed successfully, the Merchant Education screens must show on the device. The Merchant Education screens also must be accessible in your app's Settings or Help section.
Use Apple's
ProximityReaderDiscovery
object to show the Merchant Education screens. This object provides the UI with information about how to use Tap to Pay on iPhone. For more information about the object, see the Apple Developer documentation: ProximityReaderDiscovery.