-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Fetching and Redeeming Win-Back Offers on Custom Paywall #1134 #1218
Conversation
static Future<List<WinBackOffer>> getEligibleWinBackOffersForPackage( | ||
Package package, | ||
) async => | ||
getEligibleWinBackOffersForProduct(package.storeProduct); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We intentionally use the getEligibleWinBackOffersForProduct
function here so that the offer caching logic only needs to be implemented once in the PHC layer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 🚀
This PR exposes four new functions to allow developers to fetch & redeem win-back offers that a subscriber is eligible for in their custom paywalls. These functions only function on iOS 18.0+ and require StoreKit 2 to be used.
Fetching Eligible Win-Back Offers
Redeeming Win-Back Offers
Other Changes
The PurchaseTester app was updated with a new screen to support testing these flows
Docs
Code snippets for these functions are added to the public docs in this PR: https://github.com/RevenueCat/docusaurus/pull/526
Testing
All flows were tested manually through the new screen in the PurchaseTester app, and the API tester has been updated with the new functions.