refactor: extract shared country list and plan prices

This commit is contained in:
Usman Baig
2026-03-26 21:22:12 +01:00
parent 4e7ad88763
commit d419322ab7
3 changed files with 50 additions and 35 deletions

View File

@@ -79,3 +79,14 @@ export function formatRetentionMonths(months: number): string {
if (Number.isInteger(years)) return years === 1 ? '1 year' : `${years} years`
return `${months} months`
}
/**
* Monthly prices in EUR cents per plan and traffic tier.
* IMPORTANT: Must stay in sync with backend GetSubscriptionAmount() in internal/billing/mollie.go
* Yearly = monthly * 11 (1 month free)
*/
export const PLAN_PRICES: Record<string, Record<number, number>> = {
solo: { 10000: 700, 50000: 1100, 100000: 1500, 250000: 2500, 500000: 3900, 1000000: 5500, 2500000: 7900, 5000000: 10300, 10000000: 13500 },
team: { 10000: 1100, 50000: 1900, 100000: 2300, 250000: 3900, 500000: 5900, 1000000: 7900, 2500000: 11900, 5000000: 15500, 10000000: 19900 },
business: { 10000: 1500, 50000: 2700, 100000: 3100, 250000: 5900, 500000: 7900, 1000000: 11100, 2500000: 16900, 5000000: 20700, 10000000: 26900 },
}