square_mobile_payments_sdk 2026.8.1
square_mobile_payments_sdk: ^2026.8.1 copied to clipboard
Square Mobile Payments SDK. Allows developers to take in-person payments using Square hardware.
2026.8.1 #
- Propagate platform errors from manager methods that previously discarded the platform
Future(ReaderManager.showMockReaderUI/hideMockReaderUI/forget/blink,AuthManager.deauthorize,SettingsManager.showSettings), so callers receive failures instead of unhandled async errors. Also deliver Tap to Pay unsupported-platform errors asynchronously so they can be caught withawaitor.catchError.
2026.8.0 #
The iOS plugin is now distributed as a Swift package. There are no changes to the Dart API.
Breaking changes #
- Flutter
3.44.0or later is now required. The plugin ships aPackage.swiftand the sample app adopts theUIScenelifecycle, neither of which is supported by earlier versions. - (iOS) Applications using the
UIScenelifecycle must register plugins fromdidInitializeImplicitFlutterEngineinstead ofapplication(_:didFinishLaunchingWithOptions:), and provide aSceneDelegatethat subclassesFlutterSceneDelegatetogether with aUIApplicationSceneManifestentry inInfo.plist. See the setup guide.
Changes #
- (iOS) Resolve
SquareMobilePaymentsSDKthrough Swift Package Manager.MockReaderUIis no longer bundled by default over SPM: it can't be scoped to Debug, and its framework is packaged as an application (CFBundlePackageType = APPL), so shipping it in a Release archive breaks App Store upload. Apps that want mock readers add it to their own target — see Using MockReaderUI with Swift Package Manager. CocoaPods remains supported as a fallback (enable-swift-package-manager: false) and keepsMockReaderUIscoped to Debug - (iOS) Move the plugin sources to
ios/square_mobile_payments_sdk/Sources - (Android) Convert the plugin and sample app build scripts to the Gradle Kotlin DSL, target Java 17, and require Android Gradle Plugin
8.9.1or later - Remove CocoaPods from the sample app and update the setup guides for both platforms
2026.7.4 #
- Upgrade Android and iOS native SDK to
2.6.0. See the native changelog: https://developer.squareup.com/docs/changelog/mobile-logs/2026-07-27 - (Android) Add
hostIdMismatchtoReaderStatusInfoUnavailableReasonandReaderPairingErrorCode. This surfaces the nativeHOST_ID_MISMATCHreason, reported when a reader refuses a connection because another device was its most-recently-paired host (previously reported as a generic internal/unknown error). This reason is Android-only; iOS2.6.0has no equivalent - Add
hostIdMismatchtoReaderStatusInfoUnavailableReasonandReaderPairingErrorCode. This surfaces the nativeHOST_ID_MISMATCHreason, reported when a reader refuses a connection because another device was its most-recently-paired host (previously reported as a generic internal/unknown error) - Cash payments may now be automatically rounded to the nearest five cents for CAD and AUD, and optionally USD when enabled. Payment results reflect the rounded amount
- Removed the native
ExternalPaymentDetails,ExternalTenderType, andPayment.externalDetailsAPIs (removed in Android native SDK2.6.0). This has no impact on the Flutter API:externalDetailswas never exposed on the DartPayment/OfflinePaymentmodels, so no migration is required.SourceType.externalSourceremains available
2026.7.3 #
- Fix issue #84, fix additionalPaymentMethods Map in native side in order to support keyed, cash, tapToPay additional methods
2026.7.2 #
- Fix issue #81
- Improve authorization error handling and SDK compatibility
2026.7.1 #
Aligns iOS and Android error handling with exhaustive, typed Dart enums.
Breaking changes #
ReaderManager.pairReadercallback signature changed fromvoid Function(bool, String?)tovoid Function(bool, ReaderPairingError?). The second argument is now a typedReaderPairingErrorexception instead of a raw message string.SettingsManager.getTrackingConsentState()now returnsFuture<TrackingConsentState>(new enum) instead ofFuture<String>.- The
ReaderPairingErrorenum was renamed toReaderPairingErrorCode;ReaderPairingErroris now anExceptionclass. Several cases were renamed:bluetoothNotSupported→bluetoothUnsupported,bondingRemoved→bondFailed,timedOut→timeout. PaymentErrorCode: removedtimedOut(→timeout),noNetworkAndMerchantNotOptedIntoOfflineProcessing, andunknown; addedtrackingConsentIsPendingandpaymentAttemptIdReused.OfflinePaymentQueueErrorCode: removedunknown; addedconsentNotProvidedandobsoleteSdk.MockReaderUIErrorCode: removedunknown.ReaderModel: removedembedded.ReaderStatusInfoUnavailableReason:offLineSessionExpired→offlineSessionExpired,readerUnavailableOffLine→readerUnavailableOffline.OfflinePaymentnow has a requiredsourceTypefield.linkAppleAccount,relinkAppleAccount, andisAppleAccountLinkednow throw a typedTapToPayError(withTapToPayErrorCode) instead of returning/throwing generic strings.
Fixes #
AuthorizationManager.authorizenow reports a typed error (e.g. on revoked access tokens) instead of anunknowncode or hanging. (#74)- Tracking consent, environment, and currency codes are normalized for
json_serializable.
2026.5.1 #
- Upgrade Android and iOS native SDK to
2.5.0 - Add
SettingsManager.isShowingSettings()to check whether the Settings screen is currently presented - Add
SettingsManager.closeSettings()to programmatically dismiss the Settings screen - Add
ReaderManager.readerSettings()which returns a newReaderSettingsobject (isReducedChargingModeEnabled,preferredFirmwareUpdateTime). Adds a newTimeOfDaytype (hour,minute) used bypreferredFirmwareUpdateTime - Breaking:
ReaderInfo.firmwareVersionandReaderInfo.firmwarePercenthave been replaced by a singleReaderInfo.firmwareInfoobject of shape{ version, updatePercentage }, mirroring the 2.5.0 native API - Breaking (Android): Removed
ALIPAY,CASH_APP,SUICA,ID, andQUICPAYfrom the mappedCard.Brandvalues — these were removed in native SDK2.5.0
2026.3.1 #
Upgrade native SDKs: Android 2.4.0, iOS: 2.4.0
2025.12.1 #
Fix ReaderStatusInfo type issue
2025.11.2 #
Upgrade native SDKs: Android 2.3.4, iOS: 2.3.1
2025.11.1 #
- Support for paymentAttemptId
2025.9.1 #
Upgrade native SDKs: Android 2.3.1, iOS: 2.3.0 Remove deprecated use of toLower
- Adding consent tracking
- (iOS) reader info states
2025.7.1 #
Upgrade native SDKs: Android 2.3.0, iOS: 2.2.3 Remove deprecated use of toLower
2025.6.1 #
Add Offline payments support. Add Reader management support.
2025.3.0 #
Add Tap to Pay support for iOS.
2025.1.0 #
Mobile Payments SDK for Flutter:
First versions of SDK for Flutter, its include: Authentication, SDK State, Status, MockReader UI, Settings UI, Payment Processing.