CheckoutElementsController
Controls a Stripe Checkout Session: load it with configure, observe it through session, mutate it with the various update/apply/select methods, and present payment UI with a CheckoutElementsPresenter created via createPresenter.
Create instances with Builder.
Types
Builder for an address passed to updateShippingAddress.
Builds CheckoutElementsController instances.
Configuration options for a CheckoutElementsController, including per-element configuration and feature toggles. Build with the fluent setters and pass to CheckoutElementsController.configure.
The result of a Checkout Controller operation such as configure or applyPromotionCode. Use Failed.displayMessage for customer-facing text. Failed.error retains diagnostic details.
The result of a checkout payment flow, delivered to ResultCallback.
Callback invoked with the Result of a checkout payment flow, including failures before confirmation starts. Each rejected CheckoutElementsPresenter.confirm call delivers Result.Failed with an IllegalStateException explaining the reason. An active confirmation continues and delivers its own result.
Properties
Whether a mutation or confirmation is currently in progress or queued.
The latest Session data, or null when no checkout is configured. After successful confirmation, this is cleared after ResultCallback returns.
Functions
Clears the customer's selected payment option, resetting it to null.
Loads the Checkout Session identified by clientSecret and prepares the payment UI, populating session on success.
Creates a CheckoutElementsPresenter bound to activity, used to present the payment UI for this checkout session.
Releases resources held by this controller and clears its loaded state. Call this when the controller is no longer needed.
Runs an async function that calls your server to update the Checkout Session, then automatically refreshes session with the latest session data.
Updates the customer's email address.
Sets the shipping address for this checkout.