Referral Code vs Referral Link for Mobile Apps
Referral code or referral link for a mobile app? A code works inside the app, a link survives the store install. Compare both and combine them in one flow.
Use a referral link when the friend does not have your app yet, and a referral code when they already have it and sign up inside it. A link survives the store install and arrives with the person. A code must be remembered and typed. You can run both with one invitation: a link that carries the code.
This guide compares the two on the points that decide a mobile program: who has the app, what the friend has to do, what survives the install, and how you credit the inviter. It ends with a design that keeps your code logic and adds link attribution.
When a typed referral code works
A code is a short string the inviter shares and the friend enters during sign-up. It works well in three cases.
- The friend already has the app. They open it, find the field, and type the code. No install step stands between the invitation and the sign-up.
- The code travels by voice or print. A creator reads it in a video, a coach says it at the gym, or it sits on a card. Nobody can tap a spoken word.
- You are running a first pilot. A handful of codes in a spreadsheet tells you whether people share at all.
A code needs no deep linking, which makes it the cheapest thing to build. The cost shows up when the friend does not have the app.
When a referral link works
A referral link is an ordinary link with referral turned on. The inviter shares it in a message, a chat or a post. The friend taps it and one of two things happens. With the app installed, the app opens on the destination you set. Without it, the friend goes to the store, installs, and opens the app.
A link works best when the friend has to install. It also costs the friend one tap instead of a form field, and you do not depend on them remembering a string across a store visit.
Why a link survives the install and a code needs typing
The store sits between the tap and the first launch. Neither App Store nor Google Play hands the app the message the person came from. A code in a message is gone by the time the app opens, so the friend has to remember it, find the sign-up field and type it correctly.
A referral link carries the invitation through the install for the friend:
- On Android, the Google Play install referrer carries the invitation, and the SDK reads it at first launch with no screen of yours.
- On iPhone, a short invitation page copies the invitation, the friend installs, and a system paste button in your app hands it to the SDK. The match is exact.
Make a referral link survive the App Store on iPhone shows the whole iPhone path with code.
Referral code vs referral link at a glance
| Referral code | Referral link | |
|---|---|---|
| Friend already has the app | Types the code at sign-up | Taps, and the app opens (credited when Count people who already have the app is on) |
| Friend has to install | Remembers the code through the store, then types it | Taps, installs, and the invitation arrives with them |
| Steps for the friend | Read, remember, find the field, type | One tap, plus the invitation page and paste button on iPhone |
| Works when spoken or printed | Yes | A QR code covers print |
| Evidence tied to the tap | None | Tap, install and sign-up are joined in one record |
| Build effort | Low | Low with link infrastructure |
| Reward logic | Yours | Yours |
Combine both: a link that carries the code
You do not have to pick. Make the code the slug of the referral link and one invitation serves every friend.
curl -X POST https://api.warplink.app/v1/links \
-H "Authorization: Bearer wl_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"app_id": "YOUR_APP_ID",
"slug": "ana42",
"destination_url": "https://example.com/invite",
"is_referral": true
}'
Ana shares https://acme.aplnk.to/ana42. Her friend taps it and installs, and no typing is involved. A friend who only hears "use code ana42" types it in your sign-up field, the way they do today. Both paths end at the same inviter in your database.
How WarpLink credits the link while your code logic stays
Your app claims the referral once the new user has an account. Your backend then receives a signed referral.claimed webhook. The payload names the link as data.link.slug and data.link.id, so the slug is your code.
function inviterFor(code) {
return db.inviters.findByCode(code.toLowerCase()); // the lookup you already have
}
function onReferralClaimed(event) {
const inviter = inviterFor(event.data.link.slug);
if (inviter) grantReward(inviter, event.data.installer_id);
}
function onTypedCode(code, installerId) {
const inviter = inviterFor(code);
if (inviter) grantReward(inviter, installerId);
}
grantReward stays yours. Make it idempotent on the installer id, so a friend who taps the link and also types the code earns the inviter one reward. The first valid claim for an app and installer id wins on our side, and the same rule keeps typed codes honest on yours.
Link and code each add something. The link adds a credited install: the record joins the tap, the install and the sign-up, with a match method, an exact flag, and the credit window. The code adds reach into places a tap cannot go. The Referrals report lists every link claim next to your other link analytics. Verify a referral before you grant the reward covers the checks to run on the webhook, and exact vs estimated referral matches explains what each match method proves.
Which should you build first
- Friends mostly install first and sign up later: start with the link.
- Friends mostly already have the app: a code is enough, and a link adds the install case when you need it.
- Invitations are spoken or printed: keep the code, and put the code in a link for everyone who can tap.
- You are unsure: ship the link with the code as the slug. It covers the cases above.
Whichever you choose, read the store rules for referral rewards before you decide who gets the reward.
Frequently Asked Questions
Should a mobile app use a referral code or a referral link?
Use a referral link when the friend does not have your app yet, because the link survives the store install and arrives with the person. Use a code when the friend already has the app and signs up inside it. A link that carries the code gives you one invitation that works for both.
Why does a referral code get lost when someone installs the app?
The App Store and Google Play do not pass a typed or copied code to the app they install. The friend has to remember the code, open the app, and type it. A link keeps the invitation attached to the install, so there is nothing to remember.
Can I keep my existing referral codes if I add links?
Yes. Create the link with the code as its slug. The signed webhook names the link, so your backend maps the slug to the same inviter that your code lookup returns. Your code logic, reward rules and database stay as they are.
Do referral links need a typed code at all?
No. The link identifies the inviter on its own. A code stays useful for invitations that cannot be tapped, such as a code read out loud, printed on a card, or shown in a video.
What if a friend taps the link and also types a code?
Key your reward on the installer id, which is your own id for the new user. The first valid claim for an app and installer id wins, and your backend can apply the same one-reward rule to a typed code.
Related Guides
- Best Ways to Add a Referral Program to a Mobile App: five approaches compared.
- Make a Referral Link Survive the App Store on iPhone: the invitation page, paste button and claim.
- Verify a Referral Install Before You Grant the Reward: the webhook checks.
- Referral Link Checklist: 20 Checks Before Launch: test the whole path on a phone.
- Referrals guide: links, claims, the report and troubleshooting.
How WarpLink Helps
WarpLink is link infrastructure for mobile teams, and a referral uses all three parts. Linking gives each inviter a referral link that opens the app or carries the invitation through the store. Attribution credits the install that follows a tap on that link and records how it matched. Analytics shows the results in the Referrals report next to your other links. You keep your codes, your lookup and your reward rules, and we send the signed webhook.
Create a free WarpLink account and turn on Referral link for a link. The free plan covers 10,000 clicks a month. See install attribution and app referral programs for the wider picture.
Try WarpLink on one real link
Deep linking, install attribution, and real-time analytics in one SDK. Free for 10K clicks a month, no sales call.
Stuck on setup? Email support@warplink.app and we will help you get one real link working.
WarpLink Team
Building affordable, reliable link infrastructure for mobile teams. Deep linking, install attribution, and real-time analytics in one SDK.
Related Posts
Best Referral Software for Mobile Apps in 2026
Six referral programs for mobile apps compared on how the invitation reaches the first launch, how the reward is granted and the price, with a source for each.
Android Install Referrer Referral Code in Kotlin
Pass a referral code through a Google Play install with the Play Install Referrer API in Kotlin, then let the WarpLink SDK read it and credit the inviter.
Replace Firebase Invites and Dynamic Links for Referrals
Firebase Invites ended in 2020 and Dynamic Links shut down in 2025. Move per-user invite links, install credit and the reward trigger to WarpLink step by step.