Referral After Three Billing Cycles

Sarah Chen refers Marcus Rodriguez to a $39 per month SaaS product on March 3rd. The referral program pays $100, but only after Marcus completes three successful billing cycles.

This example shows exactly when and how the referral becomes eligible, and what the resulting ledger entry looks like for finance reconciliation.

The setup

March 3: Signup and attribution

Marcus signs up using Sarah's referral code. TinyRefs records the attribution immediately, linking Marcus to Sarah. No earning is recorded at this point.

March 17: First billing cycle

Marcus converts from trial to paid plan. The first $39 invoice is paid. Status: one billing cycle complete. Still not eligible.

Progression to eligibility

The referral remains ineligible through the first two billing cycles. Eligibility occurs only after the third successful payment.

1 March 3: Signup Attribution recorded. No earning. 2 March 17: First invoice Billing cycle 1 of 3 complete. Status: Not eligible. 3 April 17: Second invoice Billing cycle 2 of 3 complete. Status: Not eligible. 4 May 17: Third invoice Billing cycle 3 of 3 complete. Condition satisfied. 5 May 17: Eligible Rule satisfied. Earning recorded.

The referral becomes eligible only after the third invoice payment. Nothing is recorded before this point.

Example events sent to TinyRefs

These payloads are illustrative. They show the events your application sends to record attribution and milestones. This is not a complete API reference.

Attribution
{
  "event": "referral.attributed",
  "occurred_at": "2025-03-03T14:30:00Z",
  "referred_customer_id": "marcus_rod_5591",
  "referral_code": "SARAH2025"
}

The referred customer is linked to the referrer at signup.

Eligibility milestone
{
  "event": "subscription.cycles",
  "occurred_at": "2025-05-17T09:15:00Z",
  "referred_customer_id": "marcus_rod_5591",
  "billing_cycle_count": 3
}

The 3 billing cycle milestone makes the referral eligible.

TinyRefs uses these events to evaluate the "eligible after 3 billing cycles" rule.

The eligibility rule

Eligibility occurs only after three successful billing cycles

The rule is simple and absolute: three paid invoices must complete before any earning is recorded. If Marcus cancels after one or two billing cycles, the rule is never satisfied and Sarah receives nothing. This protects the program from paying for churned customers.

The moment of eligibility

On May 17th, the third invoice event arrives. The system evaluates the rule automatically. Nothing happens before this moment. Once the condition is met, the change is immediate and deterministic.

What happens at exactly this moment

  • The invoice.paid event for billing cycle 3 arrives
  • The rule evaluates: have three billing cycles completed? Yes.
  • The referral status changes from pending to eligible
  • A ledger entry is created automatically

The ledger entry

At the moment of eligibility, TinyRefs creates a single ledger record. This entry is the source of truth for finance reconciliation and payout processing.

Field Value
Referrer Sarah Chen
Referred customer Marcus Rodriguez
Earning amount $100.00
Date earned May 17, 2025
Triggering event Third invoice paid
Status Eligible for payout
Referral ID ref_2x8k9m3p

Finance reconciliation

Finance exports ledger entries monthly. This record shows exactly who to pay (Sarah Chen), how much ($100), and why (three completed billing cycles for Marcus Rodriguez). The entry is reconciled against the three invoice payments in the billing system, then processed through the company's payroll. TinyRefs tracked the referral. The company handles the payout.

Explore further

This example demonstrates delayed eligibility based on billing cycles. Explore custom referral eligibility rules, subscription-based referral programs, or learn about event-based referral tracking.

This example shows how the model works in practice. Join the TinyRefs waitlist if you want to build programs like this.