Skip to content

Commit b9260b1

Browse files
committed
Update credit grant priority so that referrals come before ads
1 parent d94a5ee commit b9260b1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

common/src/constants/grant-priorities.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import type { GrantType } from '@codebuff/common/types/grant'
22

33
export const GRANT_PRIORITIES: Record<GrantType, number> = {
44
free: 20,
5-
ad: 30, // Ad credits consumed after free, before referral
6-
referral: 40,
5+
referral: 30,
6+
ad: 40,
77
admin: 60,
88
organization: 70,
99
purchase: 80,

packages/billing/src/billing.knowledge.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ Only last grant can go negative. No maximum debt limit enforced in code.
4848
## Grant Types and Priorities
4949

5050
- free (20): Monthly free credits
51-
- referral (40): Referral bonus credits
51+
- referral (30): Referral bonus credits (one-time bonuses, consumed before renewable ad credits)
52+
- ad (40): Ad impression credits (renewable source, consumed after referral)
5253
- admin (60): Admin-granted credits
5354
- organization (70): Organization credits
5455
- purchase (80): Purchased credits

0 commit comments

Comments
 (0)