Android SDK changelog
The four artifacts (eu.purse:headless-checkout-android, -googlepay, -klarna, -paypal) release together and share one version. Versions follow semantic versioning: from 1.0.0, a change that removes or alters a public declaration ships as a major with a migration note below, an addition is a minor and a fix is a patch. While the SDK is in 0.x, a breaking change bumps the minor version instead, still with a migration note. The generated KDoc reference of each version is attached to its GitHub release. This documentation describes the latest release.
First release of the Headless Checkout Android SDK: the payment engine, the payment elements, card (Purse vault), Google Pay, PayPal, Klarna, redirection methods, gift cards, saved methods and BNPL simulation, published on Maven Central under eu.purse.
init(disabledMethods = …) replaces the process-global PluginRegistry.disable.low impactMigration guide
Pass the methods to hide when you build the checkout:
// Before
PluginRegistry.disable(Partner.Paypal, Method.Wallet)
// After
PurseHeadlessCheckout.init(widgetData, disabledMethods = setOf(MethodKey(Partner.Paypal, Method.Wallet)))
PaymentOutcome (Completed, ReturnedFromRedirect, Canceled, Failed) replaces the onResult / onError / onCanceled callbacks of the payment element listener.moderate impactMigration guide
Implement onOutcome(outcome: PaymentOutcome) and branch on the outcome with when. Every failure is a typed PurseException with a stable code.
eu.purse:headless-checkout-android, plus one optional artifact per partner SDK: headless-checkout-googlepay, headless-checkout-klarna, headless-checkout-paypal.moderate impactMigration guide
Depend on eu.purse:headless-checkout-android and add only the partner artifacts for the methods your sessions offer. A method whose artifact is missing reports METHOD_NOT_IMPLEMENTED on submit.
eu.purse:headless-checkout-android: the engine, rememberPaymentElement / PaymentElementUi, card and redirection methods, gift cards, saved methods, instalment simulation.installments widget (KlarnaPaymentView) in headless-checkout-klarna.saveState() / restore(): the checkout survives process death during a bank or PayPal step.DisabledState carries a displayable message; every item is locked as SUBMITTING while a submit is in flight; A technically disabled item mounts no UI, and choosing a disabled item as primary throws METHOD_DISABLED; New error codes METHOD_DISABLED, SUBMIT_BLOCKED and CHECKOUT_TORN_DOWN; teardown() is observable through isTornDown and final; A /validate that left the device without an answer is flagged outcomeUnknown on ValidateFailed; The splitter refuses invalid gift card takes and enforces the issuer's usage_per_session_limit; Co-badged brand picker in the card form; each secure card field is framed like the web SDK's inputs; Google Pay: Google Pay button is rectangular by default; Monitoring: HEADLESS_CHECKOUT_CREATE carries the device context, one instanceId per checkout kept across setSession and restore, method suspensions reported as HEADLESS_CHECKOUT_METHOD_DISABLED events, and PAYMENT_ERROR says why a payment failed attempt by attempt; Sample app: a store setup, merchant checkout and receipt flow, with BNPL simulation and instalments display.Dispatchers.IO; The loan simulation total counts each instalment once; The monitoring envelope follows the current session after setSession; telemetry carries shorter stack traces and no raw amounts, except the simulated amount of HEADLESS_CHECKOUT_METHOD_LOAN_SIM; A redirect return intent is accepted only on the app's own scheme; The redirect WebView only loads HTTPS pages from an allow-list and is locked down; An Activity recreated after process death reports a return from the redirect, not a cancel; Sample app: payment elements stay composed while a payment is in flight, and the receipt says "Payment method" unless the payment was authorized.