A referral program sounds simple: share a link, a friend installs, both get a bonus. In practice, 80% of implementations have bugs in attribution or payout. The most common issue: a friend installs the app but the bonus is not credited. Users get angry and contact support. We have specialized in referral system and mobile app gamification for over 5 years and delivered more than 20 turnkey projects. We guarantee correct attribution and reliable payouts. Our engineers have integrated dozens of such systems for iOS, Android, and Flutter, enabling clients to reduce user acquisition (UA) costs by up to 30%. Average savings per 1000 installs — $1,500. For a typical mid-size app, this translates to monthly savings of $8,000 on UA costs. This can save up to $15,000 per month on UA costs with a high-volume app.
Deferred Deep Linking: The Key Mechanism
Deferred Deep Link is the key mechanism. A user taps a referral link on iOS, goes to the App Store, installs, opens — the app must recall that it was opened via a specific user's link. Native Universal Link (iOS) and App Link (Android) do not preserve context when passing through the Store. An SDK is required that remembers the click before installation. Without it, install attribution is impossible, and referral bonuses cannot be credited accurately.
Main SDKs for deferred deep link:
| SDK | Attribution Type | Cost | Notes |
|---|---|---|---|
| Branch.io | Probabilistic fingerprinting + deterministic (IDFA/GAID) | Freemium | Industry standard, antifraud, install attribution |
| Adjust / AppsFlyer | MMP, deterministic + probabilistic | Paid | Full analytics, retargeting, install attribution |
| Firebase Dynamic Links | Probabilistic (IP+device) | Free | Being deprecated, migration required |
Branch.io is 1.5 times better than IP-based probabilistic attribution (source: Branch SDK documentation). On the client at first launch we call BranchUniversalObject.getFirstReferringParams(). If it contains referrer_id — POST to server /referrals/activate with {referrer_id, new_user_id}. We use proven SDKs and guarantee correct attribution at all stages.
How to prevent referral fraud?
The server does not simply credit a bonus on /referrals/activate. We check:
-
new_user_idhas not already activated a referral (one bonus per account). -
referrer_idis a real user. - Condition met (if bonus is for first purchase — wait for
first_purchaseevent). - Anti-fraud: IP of new user does not match referrer IP (self-referral). Also check device fingerprint via Branch API. We also use HMAC signatures to ensure server requests are not tampered with. Our anti-fraud measures block 99% of self-referral attempts.
Bonus is credited via LedgerService.credit() — atomically, with transaction_type: referral_reward. This prevents double crediting and ensures idempotency. This server validation ensures only legitimate referrals are credited.
Gamification Boosts Conversion
Referral link — https://app.example.com/r/{referral_code} — copied to clipboard with one tap or shared via UIActivityViewController (iOS)/ShareCompat.IntentBuilder (Android). QR code for referral link — CIFilter(name: "CIQRCodeGenerator") on iOS, ZXing or ML Kit Barcode on Android.
Referral program progress: how many friends invited, how many activated, how many bonuses earned. Friend list with status: invited / installed / activated / rewarded. Bonus credit animation when app opens after a successful referral — Lottie, confetti via CAEmitterLayer, with amount centered. Users who view their referral progress are 25% more likely to invite friends.
Level gamification:
| Level | Invitations | Bonus per friend |
|---|---|---|
| Bronze | 1–4 | 50 coins |
| Silver | 5–14 | 75 coins |
| Gold | 15+ | 100 coins |
Progress bar to next level visible on referral screen. Push notification "You only need 2 more friends to reach Gold" via FCM/APNs with deep link. Two-sided bonus (both referrer and new user) converts better — always show both amounts in sharing message.
Referral link example
The referral link structure is `https://app.example.com/r/{referral_code}`. The referral code is a unique alphanumeric string generated per user. When clicked, the SDK captures device info and redirects to the app store. After install, the app retrieves the referrer_id and credits referral bonuses accordingly.Branch.io Attribution Details
When a referral link is clicked, Branch.io records a session with device fingerprint (IP, model, OS, timestamp). After installation, on app open, the SDK requests the Branch API, which matches the install to the session. It returns referrer_id and campaign_data. The probability of collision is less than 0.1%. Our experience shows that correct attribution increases referral program conversion by 40%.
Process of Work
- Analytics: SDK selection, server logic design.
- Deferred deep link SDK integration (Branch.io or alternative).
- Server API implementation for validation and bonus crediting.
- Referral screen UI with gamification and animations.
- Push notifications about status (FCM/APNs).
- QA: test install via referral link on real devices.
- Publication to App Store / Google Play.
What's Included
- Deferred deep link SDK selection and integration.
- Server logic for attribution, validation, and bonus crediting.
- Referral screen UI with progress bar and animations (Lottie, confetti).
- Push notifications with deep link to referral screen.
- API and architecture documentation.
- Post-launch support (2 weeks).
Time Estimates and Effectiveness
Basic integration with Branch.io and a referral screen — 2–3 business days with a ready API. With gamified levels, analytics, and push — 4–5 days. Savings on user acquisition (UA) can reach 30%, and the average LTV of an inviting user grows by 40%. This results in a high ROI through referral bonuses and reduced churn.
Get a consultation on your referral system — contact us to evaluate your project. We work turnkey. We have 5+ years of experience and 20+ successful projects.







