mirror of
https://github.com/marcogll/TaxHacker_s23.git
synced 2026-01-13 13:25:18 +00:00
58 lines
1.3 KiB
TypeScript
58 lines
1.3 KiB
TypeScript
import Stripe from "stripe"
|
|
import config from "./config"
|
|
|
|
export const stripeClient: Stripe | null = config.stripe.secretKey
|
|
? new Stripe(config.stripe.secretKey, {
|
|
apiVersion: "2025-03-31.basil",
|
|
})
|
|
: null
|
|
|
|
export type Plan = {
|
|
code: string
|
|
name: string
|
|
description: string
|
|
benefits: string[]
|
|
price: string
|
|
stripePriceId: string
|
|
limits: {
|
|
storage: number
|
|
ai: number
|
|
}
|
|
isAvailable: boolean
|
|
}
|
|
|
|
export const PLANS: Record<string, Plan> = {
|
|
unlimited: {
|
|
code: "unlimited",
|
|
name: "Unlimited",
|
|
description: "Special unlimited plan",
|
|
benefits: ["Unlimited storage", "Unlimited AI analysis", "Unlimited everything"],
|
|
price: "",
|
|
stripePriceId: "",
|
|
limits: {
|
|
storage: -1,
|
|
ai: -1,
|
|
},
|
|
isAvailable: false,
|
|
},
|
|
early: {
|
|
code: "early",
|
|
name: "Early Adopter",
|
|
description: "Discounted plan for our first users who can forgive us bugs and childish problems :)",
|
|
benefits: [
|
|
"Special price for early adopters",
|
|
"512 Mb of storage",
|
|
"1000 AI file analysis",
|
|
"Unlimited transactions",
|
|
"Unlimited fields, categories and projects",
|
|
],
|
|
price: "€35 for a year",
|
|
stripePriceId: "price_1RHTmTAs8DS4NhOzGnWqxvZC",
|
|
limits: {
|
|
storage: 512 * 1024 * 1024,
|
|
ai: 1000,
|
|
},
|
|
isAvailable: true,
|
|
},
|
|
}
|