Tap to Pay on iPhone

Accept contactless payments with your iPhone and the Mobile Payments SDK without additional hardware.

Link to section

Requirements and limitations

Link to section

Link a Square seller account

Sellers using their iOS device to take payments must link their Square seller account with an Apple ID prior to taking payments with Tap to Pay. To present this option in your application, use the ReaderManager.TapToPaySettings to link an Apple account. The linkAppleAccount() function presents an Apple sheet to the user (the Square seller) prompting them to accept the Tap to Pay on iPhone terms and conditions.

As the application developer, you determine where in your application to launch this linking flow. You should ensure that this option is only available to admin users of your application or those with certain permissions. The seller doesn't need to be logged in to their Apple account on the device itself, they only need to log in to link their account when presented with the sheet.

The Mobile Payments SDK's ReaderManager also includes relinkAppleAccount, a method to relink (change) the associated Apple ID by presenting the Tap to Pay terms and conditions again, and isAppleAccountLinked, a method to check whether the device's Apple ID is already linked to a Square seller ID.

Link to section

Device management

The ReaderManager is used to pair and monitor changes in Square Readers and Tap to Pay devices linked to the authorized seller account. You can check ReaderManager.TapToPaySettings.isDeviceCapable() to determine whether the current device supports Tap to Pay.

A compatible iOS phone pairs automatically, unlike a Square Reader, which requires manual pairing. When the seller's Apple ID is linked to their Square account and the Mobile Payments SDK is operating on a compatible device, the device is enabled to accept payments.

Use the ReaderInfo class to learn details about connected readers and Tap to Pay devices available in the list of readers. For Tap to Pay devices, the ReaderInfo.model is always tapToPay.

For more information, see Pair and Manage Card Readers.

Link to section

Accept payments with Tap to Pay

To begin the payment flow in your application, you can use the .default PromptParameters, which displays a UI created by Square and lists the available payment methods from all connected readers, including Tap to Pay if the device is supported.

Screenshot of the Mobile Payments SDK payment flow on iOS, prompting buyers to swipe, tap, or insert their card into a card reader, or use Tap to Pay on iPhone.

If you don’t want to use the payment prompt built by Square, you can set your PromptParameters.mode to custom and create your own UI to prompt buyers to make their payment based on the readerInfo.supportedInputMethods for each reader in ReaderManager.readers. You should check whether the reader state is ready (by setting up an observer) before displaying it as a payment option in your UI.

The rest of the Mobile Payments SDK payment flow is identical for Tap to Pay payments and other payment methods.