1

source: https://developer.apple.com/library/content/releasenotes/General/ValidateAppStoreReceipt/Chapters/ReceiptFields.html#//apple_ref/doc/uid/TP40010573-CH106-SW11

I have some confusion regarding is_trial_period for ios in app purchase..

"Subscription Trial Period - This key is only present for auto-renewable subscription receipts. The value for this key is “true” if the customer’s subscription is currently in the free trial period, or “false” if not.

Note: If a previous subscription period in the receipt has the value “true” for either the is_trial_period or the is_in_intro_offer_period key, the user is not eligible for a free trial or introductory price within that subscription group."

Question: Do you need to use is_trial_period flag to your app logic? or just use the expires_date flag for the app logic, on checking for the subscription?

  • You don't need to use it to determine if a subscription is active. You might want to use it for conversion tracking (e.g. how many people don't renew after the free trial) or to prompt the user when their free trial is coming to an end (e.g. display "How have you enjoyed your free trial of xyzapp?") – Paulw11 Apr 06 '18 at 09:21
  • Thank you for the answer sir, I have a follow up question, how can you determine the exact end date of the free trial period, if have this data from validate receipt sandbox response: (please go to link) https://www.screencast.com/t/fyr5P4bx4Cz , In my case I have (is_trial_period = TRUE and expires_date = 2017-10-03 08:30:28) meaning my subscription has expired but my trial period is true, In your experience, How do you handle it in this situation? Do I prompt the user to subscribe or Do I just continue his/her subscription because trial period is TRUE? Thank you. – user3373736 Apr 06 '18 at 19:19
  • No, if you have reached the expiration date then the subscription is no longer active. The is_trial_period tells you that that subscription period was a free trial. Each time the subscription renews you get a new subscription block in the receipt, – Paulw11 Apr 06 '18 at 21:04
  • Thank you so much sir, this clarifies everything. – user3373736 Apr 07 '18 at 12:08
  • Hello Sir, I have one concern, which subscription block in the receipt did you get to check the current subscription? What was your hint that it is the current block of subscription list? – user3373736 Apr 11 '18 at 09:27
  • If you are validating the receipt locally then you need to look through the set of in app purchase receipts and look at the subscription expiration date of each one and determine the latest. If you are validating the receipt through the Apple sever then you can check the `latest_receipt` returned by the server – Paulw11 Apr 11 '18 at 12:27
  • Thank you again sir, this has been very helpful. – user3373736 Apr 12 '18 at 06:11

0 Answers0