Accept contactless payments with your Android phone and the Mobile Payments SDK without additional hardware.
- Tap to Pay requires a compatible Android phone running Android 9 or later. Tap to Pay isn't available on Android tablets.
- Tap to Pay isn't available for offline payments.
A compatible Android phone pairs automatically, unlike a Square Reader, which requires manual pairing. When the Mobile Payments SDK is operating on a compatible device, the device is enabled to accept payments. However, to take a payment with Tap to Pay, there cannot be any other Square Readers paired with the device. Before attempting a Tap to Pay payment, forget or disconnect any paired Square Readers.
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 TAP_TO_PAY
.
For more information, see Pair and Manage Card Readers.
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.
Important
If you have a Square Reader paired with your device, only the payment options offered by that reader are displayed. To show the Tap to Pay on Android prompt, you must forget or disconnect any Square Readers paired to the device before starting the payment.
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. If paymentManager.getAvailableCardEntryMethods() = { CONTACTLESS }
, that means there are no hardware readers connected and you can display a Tap to Pay prompt in your UI. If EMV
or SWIPE
is listed as available card entry methods, there are other readers connected to your device and you shouldn't display a Tap to Pay prompt.
For any payment method, you should check whether the reader state is READY
(by setting up a callback with ReaderManager.setReaderChangedCallback
) 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.