Building a Successful Referral Program
Best practices for designing and implementing a credit-based referral program that drives growth.
By cred.diy Team

Referral programs are one of the most cost-effective ways to grow your user base. When combined with a credit system, referrals become even more powerful – rewarding both parties with immediate, tangible value.
Why Credit-Based Referrals Work
Credit-based referrals outperform traditional programs because:
- Instant gratification: Users receive credits immediately
- Product engagement: Credits encourage feature exploration
- Measurable ROI: Track exactly how referrals impact usage
- Viral potential: Happy users become advocates
Designing Your Referral Program
Choose Your Incentives
Balance generosity with sustainability:
| Reward Type | Referrer | Referee | Best For |
|---|---|---|---|
| Aggressive | 200 credits | 100 credits | Early growth |
| Balanced | 100 credits | 50 credits | Steady growth |
| Conservative | 50 credits | 25 credits | Profitability |
Define Success Criteria
What action triggers the referral reward?
- Signup: Lowest friction, highest volume
- Verification: Reduces fraud
- First purchase: Ensures quality leads
- Usage milestone: Highest quality
Implementing with cred.diy
Step 1: Configure Referral Settings
const configureReferrals = async () => {
const response = await fetch(
'https://eutdgemlrpvnxfkkpvlu.supabase.co/functions/v1/credits-api/referral-settings',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': process.env.CRED_API_KEY
},
body: JSON.stringify({
is_active: true,
referrer_credits: 100,
referee_credits: 50,
credit_type_id: 'your_credit_type_id'
})
}
);
return response.json();
};
Step 2: Generate Referral Codes
Each user gets a unique referral code:
const generateCode = async (userId) => {
const response = await fetch(
'https://eutdgemlrpvnxfkkpvlu.supabase.co/functions/v1/credits-api/referrals/generate-code',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': process.env.CRED_API_KEY
},
body: JSON.stringify({ user_id: userId })
}
);
return response.json();
// { referral_code: 'ABC12XYZ' }
};
Step 3: Apply Referral Codes
When a new user signs up with a code:
const applyReferral = async (newUserId, referralCode) => {
const response = await fetch(
'https://eutdgemlrpvnxfkkpvlu.supabase.co/functions/v1/credits-api/referrals/apply',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': process.env.CRED_API_KEY
},
body: JSON.stringify({
user_id: newUserId,
referral_code: referralCode
})
}
);
return response.json();
// Both parties receive their credits
};
Promoting Your Referral Program
In-App Promotion
- Add a "Refer Friends" section to the dashboard
- Show referral stats (invites sent, credits earned)
- Display the referral code prominently
Email Campaigns
- Send referral reminders to engaged users
- Celebrate milestone achievements
- Share success stories
Social Sharing
- Generate shareable referral links
- Add social sharing buttons
- Create shareable graphics
Measuring Success
Track these key metrics:
- Referral rate: % of users who refer
- Conversion rate: % of referrals who sign up
- Viral coefficient: New users per existing user
- CAC comparison: Referral CAC vs. other channels
- LTV of referred users: Quality of referral traffic
Preventing Fraud
Implement safeguards against abuse:
- Email verification: Require verified emails
- Rate limits: Cap referrals per user per day
- IP tracking: Detect multiple accounts
- Delayed rewards: Wait for usage before crediting
- Manual review: Flag suspicious patterns
Best Practices
- Make it visible: Promote the program throughout your app
- Keep it simple: One clear call-to-action
- Reward both parties: Two-sided incentives work best
- Communicate value: "Give 50, Get 100" is clearer than "Refer a friend"
- Test and iterate: A/B test different reward amounts
Example: Successful Referral Flow
- User sees "Invite friends, earn 100 credits" banner
- Clicks and copies their unique referral link
- Shares via WhatsApp/email/social
- Friend clicks link, sees "Sign up and get 50 free credits"
- Friend signs up and verifies email
- Both users immediately receive credits
- Both receive email confirmation
Conclusion
A well-designed referral program can become your most efficient growth channel. By leveraging cred.diy's built-in referral system, you can launch a professional program in minutes and start growing through word-of-mouth.
Set up your referral program today!

Track Which Signups Actually Pay: Signup URL and Credit-Type Attribution
Knowing your top traffic sources isn't enough. Recording the signup URL and the credit type each user claimed shows which channels and offers bring paying customers.

Subscription Fatigue Is Real. Credits Are an Exit Route.
Flat monthly plans fit badly when usage varies wildly between customers. Credit-based billing lets people pay for what they use without another recurring commitment.