Skip to content
SaaS Starter
EN

Sign in

Sign in or create an account to continue.

Documentation

Set invitation rules and verify rewards

Configure referral conditions and verify attribution, activation, and credit rewards.

Enable referrals with APP_REFERRAL_ENABLED, set APP_REFERRAL_BASE_LINK to your frontend /invite?ref= address, and set the activation window with APP_REFERRAL_ACTIVATION_WINDOW_DAYS. In internal/bootstrap/host_hooks.go, onReferralRegistered grants 20 / 10 credits immediately, and onReferralActivated grants another 20 / 10 on first qualifying payment. Amounts are fixed in code.

A new account created through an invitation starts as pending. Its first qualifying paid subscription or lifetime purchase can activate the invitation. A free trial must convert to a paid subscription; buying a credit pack alone does not qualify. The activation deadline also applies. Each qualifying invitation grants 20 credits to the inviter and 10 to the invitee, once.

Test with two separate accounts and compare the inviter’s referral status and credit history after the qualifying purchase. Publish your reward amount and conditions so customers know what to expect. Third-party affiliate fees the template author may receive from marked recommendations are a separate mechanism.

APP_REFERRAL_ENABLED=true
APP_REFERRAL_BASE_LINK=https://app.example.com/invite?ref=
APP_REFERRAL_ACTIVATION_WINDOW_DAYS=30

Open invitations