Skip to content

Add WebCheckoutOpened result & handling#3536

Draft
alexrepty wants to merge 1 commit into
mainfrom
alex/web-checkout-opened-result
Draft

Add WebCheckoutOpened result & handling#3536
alexrepty wants to merge 1 commit into
mainfrom
alex/web-checkout-opened-result

Conversation

@alexrepty

@alexrepty alexrepty commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Introduce WebCheckoutOpened to represent the user tapping a web checkout CTA and leaving the app. Add PaywallListener.onWebCheckoutOpened(), propagate a notifyWebCheckoutOpened() call through PaywallViewModel (impl calls listener), and have InternalPaywall call it and close the paywall with PaywallResult.WebCheckoutOpened when autoDismiss is true. Add a no-op override in LoadingViewModel, update MockViewModel to track calls/results, forward the event to user listeners in PaywallActivity, and add a test ensuring LaunchWebCheckout with autoDismiss closes with WebCheckoutOpened. Update api.txt to expose the new API surface.

Checklist

  • If applicable, unit tests
  • If applicable, create follow-up issues for purchases-ios and hybrids

Motivation

Description


Note

Low Risk
Additive public API and clearer dismiss semantics for web checkout; limited to RevenueCat UI paywall flows with tests.

Overview
Adds a dedicated web checkout outcome so hosts can tell “user left for external payment” apart from cancelled or a completed in-app purchase.

PaywallResult.WebCheckoutOpened is a new parcelable activity result. PaywallListener.onWebCheckoutOpened() fires after the checkout URL opens. PaywallViewModel.notifyWebCheckoutOpened() routes that to the listener; on LaunchWebCheckout with autoDismiss, InternalPaywall now calls closePaywall(PaywallResult.WebCheckoutOpened) instead of a generic dismiss. PaywallActivity forwards the listener callback; loading/mock view models implement the new API; api.txt and a compose test cover auto-dismiss + result.

Reviewed by Cursor Bugbot for commit b455289. Bugbot is set up for automated code reviews on this repo. Configure here.

Introduce WebCheckoutOpened to represent the user tapping a web checkout CTA and leaving the app. Add PaywallListener.onWebCheckoutOpened(), propagate a notifyWebCheckoutOpened() call through PaywallViewModel (impl calls listener), and have InternalPaywall call it and close the paywall with PaywallResult.WebCheckoutOpened when autoDismiss is true. Add a no-op override in LoadingViewModel, update MockViewModel to track calls/results, forward the event to user listeners in PaywallActivity, and add a test ensuring LaunchWebCheckout with autoDismiss closes with WebCheckoutOpened. Update api.txt to expose the new API surface.
@alexrepty alexrepty requested a review from a team as a code owner June 4, 2026 11:54
@alexrepty alexrepty marked this pull request as draft June 4, 2026 11:54
@RevenueCat-Danger-Bot

Copy link
Copy Markdown
1 Error
🚫 Label the PR using one of the change type labels. If you are not sure which label to use, choose pr:other.
Label Description
pr:feat A new feature. Use along with pr:breaking to force a major release.
pr:fix A bug fix. Use along with pr:force_minor to force a minor release.
pr:other Other changes. Catch-all for anything that doesn't fit the above categories. Releases that only contain this label will not be released. Use along with pr:force_patch, or pr:force_minor to force a patch or minor release.
pr:RevenueCatUI Use along any other tag to mark a PR that only contains RevenueCatUI changes
pr:next_release Preparing a new release
pr:dependencies Updating a dependency
pr:phc_dependencies Updating purchases-hybrid-common dependency
pr:changelog_ignore The PR will not be included in the changelog. This label doesn't determine the type of bump of the version and must be combined with pr:feat, pr:fix or pr:other.

Generated by 🚫 Danger

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