File size: 1,033 Bytes
fbf3514
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import Razorpay from "razorpay";

let _razorpay: Razorpay | null = null;

export function getRazorpay(): Razorpay {
  if (!_razorpay) {
    _razorpay = new Razorpay({
      key_id: process.env.RAZORPAY_KEY_ID!,
      key_secret: process.env.RAZORPAY_KEY_SECRET!,
    });
  }
  return _razorpay;
}

export const PLANS = {
  free: {
    name: "Free",
    scans: 10,
    razorpay_plan_id: null,
    price_label: "₹0",
    features: ["10 scans per month", "All 8 clause categories", "Risk score and grade"],
  },
  pro: {
    name: "Pro",
    scans: Infinity,
    razorpay_plan_id: process.env.RAZORPAY_PRO_PLAN_ID!,
    price_label: "₹999/mo",
    features: ["Unlimited scans", "Contract uploads", "Clause explanations", "PDF exports"],
  },
  team: {
    name: "Team",
    scans: Infinity,
    razorpay_plan_id: process.env.RAZORPAY_TEAM_PLAN_ID!,
    price_label: "₹3,999/mo",
    features: ["Everything in Pro", "5 team seats", "10K API calls", "Priority support"],
  },
} as const;

export type PlanType = keyof typeof PLANS;