io.primer:checkout, 3.x). Changes to the 2.x Android SDK (io.primer:android, Drop-in and Headless) are on the Android SDK (legacy) page.
Primer Checkout for Android is in beta. The API can still change before the stable release.
๐คนโโ๏ธ Breaking changes
PrimerCheckoutState.BeforeClientSessionUpdatedandPrimerCheckoutState.ClientSessionUpdatedare removed. A client-session update now goes fromReadyto a newReadycarrying the updated session. UsePrimerCardFormController.state.isLoadingto show progress while the update runs.PrimerThemetakes a newappearanceModeparameter, andborderWidthTokens: BorderWidthTokensis nowwidthTokens: WidthTokens. Calls that pass theme arguments by position no longer compile.primerColorBackgroundis renamedprimerColorBackgroundPrimary.- The raw palette colours (
primerColorGray*,primerColorRed*,primerColorBlue*,primerColorGreen*) and the background tokens no view draws with are no longer public. Theme with the semantic tokens instead. primerColorBorderOutlinedHover,primerColorBorderTransparentHoverand thebaseradius, spacing and size tokens are removed.SizeTokens.xxlargedefaults to 40dp instead of 44dp.
- Google Pay: Express Checkout shipping.
PrimerCheckoutController.onShippingAddressChangereturns the shipping options for the address the shopper picks in the Google Pay sheet, andonShippingOptionChangeconfirms the option they select. - Google Pay now depends on
com.google.android.gms:play-services-wallet20.0.0 (was 19.5.0). PrimerAppearanceMode(LIGHT,DARK,SYSTEM) onPrimerThemesets light, dark or system appearance for the whole checkout.- New
primerColorOnBrandcolour for content drawn on the brand colour, such as the pay button label. - Card and billing fields offer system autofill.
- Card form fields and the country field are locked while a payment is in progress.
- Checkout UI test tags are exposed as resource ids, so UI test tools outside Compose can find them.
- Changing dark mode, locale or font size during checkout no longer crashes the card form.
- The SDK no longer re-initialises when the composable that hosts it recomposes.
formatAmountworks in every state after the firstReady, not only inReady.- Redirect payment methods no longer fail with
failed-to-redirectin apps that donโt include Drop-in. - Deleting a saved card no longer crashes, and cancelling a delete keeps the selected card.
- Edit mode on the saved cards list ends when the shopper leaves the list.
- The amount stays in the payment list title after a failed payment.
- Every typography setting in the theme is applied, including font weight.
- Error text follows the
bodySmalltext style. - Colours that ignored the merchantโs theme now use it: vault and back icons, the delete prompt, the Klarna button.
- NaN and infinite numbers in the theme are ignored instead of breaking the layout.
- Input fields are 44dp tall, spaced to match the design.
- The payment method list, the Google Pay button and the Klarna badge match the design, and the Klarna screen shows its title.
- A card shows the default grey card art until its network is known.
- The country search field has no floating label.
- Four billing address placeholders use the same wording as iOS.
- The pay buttonโs accessibility label reads its visible title.
๐ New features
PrimerCheckoutState.FailurecarriescheckoutDatawith the payment id, order id and status when a payment was created.
๐ New features
- Google Pay:
allowCreditCardsandallowPrepaidCardsoptions. - Klarna: the bundled Klarna SDK is upgraded to 2.11.x.
- Payment results carry the payment status.
- Backend-driven payment methods no longer show a title bar on their redirect web view.
- Backend-driven payment methods are left out of the list in manual payment handling mode.
๐ New features
onBeforePaymentCreateruns before the SDK creates a payment. Continue or abort the payment, and set an idempotency key for it.
๐ New features
- QR code payment methods.
- Backend-driven payment methods with dynamic forms and redirects.
PrimerCardFormControllerexposes BIN data for the card being entered.- An idempotency key can be set for payments.
orderedAllowedCardNetworksandcvvLabelon the card network descriptor.- The sheet and inline checkout share one implementation.
- Theme
textColorand dark mode surfaces are applied, and the card surface in dark mode matches iOS. - JavaScript sandbox errors are handled instead of failing the checkout.
- Navigation-step controllers are no longer part of the public API.
๐คนโโ๏ธ Breaking changes
- The package namespace changed from
io.primer.android.componentstoio.primer.checkout. Update your imports.