Checking Subscription Status

Check Premium Access

Returns true if user has active subscription or non-renewing lifetime purchase.

Use this method to determine whether or not user has active premium access. If you have consumable purchases, this method won't operate correctly, because Apphud SDK doesn't differ consumables from non-consumables.


Important Note

You should not use this method if you have consumable in-app purchases, like coin packs.

[Apphud hasPremiumAccess];
await Apphud.hasPremiumAccess();

Check Subscription Status

Returns true if user has active subscription.

Use this method to determine whether or not user has active premium subscription.


If you have non-consumable or consumable purchases, you should better use Apphud.isNonRenewingPurchaseActive(productIdentifier:) or Appud.hasPremiumAccess().

[Apphud hasActiveSubscription];
await Apphud.hasActiveSubscription();
await ApphudSdk.hasActiveSubscription();

Get Subscription Details

To get subscription object (which contains expiration date, autorenewal status, etc.) use the following method:

[Apphud subscription];
await Apphud.subscription();
await ApphudSdk.subscription();


Important Note

If user has more than one active subscription, this method will return the first subscription from the array. Consider using Apphud.subscriptions() method in this case.

Check Non-Renewing Purchase Status

Use this method to check whether the user has purchased in-app purchase and it's not refunded. Returns false if was never purchased or is refunded.

Apphud.isNonRenewingPurchaseActive(productIdentifier: "productID")
[Apphud isNonRenewingPurchaseActiveWithProductIdentifier:@"producID"];
await Apphud.isNonRenewingPurchaseActive("producID")
await ApphudSdk.isNonRenewingPurchaseActive("producID")

Get Non-Renewing Purchase Details

To get non-renewing purchases, which contain purchase date, product identifier and cancellation date, use the following method:

[Apphud nonRenewingPurchases];
await Apphud.nonRenewingPurchases();
await ApphudSdk.nonRenewingPurchases();

It will return array of all non-renewing in-app purchases user has ever purchased. In-app purchases are sorted by purchase date.