How to support / offer iOS subscriptions with a free trial period?
Asked Answered
W

1

5

I am working on shifting my existing iOS 10+ app to offer auto-renewing subscriptions.

While "normal" subscriptions (no introductory offer) work fine both within my app and on my server (receipt validation and user account handling) I am having a hard time to understand how a free trial period can be offered.

Setting up the free trial period in App Store Connect is no problem, but I do not understand how to implement it in my app and on my server.


Problem 1 : Understanding eligibility

From the Apple docs:

You can make introductory offers to customers who haven’t previously received an introductory offer for the given product, or for any products in the same subscription group (...)

Before offering introductory price, you must first determine if the user is eligible to receive it (...)

To determine if a user is eligible for an introductory offer, check their receipt...

Assume I have setup a subscription with a 7 day free trial. A user purchases this subscriptions, uses the free trial and continues the paid subscriptions for a while before the subscription is canceled. Some time later the wants to continue the subscriptions

What happens if the user purchases the same subscription product again?

  • Will fail because he has already used the free trial? ("... who haven’t previously received an introductory offer...")
  • Will it start with another free trial period? (== Store does not check the eligibility at all)
  • Will it start with no free trial but directly with a payed period

In other words:

Is checking the eligibility only necessary to show the right UI (= grant offer yes/no is checked by store) or to make sure the user does not benefits from the same offer (= grant offer yes/no is checked by app)?


Problem 2 : How to check eligibility?

As described in the apple docs the best way to check the eligibility is to validate the app receipt and to check whether an introductory offer has been received or not. This should be done as early as possible, at app start at best.

Fine, but as far as I know the receipt is not guaranteed to be available. If no receipt can be found the user has to first provide his app store credentials to download the receipt...

It would be quite annoying if the first thing the app does on the the first start would be to ask the user to login to the store.

Is this really the intended implementation?


Problem 3 : How to handle eligibility?

Assume that I have successfully check whether the user is eligible to receive an offer or not: How to provide the offer?

Do I have to setup two different subscription products in App Store Connect (one with free trial and one without) to let the user purchase the one or the other?

Or the eligibility check only necessary to display the correct UI ("Purchase now with free trial" vs "Purchase now") while I can use the same product in both cases?

Wispy answered 15/8, 2019 at 14:51 Comment(0)
W
5

Problem 1 : Understanding eligibility

He will be charged for the subscription immediately. Free-trial can be availed only once

Problem 3 : How to handle eligibility?

  1. Do I have to setup two different subscription products in App Store Connect (one with free trial and one without) to let the user purchase the one or the other?

    No. You only need to setup one product and add Introductory offer (free trial or intro offer)

  2. Or the eligibility check only necessary to display the correct UI ("Purchase now with free trial" vs "Purchase now") while I can use the same product in both cases?

    It is only for showing correct CTA and messaging. At the end of the day, Store(Apple) is the one who is taking the decision if user will get free-trial or not

To check eligibility of the user you need to pass the receipt to your server. Your server can then query Apple for the decoded receipt (/verifyReceipt endpoint). In decoded receipt, check all the txn in latest_renewal_info list. if you find is_in_free_trial field to be true for any product in same subscription group then you can safely assume that user has used free trial before and show right messaging to the user.

Also, user can get free trial only once per subscription group even if all the products under that have free trial enabled.

I agree that Apple would have provided eligibility in the app itself while querying the product. But trust me none of the App stores provide this information including Google.

As far as login is concerned, the receipt is always present at a sandbox location and can be retrieved from there. (Also, do consider that user anyway can't buy the subscription if he is not logged in)

Win answered 25/9, 2019 at 19:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.