Product Center

In-app Subscription toolkit for iOS and Android Apps. Subscription infrastructure to manage your in-app purchases in one place. Build your subscription infrastructure without server code.

Hot It Works

  1. Application calls the purchase method to initialize Qonversion SDK.

  2. Qonversion SDK communicates with StoreKit or Google Billing Client to make a purchase.

  3. If a purchase is successful, the SDK sends a request to Qonversion API for server-to-server validation of purchase. Qonversion server unlocks permissions associated with the product.

  4. SDK returns control to the application with a processing state

Getting Started

Qonversion Product Center provides an easy way for managing all your in-app purchases, regardless of platform and purchase type.

Product Center consists of two elements:

  • Permissions

  • Products

Permissions

Permission is access to some parts or premium features of your application. Examples of permissions could be:‌

  • YouTube Premium

  • Netflix Standart, Netflix Premium

  • Duolingo Plus

Most applications have only one permission that provides premium access.

Product

Product is a cross-platform in-app purchase that represents Apple Products and Google Subscription Products in Qonversion. Every product has duration and type.

Product Type

  • Trial Subscription: provides access to content on a recurring basis with a free introductory offer

  • Subscription: provides access to content on a recurring basis

  • One-time product: content that users can purchase with a single, non-recurring charge

Trial Subscription and Subscription products have a duration:

  • Weekly

  • 1 Month

  • 3 Months

  • 6 Months

  • Annual

  • Lifetime

Creating and Configuring Products

Create Product

  1. Navigate to the Product Center section. Tap the Create button and select Products.

2. Fill in the product details.

  • Qonversion Identifier – unique product id. It will be used by the SDK to make purchases.

  • Apple App Store Product Identifier – product identifier on Apple App Store. You can read here how to create an auto-renewable subscription.

  • Google Console Product Identifier – product identifier on Google Console. You can read here how to create a subscription.

  • Associated Permissions – the list of permissions that will be unlocked after product purchase.

Create Permission

  1. Navigate to the Product Center section. Tap the Create button and select Permissions.

2. Fill in the permission details

  • Identifier – unique permission id. It will be used by the SDK to check user permissions.

  • Description – short custom field.

  • Products – list of products which activates the cross-platform permission.

Usage Samples in SDKs

Check user permissions

Swift
Objective-C
Java
Swift
Qonversion.checkPermissions { (permissions, error) in
if let error = error {
// handle error
return
}
if let premium = permissions["premium"], premium.isActive {
switch premium.renewState {
case .willRenew, .nonRenewable:
// .willRenew is state for auto-renewable purchases
// .nonRenewable is state for in-app purchases that unlock the permission lifetime
break
case .billingIssue:
// Grace period: permission is active, but there was some billing issue.
// Prompt the user to update the payment method.
break
case .cancelled:
// The user canceled the subscription, but the subscription has not expired yet.
// Prompt the user to resubscribe with some special offer.
break
default: break
}
}
}
Objective-C
[Qonversion checkPermissions:^(NSDictionary<NSString *,QNPermission *> * _Nonnull permissions,
NSError * _Nullable error) {
QNPermission *premiumPermission = permissions[@"premium"];
if (premiumPermission && premiumPermission.isActive) {
switch (premiumPermission.renewState) {
case QNPermissionRenewStateWillRenew:
case QNPermissionRenewStateNonRenewable:
// QNPermissionRenewStateWillRenew is state for auto-renewable purchases
// QNPermissionRenewStateNonRenewable is state for in-app purchases that unlock the permission lifetime
break;
case QNPermissionRenewStateBillingIssue:
// Grace period: permission is active, but there was some billing issue.
// Prompt the user to update the payment method.
break;
case QNPermissionRenewStateCancelled:
// The user canceled the subscription, but the subscription has not expired yet.
// Prompt the user to resubscribe with some special offer.
break;
default:
break;
}
}
}];
Java
Will be available soon

Make purchase

Swift
Objective-C
Java
Swift
Qonversion.purchase("main") { (permissions, error, isCancelled) in
if let premium = permissions["premium"], premium.isActive {
// Flow for success state
}
}
Objective-C
[Qonversion purchase:@"main" result:^(NSDictionary<NSString *,QNPermission *> * _Nonnull permissions,
NSError * _Nullable error,
BOOL cancelled) {
QNPermission *premiumPermission = permissions[@"premium"];
if (premiumPermission && premiumPermission.isActive) {
// Flow for success state
}
}];
Java
Will available soon

main_product– Qonversion Product Identifier created in the Product Center.

Get products

Swift
Swift
Qonversion.products { products in
let product = products["main"]
if product.type == .trial {
}
}