RefRef LogoRefRef

Overview

Introduction to RefRef - the open source referral marketing platform

RefRef is an open source referral marketing platform that helps businesses grow through word-of-mouth. Build referral programs, affiliate networks, and partner programs that turn your customers into your most effective marketing channel.

Why RefRef?

Referral marketing is one of the most cost-effective customer acquisition strategies. Referred customers have higher lifetime values, convert at better rates, and cost less to acquire than those from paid channels. RefRef provides the infrastructure to launch and manage referral programs at any scale.

Open Source & Self-Hostable: Full transparency into the codebase, no vendor lock-in, and the option to run on your own infrastructure for complete data control.

Developer-First: Clean APIs, webhook integrations, and flexible architecture that fits into your existing stack without friction.

Built for Scale: From startups launching their first referral program to enterprises managing complex affiliate networks across multiple products.

Core Concepts

RefRef is built around a hierarchical structure that keeps your referral initiatives organized:

Organization
  └── Products
        └── Programs
              └── Participants → Referrals → Rewards

Organizations

Your top-level entity. An organization contains all your products, team members, and settings. Team members can have different roles (Owner, Admin) with appropriate permissions.

Learn more about Organizations →

Products

A product represents your application or service. Each product has its own API credentials, programs, and participant data. Organizations can have multiple products for different brands or applications.

Learn more about Products →

Programs

Programs define the rules for your referral campaigns. Choose from program templates:

  • Single-Sided Referral: Reward only the referrer when they bring new customers
  • Double-Sided Referral: Reward both referrer and referee (coming soon)
  • Affiliate Program: Commission-based revenue sharing for partners (coming soon)

Each program includes reward rules, branding configuration, and widget settings.

Learn more about Programs →

Participants

Participants are the people who refer others through your programs. They can be customers, affiliates, partners, or influencers. Each participant gets a unique referral code to share.

Learn more about Participants →

Qualifying Events

Qualifying events are the actions that trigger a successful referral. This could be a signup, purchase, subscription, or any custom event you define. When a qualifying event occurs with a valid referral code, rewards are generated.

Learn more about Qualifying Events →

Rewards

Rewards are what participants earn for successful referrals. RefRef supports fixed amounts, percentages, cash, credits, discounts, and more. Configure reward rules per program to match your business model.

Learn more about Rewards →

How It Works

1. Set Up Your Program

Create an organization, add your product, and configure a program with your chosen reward structure. Set your brand colors and customize the referral experience.

2. Integrate RefRef

Add the attribution script to track referral codes from URLs and cookies. Embed the referral widget so users can share their links and track rewards. Connect to your payment processor for automatic conversion tracking.

<!-- Attribution Script -->
<script src="https://assets.refref.app/attribution.js" defer></script>
 
<!-- Widget -->
<script src="https://assets.refref.ai/widget.js"></script>
<script>
  window.RefRef.init({
    productId: 'your-product-id',
    token: 'jwt-token-from-your-backend'
  });
</script>

3. Users Share & Earn

Participants share their unique referral links via email, social media, or direct messages. When someone signs up or makes a purchase using a referral link, the event is tracked and rewards are calculated automatically.

4. Track & Optimize

Monitor program performance through the RefRef dashboard. See which participants drive the most conversions, track reward payouts, and optimize your program based on data.

Integration Options

RefRef integrates with your existing tools:

Use Cases

RefRef works across industries:

  • B2B SaaS: Customer referral programs, partner networks, reseller incentives
  • Ecommerce: "Give $X, Get $X" programs, influencer affiliate tracking
  • B2C Subscription: Member-get-member programs for subscription businesses
  • Financial Services: Compliant referral programs for fintech and banking
  • Education: Student and alumni referral programs

Getting Started

Architecture

RefRef follows a clean, multi-tenant architecture:

  • API-First: RESTful API for all operations, enabling custom integrations
  • Webhook Events: Real-time notifications for referral activities
  • JWT Authentication: Secure, stateless authentication for the widget
  • Multi-Tenant: Organization-scoped data isolation
  • Extensible: Custom qualifying events and reward rules

RefRef is open source and available on GitHub. Contributions are welcome!

Next Steps

  1. Create your first program - Get a referral program running in minutes
  2. Explore the API - Build custom integrations with the RefRef API
  3. Join the community - Connect with other RefRef users and contributors

On this page