Skip to main content
Version: 3.0

Restore purchases in mobile app

Restoring Purchases in both iOS and Android is a feature that allows users to regain access to previously purchased content, such as subscriptions or in-app purchases, without being charged again. This feature is especially useful for users who may have uninstalled and reinstalled the app or switched to a new device and want to access their previously purchased content without paying again.

note

In paywalls built with Paywall Builder, purchases are restored automatically without additional code from you. If that's your case — you can skip this step.

To restore a purchase if you do not use the Paywall Builder to customize the paywall, call .restorePurchases() method:

Adapty.restorePurchases { [weak self] result in
switch result {
case let .success(profile):
if info.profile.accessLevels["YOUR_ACCESS_LEVEL"]?.isActive ?? false {
// successful access restore
}
case let .failure(error):
// handle the error
}
}

Response parameters:

ParameterDescription
Profile

An AdaptyProfile object. This model contains info about access levels, subscriptions, and non-subscription purchases.

Сheck the access level status to determine whether the user has access to the app.