Promotional Offers

This guide will help you to configure Promotional Offers to use in your app.

📘

iOS Only

This guide applies to iOS only.

Apps with auto-renewable subscriptions can offer a discounted price or free period for existing or lapsed customers. This feature is called a subscription offer and is available for users with iOS 12.2 or higher. Unlike introductory offer, subscription offers can be applied as many times as you decide but requires generating a signature on your server before purchasing. Apphud does the job for you.

Set up Subscription Offers

🚧

Attention

In-App Purchase Key is required. Signing promotional offers require In-App Purchase Key to be uploaded to Apphud.

To create a new subscription offer go to App Store Connect, then go to your app's subscription product page. Click on the "+" option under Subscription Prices and then click on Create Promotional Offer:

You will need to specify the Reference Name, which is just a title, and the Promotional Offer Product Code, which is actually your offer's identifier:

Then you will need to specify pricing and promotional offer type. Offer types are the same as in introductory offers:

  • pay as you go;
  • pay upfront;
  • free.

Don't forget to save the changes.

Redeem Subscription Offer

You decide the criteria for which subscribers qualify for an offer. In your app, the details of the offers you set up in App Store Connect will appear in the discounts array in SKProduct object.

You may check user eligibility to purchase promotional offers using this SDK call:

Swift

// Checking eligibility for promotional offer
Apphud.checkEligibilityForPromotionalOffer(product: myProduct) { result in
  if result {
    // User is eligible to purchase a promotional offer
  }
}

To initiate a purchase, just call the following method:

Swift

// inside your purchase method, where discountID is identifier of SKProductDiscount object
Apphud.purchasePromo(product, discountID: discountID) { result in
    // handle result
}
static Future<ApphudPurchaseResult> purchasePromo({
    required String productId,
    required String discountID,
  })

This method automatically submits the App Store receipt to Apphud, so you don't need to call submitReceipt method.