Skip to content

Refresh CheckoutController state after confirmation - #13803

Draft
jaynewstrom-stripe wants to merge 1 commit into
jaynewstrom/checkout-controller-confirmation-resultsfrom
jaynewstrom/checkout-controller-refresh-confirmed-state
Draft

Refresh CheckoutController state after confirmation#13803
jaynewstrom-stripe wants to merge 1 commit into
jaynewstrom/checkout-controller-confirmation-resultsfrom
jaynewstrom/checkout-controller-refresh-confirmed-state

Conversation

@jaynewstrom-stripe

@jaynewstrom-stripe jaynewstrom-stripe commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a confirmation-state updater that uses the response returned by synchronous confirmation or refetches after a next action.
  • Reloads all response-derived controller state before delivering Completed.
  • Serializes confirmation refreshes with configuration and mutation work while keeping refresh failures from changing a successful payment result.

At this layer the refreshed session remains loaded; the final PR clears it after refresh.

Stack position: 4 of 5, based on #13802.

Motivation

Confirmation can finish while another controller mutation is still in flight, and next-action results do not carry a Checkout Session response. Refreshing through the controller's existing serialization path prevents stale writes and ensures derived state is synchronized without converting a completed payment into a failure when refresh work fails.

Testing

  • Added tests
  • Modified tests
  • Manually verified

./gradlew :paymentsheet:testDebugUnitTest --tests com.stripe.android.checkout.CheckoutConfirmationResultHandlerTest --tests com.stripe.android.checkout.CheckoutConfirmationStateUpdaterTest --tests com.stripe.android.checkout.CheckoutControllerTest

No tests were ignored.

Screenshots

Not applicable — there are no visual changes.

Changelog

Not included — CheckoutController remains a preview API.

@jaynewstrom-stripe
jaynewstrom-stripe requested review from a team as code owners August 6, 2026 19:19
@jaynewstrom-stripe
jaynewstrom-stripe requested review from tjclawson-stripe and removed request for a team August 6, 2026 19:19
@jaynewstrom-stripe
jaynewstrom-stripe marked this pull request as draft August 6, 2026 19:21
@jaynewstrom-stripe
jaynewstrom-stripe force-pushed the jaynewstrom/checkout-controller-refresh-confirmed-state branch from f6ac548 to e57bbaf Compare August 6, 2026 19:49
@jaynewstrom-stripe
jaynewstrom-stripe force-pushed the jaynewstrom/checkout-controller-refresh-confirmed-state branch from e57bbaf to 602b55c Compare August 6, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant