Connect to a reader
Connect your application to a Stripe Terminal reader.
Notiz
If you haven’t chosen a reader yet, compare the available Terminal readers and choose one that best suits your needs.
Tap to Pay on iPhone lets users accept in-person contactless payments with a compatible iPhone and the Stripe Terminal SDK. Tap to Pay on iPhone includes support for Visa, Mastercard, American Express, and Discover contactless cards and NFC-based mobile wallets (Apple Pay, Google Pay, and Samsung Pay). Tap to Pay on iPhone is included in the Terminal iOS SDK and enables payments directly in your iOS mobile app.
Create a locationServer-sideDashboard![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
Create a Location for each physical location where your readers operate. Set the display_
to represent the name of the business. Your customer sees the display_
on the device’s tap screen unless you explicitly provide the name of a business when you connect to a reader. You can edit existing locations as necessary to adjust this text.
If your business requires you to move your readers frequently, your locations can use an address that represents your primary place of business.
To create a location using the API, use the create location request.
Locations for the US require:
line1
city
state
postal_
code country
To create a location in the Dashboard, click the +New button on the Locations page.
Discover readers![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
Use the discoverReaders method to determine whether your iPhone is supported for Tap to Pay. The completion
handler invokes with an error if your application runs on a device that doesn’t meet the supported device criteria.
Connect to a reader![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
To begin accepting Tap to Pay on iPhone payments, provide the discovered reader to the connectLocalMobileReader
method. You’ll also need to create a delegate to handle potential required updates to the reader.
If you use destination charges with on_
, you must also provide the connected account ID in SCPLocalMobileConnectionConfiguration
.
Optionally, you can provide a buyer-facing name to display on the payment collection screen. If you don’t provide a name, the display_
associated with the given location is shown.
Handle device setup ![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
When connecting to a compatible Tap to Pay on iPhone reader, a configuration update may be required and can take up to a few minutes. We recommend connecting to the reader ahead of time in the background to reduce wait time for merchants.
Make sure your application implements SCPLocalMobileReaderDelegate
to handle the configuration steps and display messaging to your merchant to stand by. You’ll see the configuration steps as a software update so you can display progress to your merchants as appropriate.
Account linking and Apple terms and conditions![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
Users are presented with Apple’s Tap to Pay on iPhone Terms and Conditions the first time they connect to the reader. To register with Apple, you must specify a valid Apple ID representing your business before accepting the terms presented by Apple. You only need to perform this once per Stripe account. This flow isn’t presented on subsequent connections using the same Stripe account, including on other mobile devices.
Each connected account must accept the Terms and Conditions when:
- A Connect user creates direct charges
- A Connect user creates a destination charge and specifies an
on_
accountbehalf_ of
![](https://b.stripecdn.com/docs-statics-srv/assets/ttpoi-account-linking-steps.56bc5c0bb037a98f788a7e8d43d0c87e.png)
Link your Apple ID account to accept Tap to Pay payments
Any iPhone will be able to use up to three (3) unique Stripe accounts across apps within a rolling 24-hour period when calling connectLocalMobileReader
for Tap to Pay on iPhone. If additional accounts are used for the device within the same 24-hour period, the connectLocalMobileReader
method raises an SCPErrorAppleBuiltInReaderMerchantBlocked error.
Learn more about account linking in the Tap to Pay on iPhone Business Information section of the Apple Tap to Pay on iPhone FAQ
Handle disconnects ![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
Your reader disconnects when your application enters the background or when your iPhone loses connectivity. There are two ways you can handle this:
1. Handle the disconnect manually![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
Your application must implement the SCPTerminalDelegate terminal:didReportUnexpectedReaderDisconnect: delegate method to handle this disconnection. You can use this callback as an opportunity to notify the user that something went wrong and that you need internet connectivity to continue. Additionally, you can also manually reconnect to the reader when your application re-enters the foreground.
2. Automatically attempt reconnection![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
Set autoReconnectOnUnexpectedDisconnect
as true
on the LocalMobileConnectionConfiguration
in your app and implement the callbacks found in the ReconnectionDelegate
. You must also pass an autoReconnectionDelegate
to your LocalMobileConnectionConfiguration
.
If you automatically attempt reconnection, the following occurs:
- When a disconnect occurs, the SDK automatically attempts to reconnect and notifies you through
onReaderReconnectStarted
. Make sure your app announces that the connection was lost and a reconnection is in progress.- You can use the
Cancelable
object to stop the reconnection attempt at any time.
- You can use the
- If the SDK successfully reconnects to the reader, Stripe notifies you through
onReaderReconnectSucceeded
. Make sure your app announces that the connection was restored and to continue normal operations. - If the SDK can’t reconnect to the reader, Stripe notifies you through
onReaderReconnectFailed
. Make sure your app announces that an unexpected disconnect occurred.
Next steps![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
You’ve connected your application to the reader. Next, collect your first Stripe Terminal payment.
The BBPOS and Chipper™ name and logo are trademarks or registered trademarks of BBPOS Limited in the United States and/or other countries. The Verifone® name and logo are either trademarks or registered trademarks of Verifone in the United States and/or other countries. Use of the trademarks does not imply any endorsement by BBPOS or Verifone.