Skip to content
InfluToDocs

Guides

Give referred users a better offer

Show people who came through a creator a longer trial or a discount — gated in your app or with RevenueCat Targeting — let InfluTo check the setup, and tell creators' audiences about it.

Creators sell your app more easily when their audience gets something for using their link or code: a longer free trial, a first-month discount, a better yearly price. InfluTo tells your app whether the user was referred; what you offer them is up to you and is set up in your own paywall, in RevenueCat, or in the stores.

There are two ways to decide who sees the offer: check checkAttribution() in your app, which works with any purchase path, or let RevenueCat Targeting pick the offering from a subscriber attribute the SDK sets.

Know whether the user was referred

checkAttribution() returns attributed: true when InfluTo connected the install to a creator — through link-click matching, a link that carried the code into the app, or a code the user typed into your app. The result is stored on the device, so later calls are instant. Call it before you show the paywall, and again after your code field if the user entered a code there.

TSX
const attribution = await InfluTo.checkAttribution();
const paywall = attribution.attributed ? 'referral' : 'standard';
Swift
let attribution = await InfluTo.checkAttribution()
let paywall = attribution.attributed ? "referral" : "standard"
Kotlin
val attribution = InfluTo.checkAttribution() // suspend
val paywall = if (attribution.attributed) "referral" else "standard"
Dart
final attribution = await InfluTo.instance.checkAttribution();
final paywall = attribution.attributed ? 'referral' : 'standard';
TypeScript
const attribution = await InfluTo.checkAttribution();
const paywall = attribution.attributed ? 'referral' : 'standard';

attribution.referralCode tells you which creator, if you want a creator-specific deal.

Option 1: Gate the offer in your app

This works with RevenueCat and store-direct alike. Create the better offer as its own product (or offering) in your store setup — for example a yearly plan with a 14-day trial instead of 7 — and show it when attributed is true. Purchases of that product are verified and credited to the creator like any other.

Option 2: RevenueCat Targeting on influto_referral

When the SDK attributes a user, it also writes two RevenueCat subscriber attributes: influto_code (the creator's code) and influto_referral (the string "true"). InfluTo itself only reads influto_code; influto_referral exists so you can target referred users in RevenueCat.

Make sure the SDK writes the attributes

React Native does it automatically when react-native-purchases is installed, and Android finds the RevenueCat SDK automatically (or takes an explicit setter). iOS needs revenueCatAttributeSetter, Flutter revenueCatHook, and web a revenueCat binding. See the RevenueCat section of your SDK page: React Native · iOS · Android · Flutter · Web.

Create the referral offering in RevenueCat

Add an offering with the better packages — for example products with a longer trial or an introductory price.

Add a Targeting rule

In RevenueCat's Targeting, create a rule with a Custom attributes condition: influto_referral is true. Serve the referral offering, and place the rule above the one that serves everyone else. RevenueCat compares attribute values as strings, which matches the "true" the SDK writes. To give one creator's audience their own deal, target influto_code instead, with that creator's code as the value.

Sync attributes before fetching offerings

RevenueCat normally sends attributes to its servers when the app starts, goes to the background, or makes a purchase. Right after attribution, call RevenueCat's syncAttributesAndOfferingsIfNeeded() and show the offering it returns (current), so the rule applies in the same session. RevenueCat limits this call to five per minute.

Check it in InfluTo

Setup & SDK → What referred users get reads your RevenueCat project (with the v2 secret key you already added, read-only — it needs read access to apps, offerings, packages, products, Targeting and audiences) and shows the offering referred users get next to everyone else's: free trials per store, packages, and your Targeting rules in RevenueCat's order. It checks that:

  • a rule on influto_referral exists and serves a different, active offering;
  • no country or platform rule above it catches referred users first (promo rules on your own attributes may sit above it — users who hold that promo get it first), and promo rules below it are flagged, because referred users who also match them never reach them;
  • country rules below it are listed: referred users in those countries get the referral offering, which is right when its products are priced for those countries;
  • the referral offering has the same paywall metadata as your current one — an app that picks its paywall from offering metadata would otherwise show a different (or unpublished) paywall;
  • every package has a product on each store you sell on, and all products are active;
  • the iOS trial is longer than the usual one.

RevenueCat doesn't report Google Play free trials or store prices, so those two you confirm yourself: enter the Android trial length, and check the referral products cost the same as your usual ones in every country. InfluTo re-reads RevenueCat every day.

Tell creators and their audience

Turn on Show it on join pages and to creators and your join page, and each creator's campaign page, say "Your audience gets a 7-day free trial when they sign up through your link or code" — a reason to use the creator's link. It's shown only while the checks pass and the trial is longer on every store you sell on. You can add your own note (up to 120 characters), for example a discount InfluTo can't verify; it's shown as your words. A creator with their own influto_code rule sees their own offer.

Apple allows free trials of 3 days, 1 or 2 weeks, 1, 2, 3 or 6 months, or 1 year — there's no 10-day trial — so use one of those lengths on both stores. On iOS a free trial belongs to a product (its introductory offer), so the longer trial needs its own products in the same subscription group, at your usual price. On Google Play, add a base plan or an offer for new customers with a free-trial phase.

Your paywall must display RevenueCat's current offering, not a hard-coded one, for Targeting to have any effect. RevenueCat's own documentation is the reference for Targeting and for which conditions its Experiments support: Targeting · Customer attributes.

Store-direct apps

Without RevenueCat, use Option 1: check checkAttribution() and show your referral paywall with the better product. Both stores also have their own discount tools — for example App Store offer codes and promotional offers, and Google Play subscription offers with developer-determined eligibility. Each has its own eligibility rules, so check Apple's and Google's documentation before relying on one. InfluTo captures and verifies these purchases the same way as any other — see Store-direct.

What a discount does to the commission

Commission is a percentage of what the user actually pays, in USD. A 50% first-month discount halves the creator's commission on that payment, and a longer trial delays the first commission until the trial converts. Renewals at the full price earn the full rate. If you want creators to keep their full first commission, a longer trial is usually the friendlier choice. See Commissions and fees.

Keep it within store rules

  • Make the offer a better price or a longer trial for your subscription, paid through the store's own billing.
  • Don't pay or reward people for installing the app, or for ratings and reviews. Both stores restrict incentivized installs and reviews — check the App Store Review Guidelines and the Google Play Developer Program Policies before launching any promotion.
  • Describe the offer accurately on your paywall, and make sure creators describe it the same way.

Test it

Attribute a test install

Enter a test creator's code in your code field on a sandbox build, or install through their link. checkAttribution() should return attributed: true.

Check the attributes in RevenueCat

Open the sandbox customer in RevenueCat and confirm influto_code and influto_referral are set.

Confirm the paywall

After syncAttributesAndOfferingsIfNeeded(), the paywall should show the referral offering. Make a sandbox purchase and watch it arrive in the Integration log (under Setup & SDK, sandbox view) — see Verify the integration.

Next