locked
Determine if a Durable was previously purchased and has expired RRS feed

  • Question

  • By design, it seems like the Durable in-app purchase has an expiration date after which the app can re-purchase the durable. Is there a way to determine at any stage if a durable was previously purchased and has expired?

    1. First time installed the app: no durable add-on license exists

    2. First time purchased the add-on: durable add-on license exists and not expired

    3. Durable expired: no durable add-on license exists

    Notice that durable add-on license state in 3. is same as 1.

    Is there a way to uniquely identify 3. where the user has bought the durable add-on once?


    • Edited by cadmund Wednesday, October 17, 2018 11:31 PM
    Wednesday, October 17, 2018 11:30 PM

Answers

  • @cadmund,

    In this way what you want still can not be fixed by subscription addon. As we cannot query after the add-on expire. What I recommend is like the following: when your user has bought a durable add-on, you'd better log it as a flag. This flag contains this add-on's bought history and the expired time. In that way next time when your customer but it again you will read this flag and know that he has already bought and add-on and cannot purchase for it again. This may only be handled from our own code.

    Best regards,

    Barry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by cadmund Friday, October 19, 2018 4:43 PM
    Friday, October 19, 2018 9:32 AM

All replies

  • Hello,

    You can query the expiration date for the durable IAP by using the StoreLicense.ExpirationDate Property For full code you can have a look at Amy's post here:

    https://social.msdn.microsoft.com/Forums/en-US/ed46711d-66d9-4346-8e13-1d46453958ab/uwpiap-expired-time?forum=wpdevelop

    First query the license then query the ExpirationDate. After that you can use this value to compare with your current time to know whether a item is exprired. But please notice that you should query the expiration date before your durable item expired. 

    Best regards,

    Barry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, October 18, 2018 7:11 AM
  • "But please notice that you should query the expiration date before your durable item expired. "

    This is the issue. Perhaps I wasn't clear in my question:

    I want to know if a Durable has been previously purchased and has expired.

    Essentially, I'm looking to implement a 'trial' functionality for an add-on (NOT for the app itself). A user should be able to 'try' an add-on for a number of days and then, when the 'trial' expires, the user shouldn't be able to re-purchase the add-on. The current model for the durable add-on doesn't achieve this because it allows the user to re-purchase after it expires.

    Is there any way to achieve this?

    • Edited by cadmund Thursday, October 18, 2018 5:26 PM
    Thursday, October 18, 2018 5:23 PM
  • @cadmund,

    In this way what you want still can not be fixed by subscription addon. As we cannot query after the add-on expire. What I recommend is like the following: when your user has bought a durable add-on, you'd better log it as a flag. This flag contains this add-on's bought history and the expired time. In that way next time when your customer but it again you will read this flag and know that he has already bought and add-on and cannot purchase for it again. This may only be handled from our own code.

    Best regards,

    Barry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by cadmund Friday, October 19, 2018 4:43 PM
    Friday, October 19, 2018 9:32 AM
  • Thanks.

    This doesn't solve my problem, but it does confirm my suspicion and therefore I can consider this question answered.


    Friday, October 19, 2018 4:50 PM