What Is a Referral Program?
Imagine this: Sarah loves your brand. She refers her friend Mike by sharing a link or code. Mike signs up and places an order. Both Sarah and Mike get rewards, and your business gains a new loyal customer. Referral programs help you:- Reward existing customers for bringing in new ones
- Encourage new customers with an immediate incentive
- Generate scalable, low-cost growth through trust
How Referral Programs Work in Gameball
| Role | Trigger Event | Reward Type |
|---|---|---|
| Referrer (Existing) | Friend completes a defined event | Points or Coupons |
| Referred Friend | Joins and completes the event | Bonus Coupon or Gift |
Event Types
Reward Amounts
Referral Logic
Gameball Automates Linking
Reward Issuance
Tracking
Standard Referral Flow Implementation
What This Is
This is the core referral flow that underpins all referral use cases across web, mobile apps, and offline channels. When implemented correctly, this flow ensures that referral codes are registered, tracked, and rewarded automatically based on your configuration.Why It Matters
It forms the baseline logic that powers all other referral implementations, including deep links, QR codes.Example Flow
Customer shares his referral link
Friend signs up using the link
Friend recieves his reward
Friend places his first order
Customer recieves his reward
Platform-Specific Integration
| Platform | How the Referral Code is Collected | Where to Send It | Tools or Notes |
|---|---|---|---|
| 🌐 Web (Widget) | Auto-detected from URL | No action required | Gameball widget handles logic |
| 💻 Web (Custom UI) | Extract from ?ref=CODE | referrerCode in API | Use Create/Update Customer API |
| 📱 Mobile App (SDK) | Deep link parameter (Branch or Adjust) | referrerCode in registerCustomer Method | Firebase is no longer supported |
| 🏬 POS / Call Center | Manual entry | referrerCode in create/update customer API | Supports offline, in-person referrals |
I. Web Using Gameball Widget
- The customer’s referral link or code is displayed within the widget.

- The customer shares this link or code with a friend (the referee).
- When the friend uses the shared link or code, Gameball automatically detects and registers the referral from the URL.
- No additional implementation is required on your side.
II. Web with Custom UI
If you’re integrating Gameball referrals using your own web UI instead of the widget, you can still fully enable referral functionality through the Gameball APIs. This process covers:- Displaying each customer’s unique referral link or code
- Detecting and capturing referral links when shared by referrers
- Submitting the referral code during sign-up
- (Optional) Validating referral codes to prevent self-referrals
1. Display the Customer’s Referral Link or Code
To show a customer their referral link or code in your UI, fetch it using the Get Customer API:referralCode: The customer’s unique referral code (e.g., SARAH123)referralLink: The complete shareable referral link (e.g., https://yourwebsite.com?referralCode=SARAH123)

- A “Share Your Referral Code” banner
- A “Copy Link” button
- Or a custom referral dashboard section
2. Detect Referral Visits
When a friend lands on your website using a referral link such as:
3. Track Referral Sign-ups
When the referred friend signs up, include the captured referral code in the Create/Update Customer API request. This links the referrer and referee together in Gameball.Important Notes:
-
referrerCodemust be included during initial registration. - If the code is invalid, Gameball ignores it silently; the customer is still created, but no referral link is formed.
4. (Optional) Validate Referral Codes Before Signup
To ensure customers don’t use their own referral code or an invalid one, you can validate the code before creating the account. Use the Validate Referrer Code API:- Exists and is valid
- Belongs to a different customer (to prevent self-referrals)
- Is eligible for use in the current flow
If the code is valid, proceed with the Create/Update Customer request as shown in step 3. Track Referral Sign-ups
III. Mobile Apps (Branch or Adjust)
Referral links in mobile apps are handled through Gameball’s Mobile SDKs in combination with a deep linking provider such as Branch or Adjust.Firebase Dynamic Links are no longer supported.
1
Configure Deep Linking
2
Extract the Referral Code
After the app opens from a referral link, use your deep linking provider’s SDK to extract the code.Example using Branch:
3
Register the Customer (Gameball SDK)
Once the code is extracted, call the registerCustomer (or registerPlayer, depending on the SDK version) method from the Gameball SDK and pass the
referrerCode as a parameter.Example:Alternative Flow (Manual Entry)
If the customer was not referred via a deep link, you can still allow referrals manually by:-
Adding a “Referral Code (Optional)” field on your registration/sign-up screen.
.png?fit=max&auto=format&n=E1xrJosZXF_642Xq&q=85&s=28f7019002fc36ed478e31fbc1f337a9)
- When the user submits the form, collect the entered referral code (if provided).
-
Then:
-
If you’re registering the customer via the frontend SDK, include
referrerCodein theregisterCustomercall as shown above. -
If you’re registering the customer via the backend API, include
referrerCodein the payload for the Create/Update Customer API:
-
If you’re registering the customer via the frontend SDK, include
- The referral link should be passed within the first registration call.
- If the referral code is missing or invalid, the customer will still be registered, but the referral relationship will not be created.
- Referral linking must occur within 5 minutes of registration to be counted.
- To customize this time window or referral linking logic, please contact your Gameball technical point of contact.
Summary
| Step | Action | Tool / Method |
|---|---|---|
| 1 | Configure Branch or Adjust | Gameball Dashboard |
| 2 | Extract referrerCode | branch.subscribe() / Adjust SDK |
| 3 | Register customer | Gameball.registerCustomer() |
| 4 | Referral linked | Gameball backend logic |
Monitoring Referral Progress

Suggested UI Components
Suggested UI Components
- Referral Welcome Popup: Show new users the reward received via referral.
- Referral Dashboard: Show Existing users who they’ve referred (pending/active)
Developer Checklist
| Step | Must-Do |
|---|---|
| Extract referral code | From URL param, QR, SDK, or manual |
| Pass referrerCode on registration | Via registerCustomer API |
| Trigger referral event | e.g. place_order, signup |
| Display referral progress | Use Referral History API |
| Validate referral codes | (Optional) via internal service |
| Integrate Branch/Adjust (for mobile apps only) | Via deep linking SDKs |
| Don’t allow referral code editing post-signup | Enforce immutability in UI/backend |
Related Resources
Get Customer API
Fetch referral codes and links for your UI
Create / Update Customer API
Attach
referrerCode during registrationCustomer Referrals API
Track referral history and counts programmatically
Branch.io Integration
Configure Branch deep links for referral flows
Adjust Integration
Set up Adjust as your mobile referral provider