Skip to main content

Deferred and pending purchases

Deferred or interrupted in-app purchases may happen when SCA confirmation is needed, in the case of parental control and some other cases. Here is what the deferred purchase flow looks like:
  • a user initiates a purchase
  • purchase is received in state deferred.
  • you receive a purchase result with a pending purchase status (on iOS and Android) or an error with a deferred purchase description (on cross-platform SDKs)
Qonversion.shared().purchase(product) { (result) in
  if result.isPending {
    // Handle pending purchase
  }
}
  • if a transaction completes successfully later, Apple StoreKit or Google Billing Service returns a successful purchase
  • Qonversion SDK returns a successful purchase
Make sure your app handles deferred or interrupted transactions by setting a delegate and a function that is triggered when such a transaction is made.

Attention

Please note, this function is called only in case of deferred purchases. The purchase flow happens as described here for all other cases.

Provide entitlements update listener

Set the delegate to handle pending purchases and implement the corresponding function to handle new entitlements when the purchase is completed.
Qonversion.shared().setEntitlementsUpdateListener(self)

...

func didReceiveUpdatedEntitlements(_ entitlements: [String : Qonversion.Entitlement]) {
    // handle updated entitlements here
}
You can also provide a listener during the initialization for some platforms as follows:
final QonversionConfig qonversionConfig = new QonversionConfig.Builder(
        this,
        "projectKey",
        QLaunchMode.SubscriptionManagement
)
        .setEntitlementsUpdateListener(entitlements -> {
            // handle updated entitlements here
        })
        .build();
Qonversion.initialize(qonversionConfig);

Tutorials Non-Subscription Purchases