Search by

afaztech / reactor-referral

afaztech

Referral tracking with deep-link attribution for Reactor bots.

Package info

github.com/AfazTech/reactor-referral

Type:reactor-package

pkg:composer/afaztech/reactor-referral

Statistics

Installs: 5

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.2.0 2026-10-23 16:17 UTC

This package is auto-updated.

Last update: 2026-10-23 17:55:18 UTC


README

PHP Version License Reactor

Referral tracking for Reactor Telegram bots.

Features

  • Deep-link referral attribution
  • Lazy referral code generation per user
  • Manual referral confirmation
  • Referral statistics per user
  • Configurable code length and prefix
  • Self-referral prevention
  • Custom referral code generator

Requirements

  • afaztech/reactor-framework ^0.5.0

Installation

composer require afaztech/reactor-referral
./reactor migrate

Usage

use AfazTech\ReactorReferral\Contracts\ReferralManagerInterface;

$referral = $container->get(ReferralManagerInterface::class);

// Get a user's invite link.
$link = $referral->getLink($userId);

// Read their referral statistics.
$stats = $referral->stats($userId);

// Confirm a referral once the reward conditions are met.
$referral->confirm($referredUserId, 'force_join_passed');

Documentation

For detailed documentation, see DOCUMENT.md.

Contributing

Contributions are welcome. Please read the contribution guidelines.

License

This project is licensed under the MIT License.