ReferralFlo
Documentation

Built by developers,
for developers.

A documented, versioned, idempotent REST API. TypeScript SDK with full types. Webhooks with signed payloads. Everything you'd want, nothing you don't.

Getting started

Your first API call in 60 seconds.

API Reference

Every endpoint, every parameter.

Webhooks

Real-time events to your backend.

SDKs

First-class clients for major languages.

Recipes

Copy-paste solutions for common tasks.

Security

Auth, encryption, and best practices.

02Hello, World

Your first call in 60 seconds.

1Generate an API key in your dashboard
2Install the SDK: npm install @referralflo/sdk
3Initialize with your key and start making calls
4Run in sandbox mode until you're ready to go live
Full quickstart
first-referral.ts
// Initialize the ReferralFlo client
import { ReferralFlo } from '@referralflo/sdk';

const rf = new ReferralFlo({
  apiKey: process.env.RF_API_KEY,
});

// Track a referral
await rf.referrals.create({
  programId: 'prog_abc123',
  advocateId: 'adv_sarah_chen',
  refereeEmail: 'priya@example.com',
  metadata: { source: 'in-app-share' },
});

// Issue a reward
await rf.rewards.create({
  advocateId: 'adv_sarah_chen',
  amount: 25_00, // $25.00 in cents
  currency: 'USD',
  type: 'cash',
});

Need a developer's eye on your integration?

Our developer support team responds in under 4 hours, every time.