QR code referrals for mobile apps
A QR code referral puts a referral link on a card, a poster or the inviter's own screen. A friend scans it, taps the link and installs. We match the install that follows that tap to the person who showed the code and send your backend a signed referral.claimed webhook, so the reward waits for a real sign-up.
How it works
Create a referral link per inviter or host
Create a link for your app with Referral link turned on. Use one link per person for a code on their screen, or one per host for a gym desk, an event table or a store counter.
Turn the link into a QR code
Open the link in the dashboard and download its QR code as a PNG for print. For a code inside your app, render the link's short_url with any QR library. The code holds the short link, so the destination can change after printing.
Let the friend scan and tap
The phone camera shows the link and the friend taps it. With the app installed it opens on your destination. Without it, Android goes through Google Play and iPhone shows the invitation page, then the App Store.
Claim after sign-up
Read the invitation at first launch. Once the new user has an account, call claimReferral with your own id for that user. The first valid claim for an app and installer id is the one credited.
Grant the reward from the webhook
Verify the signature, skip event ids you have handled, and look up the inviter or host from data.link.id. Your backend grants the reward. Read the store rules for referral rewards before you design it.
Compare hosts in the Referrals report
The report lists each credited referral with its link, match and status, next to your other link analytics. REST and MCP return the same rows.
Create the link behind the code
// One referral link per inviter or host. The slug names the placement, so each scan maps to a host.
const response = await fetch("https://api.warplink.app/v1/links", {
method: "POST",
headers: {
// API key from Keys > API
Authorization: "Bearer wl_live_YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
app_id: "3f9a1c2e-6b7d-4e1a-9c2f-8a5b1d0e7c44",
slug: "host-union-station",
destination_url: "https://app.example/invite",
is_referral: true,
}),
});
const link = (await response.json()) as { short_url: string };
// Download the QR code for link.short_url from the link's page in the dashboard.import WarpLink
// First screen: offer the invitation paste.
WarpLinkPasteButton { result in
if case .success(let link) = result, link != nil { showInvitationApplied() }
}
// After sign-up: credit the invite with your own id for the new user.
WarpLink.claimReferral(installerId: user.warplinkId) { result in
guard case .success(let claim) = result, claim.status == .claimed else { return }
// Recorded. Your webhook grants the reward.
}// Nothing to paste on Android: the Play install referrer carries the invitation.
// After sign-up: credit the invite with your own id for the new user.
WarpLink.claimReferral(user.warplinkId) { result ->
result.onSuccess { claim ->
if (claim.status == ReferralClaimStatus.CLAIMED) {
// Recorded. Your webhook grants the reward.
}
}
}What you get
- Linking
- A referral link for each inviter or host, a downloadable QR code for each link, and an invitation page for iPhone visitors who do not have the app yet.
- Attribution
- Each claim credits the install that follows a tap on the referral link, with the match method and an exact flag, so you can tell an exact match from an estimated one.
- Analytics
- The Referrals report lists claims newest first, so you can compare hosts and placements. The same data is on REST at GET /v1/referrals and over MCP with list_referrals.
Common questions
How do I make a QR code for a referral?
Create a link with Referral link turned on, then download its QR code from the link page in the dashboard. For a code inside your app, render the link's short_url with a QR library.
Does the QR code itself carry the referral?
The code holds the link. The link carries the referral through the install: Android reads the Play install referrer, and iPhone uses the invitation page and the system paste button in your app.
Can one printed code serve a whole venue?
Yes. A code for one referral link credits the host for each friend who installs and signs up. Create one link per host so each host has separate results.
Do you grant the reward?
No. We credit the install and send a signed webhook. Your backend grants the reward and decides who receives it.
Does it work on iPhone and Android?
Yes. Use SDK 1.2.0 or later so the app reads the invitation at first launch and can claim it after sign-up.