Referral Program
Invite
Payout
Track
Display
Generate a unique referral code per user
Able to look up the user based on the referral code
Regenerate the code
Able to see the available credits
Able to see the available pending credits based on the invitation
Send email with the referral code
Generate a unique link the email to see which email addresses click on the link
Show the list of referrees
Check if the referrer tries to invite an existing user, if YES, display a warning
Credit Rules
Lose 50% of available credits after 3 months if not used
Credit the referree upon signup
Credit the referrer if the referree as a renter who pays for the first booking
Credit the referrer if the referree as an owner who accepts the first booking and has a complete profile, insurance, and linked bank account.
Deduct the available credit from the service fee
The left over credits if the user has more credits would be carried to the next bookings
Deduct the service fee of the renter from the full payment stage
Deduct the service fee from the owner from the final payout
Award the referrer 25$ for a new renter and 75$ for the new owner
Award the new referree 25$ for renting an RV, and 50$ for listing an RV
Discredit
If the owner cancels before the referrer using the credit, subtract the credit from the referrer
If the owner cancels after the referrer using the credit, check if there is anymore credit left
If there is, subtract from that credit
If not, should the referrer gets a negative credit? ❓
If the renter cancels, the referrer should still get the credits
List of referrees by user
The referrer by user
Available credit
Pending credit
Amount used
Each earned credit expiry date
number of link clicks
GET api/referral/code/{code}
Return all of the information such as info, credits, pending credits
GET api/referral/code/{code}/referrees
POST api/referral/code
{user-id: 123123}
POST /api/referral/invite
{emails: [triho@futurify.vn, trangnguyen@futurify.vn, ...]}
HasSentInvitationBefore(email, senderId)
GenerateUniqueLinkForInvitation(email)
Based on the email, the link would be unique
Check if this email has been invited by this same user before?
If yes, display error
If no, let it through
Set up a cron job run nightly to check for every credit expiry date
POST /api/referral/credit
{action: signup, code: 13HYH22, userId: 12313}
POST /api/referral/credit
{action: pay-deposit, userId: 12313}
POST /api/referral/credit
{action: complete-owner-profile, userId: 12313}
Request the API when the owner accepts the first booking, check for the other conditions until all are met, issue the credit
Request the API when the owner complete the profile, check for the other conditions until all are met, issue the credit
Request the API when the owner completes the insurance, check for the other conditions until all are met, issue the credit
Request the API when the owner links the bank account, check for the other conditions until all are met, issue the credit
ApplyReferralCredit(booking, user, credit)
Apply the credits based on the rules ⚠
GetReferralCredit(userId)
General idea
User A wants to invite friends to join RVezy
He sends his code to 5 close fiend
One friend just signs up
Another friend also signs up but starts to book
User A gets rewarded with credit for his next booking or listing
Since only 2 new users get converted. He got 200 dollars credit, and 300 dollars in pending credit (not yet credit)