diff --git a/app/demos/page.tsx b/app/demos/page.tsx index f7620d6..087ed01 100644 --- a/app/demos/page.tsx +++ b/app/demos/page.tsx @@ -11,6 +11,27 @@ type Language = "es" | "en"; type Vertical = "real-estate" | "restaurant" | "clinic" | "home-services" | "car-rental"; type Location = "generic" | "benalmadena"; +// Map internal plan names to Stripe price IDs +// Essential = Chat IA / AI Chat (€299) +// Profesional = Chat + Voz / Chat + Voice (€599) +// Premium = Empresa IA / AI Company (€1,499) +const PLAN_NAME_TO_STRIPE_ID: Record = { + // Spanish + "chat ia": "essential", + "chat + voz": "profesional", + "empresa ia": "premium", + // English + "ai chat": "essential", + "chat + voice": "profesional", + "ai company": "premium", +}; + +function getStripePlanId(planName: string, vertical: string): string { + const normalizedName = planName.toLowerCase().trim(); + const tier = PLAN_NAME_TO_STRIPE_ID[normalizedName] || "essential"; + return `demo-${vertical}-${tier}`; +} + const contentByLang = { es: { nav: { features: "Características", pricing: "Precios", contact: "Contacto", cta: "Pedir demo" }, @@ -473,7 +494,7 @@ function DemosContent() { ))}