Discounts for End Users

The Insert Affiliate platform allows you to provide automatic discounts and trial offers to users who discover your app through affiliate links or short codes. This creates a seamless experience where users automatically receive promotional pricing without needing to manually enter discount codes.

How It Works

When someone clicks an affiliate link or enters a short code that's linked to an offer (configured in your Insert Affiliate Dashboard), the SDK automatically fills our SDK's OfferCode variable with the appropriate modifier that you have associated with this affiliate, (such as _oneWeekFree).

You can then append this modifier to your regular product ID to load the correct promotional version of your subscription or in-app purchase, for which you have set up Promotional offers or Intro Offers

Example Flow:

  1. Affiliate shares link: https://your-app.com/affiliate/ABC123 (this affiliate has a "one week free" offer modifier associated through our dashboard)
  2. User opens app: SDK detects the affiliate offer and sets OfferCode = "_oneWeekFree"
  3. User Navigates to Purchase screen: Instead of loading "monthlySubscription", your app checks if our SDK is storing a modifier from an affiliate and appends this to the base offer - resulting in the purchase loading "monthlySubscription_oneWeekFree"
  4. User sees discount: Automatic promotional pricing without manual code entry

Google Play Console Configuration (Required if supporting Android)

There are multiple ways you can configure your products in Google Play Console:

  1. Multiple Products Approach: Create both a base and a promotional product:

    • Base product: oneMonthSubscription
    • Promo product: oneMonthSubscription-oneweekfree
  2. Single Product with Multiple Base Plans: Create one product with multiple base plans, one with an offer attached

  3. Developer Triggered Offers: Have one base product and apply the offer through developer-triggered offers

  4. Base Product with Intro Offers: Have one base product that includes an introductory offer

Any of these approaches are suitable and work with the SDK. The important part is that your product naming follows the pattern where the offer code modifier can be appended to identify the promotional version.

If using the Multiple Products Approach:

  • Ensure both products are activated and available for purchase.
  • Generate a release to at least Internal Testing to make the products available in your current app build

App Store Connect Configuration (Required if supporting iOS)

Make sure you create the corresponding subscription products in App Store Connect:

  • Base subscription: i.e. oneMonthSubscription
  • Promotional variants: oneMonthSubscription_oneWeekFree, oneMonthSubscription_threeMonthsFree, etc.
Discount system workflow diagram showing how affiliate modifiers are applied to product IDs

Click to view full size

Insert Affiliate Setup Instructions

  1. Go to your Insert Affiliate dashboard at app.insertaffiliate.com/affiliates
  2. Select the affiliate you want to configure
  3. Click "View" to access the affiliate's settings
  4. Assign an iOS IAP Modifier to the affiliate (e.g., _oneWeekFree, _threeMonthsFree)
  5. Save the settings

Once configured, when users click that affiliate's links or enter their short codes, your app will automatically receive the modifier and can load the appropriate discounted product.

RevenueCat Configuration (Required if using RevenueCat)

If you're using RevenueCat for in-app purchase management, you must create corresponding products in your RevenueCat products catalogue to match the modifier system.

Products Catalogue Setup:

  1. Base products: Create your standard subscription products (e.g., monthlySubscription, yearlySubscription)
  2. Promotional variants: For each affiliate modifier you plan to use, create corresponding products in RevenueCat:
    • monthlySubscription_oneWeekFree
    • monthlySubscription_threeMonthsFree
    • yearlySubscription_oneWeekFree
    • etc.
RevenueCat products catalogue setup showing how to create promotional variants with modifiers

Click to view full size

Important Notes:

  • The product IDs in RevenueCat must exactly match the naming convention: {baseProductId}{modifier}
  • Each promotional variant should be configured with the appropriate pricing/trial period
  • Ensure these products are also properly configured in App Store Connect/Google Play Console
  • The modifier system works seamlessly with RevenueCat's existing promotional offer and introductory pricing features

For detailed RevenueCat integration steps, see our RevenueCat Setup Guide.


Required Code

Examples of code, implementation and additional requirements are detailed within the repositories under the relevant section.

iOS Setup

1. Install Required Packages and Complete Setup

To install the Insert Affiliate Swift SDK, follow the instructions on our GitHub repository.

All code changes required are described in detail with examples within the Github Repository.

Specific code changes required by Insert Affiliate for the Discounts for End Users setup can be found here.

React Native Setup

1. Install Required Packages and Complete Setup

To install the Insert Affiliate React Native SDK, follow the instructions on our GitHub repository.

All code changes required are described in detail with examples within the Github Repository.

Specific code changes required by Insert Affiliate for the Discounts for End Users setup can be found here.

Flutter Setup

1. Install Required Packages and Complete Setup

To install the Insert Affiliate Flutter SDK, follow the instructions on our GitHub repository.

All code changes required are described in detail with examples within the Github Repository.

Specific code changes required by Insert Affiliate for the Discounts for End Users setup can be found here.