How to check purchase eligibility

Generated on 11/29/2024

1 search

To check purchase eligibility for App Store offers, particularly win-back offers, you can follow these steps as outlined in the "Implement App Store Offers" session from WWDC 2024:

  1. Fetch Subscription Status: First, retrieve the current status of the subscription using the subscription group ID and a list of product IDs. This will help you determine if the customer is currently subscribed and if auto-renewal is enabled.

  2. Check Introductory Offer Eligibility: Determine if the customer is eligible for an introductory offer. If they are not eligible, proceed to check for win-back offer eligibility.

  3. Win-back Offer Eligibility: Use the new API called eligible Winback offer ids found in the renewal info object of the subscription status model. This API provides a personalized list of eligible win-back offers for each customer.

  4. Display Offers: If there is at least one win-back offer, you can return that along with its respective product for the customer to redeem. If the list of eligible win-back offer IDs is empty, the customer is not eligible for any offer, and you can show the regular subscription pricing.

  5. Testing: Use StoreKit testing in Xcode to test different scenarios of customer eligibility and subscription statuses. This allows you to configure and test win-back offers efficiently.

For more detailed guidance, you can refer to the session chapter on Support win-back offers (16:50).