SDKBOX IAP Plugin: Non-Renewing Subscriptions not restoring

Apple is requiring that I use the Non-Renewing Subscription type instead of Consumable because our items are requiring that our players make an advanced purchase for an item or service in our game. I have made the following change in sdkbox_config.json:

    "iap": {
        "items": {
            "iap_90_day": {
                "type": "subscription",
                "id": "tbd.nrsub.90_1005"
            }, 
            "iap_30_day": {
                "type": "subscription",
                "id": "tbd.nrsub.30_1004"
            }
        }
    }

and I am able to refresh and purchase fine, but I don’t think restore is working. According to the Apple documentation: “***If your app uses non-renewing subscriptions, your app is responsible for the restoration process.***” so I believe I will need to restore these non-renewing subscription purchases.

Furthermore, when I look at the product vector returned when I refresh (onProductRequestSuccess) I noticed that the type is set to “CONSUMABLE” even though I have changed it to subscription is the config file.

Is there support for non-renewing subscriptions that can be restored?

For subscription, you need to set the item as “non_consumable” and doing restore purchase maybe everytime your app starts to make sure the item is still valid.

I have tried this, but I don’t receive any onRestore() events after calling sdkbox::IAP::restore(). I only receive onRestoreComplete(true, “”). I would expect one onRestore() call for each product that was previously purchased.

Interestingly, if I attempt to purchase again, I get an iOS dialog that states:

You’ve Already Purchased This Subscription.
Tap Buy to renew or extend it.

so I know that the non-renewing subscription item was previously purchased successfully. Furthermore, I am able to buy the item again and I do get another onSuccess() callback for this product.

@nite, @staras how can you solve this, i encounter the same problem, i try to put type = “non_consumable”, but nothing is changed.

It is ok if we have a server to store user purchase. but if not how can we know to restore user’s subcription?

For ex: user buy one month sub, so they can use to 30/4/2017. But before that they remove their app and install later. How can we get the date they buy that one month sub, to recalculate the date to 30/4/2017 (or if we can get the expired date, it would be great).

Sorry to ask this, i’m new to these kind of IAP

We already fixed this issue, now you can use subscription as non_consumable, and use restore purchase to check if the subscription is active.

I am calling restore everytime when app starts to check if subscription is active or not… But its having issue where it always asks for iTunes password on open…
Please help… My game is live and getting lots of negative comments coz of this issue…

On iOS you should only restore upon user request, it is apple policy, it always sows the login screen. On Android you should silently restore upon game start.