If you are using CocoaPods, update your Podfile:
pod 'StripeTerminal', '1.1.0'
This update introduces support for connecting to and making payments with the Verifone P400 countertop reader.
The following iOS methods are not available when connected to a Verifone P400:
Migrating your iOS integration to support the Verifone P400
verifoneP400is a new
SCPDeviceTypeenum value. To discover Verifone P400 devices you’ve registered to your Stripe account, you’ll need to specify both the
verifoneP400device type and the
internetdiscovery method in your
- We recommend using locations when working with the Verifone P400. Locations filter the readers registered to your account. When registering a reader, you can associate the reader with a specific location.
DiscoveryConfigurationhas a new
locationIdparameter, which can be used to filter readers by location ID.
- The SDK’s
Readerobject now contains additional properties that match those on the Reader API object. Many of these new properties only apply to the Verifone P400 reader:
ipAddress: The IP address of the reader, used for establishing a connection on the local network.
locationId: The Location ID associated with the reader.
status: The network connectivity status of the reader, i.e. offline or online. Check that the reader’s status is
onlinebefore attempting to connect.
label: A custom label that can be optionally be associated with the reader.
stripeID: A unique identifier for the reader.
discoverReadersreturns all registered readers, including those that are
offline. We recommend that you display
offlinereaders in your app’s UX for discovering readers so your users know which readers are already registered.
- We have added a new
ConnectionConfigurationclass (similar to
DiscoveryConfiguration), which supports the
failIfInUseoption when connecting to the Verifone P400.
TerminalDelegate.didReportUnexpectedReaderDisconnectmethod will be called when the SDK notices it has been disconnected from the Verifone P400 (for example, if the reader loses its connection or power for over a minute). You can test this in your app by turning off the reader. Refer to handling disconnects for more information.
- Since the Verifone P400 has a built-in display, your application doesn’t need to display events from the payment method collection process to users. You can pass
ReaderDisplayDelegatemethods will not be called.
- We introduced three new errors specific to connections with the Verifone P400:
SCPErrorUnknownReaderIpAddress: Returned when connecting to a reader that does not have an IP address on the
connectReadercompletes with this error when connecting to an internet-enabled reader times out (for example, when connecting to a reader that is
SCPErrorConnectFailedReaderIsInUse: Returned when the chosen reader is currently collecting a payment and
failIfInUseis set to
true. See the Connecting to the Verifone P400 section for more details.
- Updated internal dependencies