Skip to content

Fix stale Checkout saved method selection - #14522

Merged
jaynewstrom-stripe merged 1 commit into
masterfrom
fix/checkout-rebind-saved-selection
Oct 6, 2026
Merged

jaynewstrom-stripe merged 1 commit into
masterfrom
fix/checkout-rebind-saved-selection

Conversation

@jaynewstrom-stripe

Copy link
Copy Markdown
Collaborator

Summary

  • Rebind Checkout's selected saved payment method to the updated object returned after Payment Options is canceled.
  • Continue clearing the selection when the saved payment method was removed.
  • Add regression coverage for editing the selected payment method and then canceling.

Motivation

Checkout updates its customer payment-method list when Payment Options is canceled, but previously only checked whether the selected method ID still existed. If that method had been edited, the parent selection retained the old object and could show stale label, billing, or network data. This matches FlowController's behavior by rebinding the selection to the updated object with the same ID.

Testing

  • Added tests
  • Modified tests
  • Manually verified

Automated checks:

  • ./gradlew :paymentsheet:testDebugUnitTest --tests 'com.stripe.android.checkout.CheckoutSheetLauncherTest' (40 tests passed)
  • ./gradlew detekt

No tests were ignored.

Screenshots

Not applicable; this fixes selection state synchronization without changing UI layout.

Changelog

Not applicable; Checkout Session is a preview API.

Committed and created by Codex.

@jaynewstrom-stripe
jaynewstrom-stripe force-pushed the fix/checkout-rebind-saved-selection branch 2 times, most recently from 533bf66 to c37de40 Compare September 14, 2026 13:59
@jaynewstrom-stripe
jaynewstrom-stripe force-pushed the fix/checkout-rebind-saved-selection branch 3 times, most recently from d09e14d to 2878e14 Compare October 6, 2026 17:39
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
@jaynewstrom-stripe
jaynewstrom-stripe force-pushed the fix/checkout-rebind-saved-selection branch from 2878e14 to 8b50ebf Compare October 6, 2026 19:13
@jaynewstrom-stripe
jaynewstrom-stripe marked this pull request as ready for review October 6, 2026 19:59
@jaynewstrom-stripe
jaynewstrom-stripe requested review from a team as code owners October 6, 2026 19:59
@jaynewstrom-stripe
jaynewstrom-stripe enabled auto-merge (squash) October 6, 2026 21:14

@cttsai-stripe cttsai-stripe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a PR that only adds tests?

@jaynewstrom-stripe
jaynewstrom-stripe merged commit ff40ca8 into master Oct 6, 2026
47 checks passed
@jaynewstrom-stripe
jaynewstrom-stripe deleted the fix/checkout-rebind-saved-selection branch October 6, 2026 21:20
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.

2 participants