The Square Reader SDK and Mobile Authorization API are now retired. Existing Reader SDK integrations can no longer take payments. To ensure continued support and functionality for your application, you must migrate from the Reader SDK to the Mobile Payments SDK.
Important
Breaking changes: RetryConnectionErrorCode entries READER_UNAVAILABLE, READER_NOT_CONNECTED_TO_DEVICE, READER_ALREADY_READY, and NO_NETWORK have been consolidated into a single UNABLE_TO_RETRY error code.
Deprecation notice:
readerInfo.firmwareVersionis deprecated. UsereaderInfo.firmwareInfo.versioninstead.readerInfo.firmwarePercentis deprecated. UsereaderInfo.firmwareInfo.updateStatusinstead.
Sellers can now schedule firmware updates to occur at a preferred time of day, reducing interruptions during business hours. The SDK also provides richer firmware status information so your application can track updates in progress and display relevant UI.
readerManager.readerSettings- A newReaderSettingsproperty for managing settings that apply to all connected readers, including:preferredFirmwareUpdateTime: TimeOfDay?— Schedule firmware updates at a preferred time of day using the newTimeOfDaytype.
readerInfo.firmwareInfo- A newReaderFirmwareInfoproperty with structured firmware data, including:version: String?— The current firmware version.updateStatus: FirmwareUpdateStatus— A sealed class representing the firmware update state:None,Pending(updateDate: Date), orInProgress(updatePercentage: Int?).
For more information, see Firmware info and Reader settings.
settingsManager.isShowingSettings()- Check whether the settings screen is currently displayed.settingsManager.closeSettings()- Programmatically dismiss the settings screen.- New
OBSOLETE_SDKerror code added to bothAuthorizeErrorCodeandPaymentErrorCode. This error is returned when the SDK version is no longer supported.