Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

feat(cloud): add stripe productid of cloud enterprise plan (#7244)

Marc Klingen24131e0791ef
diff --git a/web/src/ee/features/billing/utils/stripeProducts.ts b/web/src/ee/features/billing/utils/stripeProducts.ts
index 47aa4c0b55..0d0b3772dd 100644
--- a/web/src/ee/features/billing/utils/stripeProducts.ts
+++ b/web/src/ee/features/billing/utils/stripeProducts.ts
@@ -1,6 +1,10 @@
import { env } from "@/src/env.mjs";
import { type Plan } from "@langfuse/shared";
+const isTestEnvironment =
+ env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION === "DEV" ||
+ env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION === "STAGING";
+
type StripeProduct = {
stripeProductId: string;
mappedPlan: Plan;
@@ -17,11 +21,9 @@ type StripeProduct = {
// map of planid to plan name
export const stripeProducts: StripeProduct[] = [
{
- stripeProductId:
- env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION === "DEV" ||
- env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION === "STAGING"
- ? "prod_RoBuRrXjIUBIJ8" // test
- : "prod_RoYirvRQ4Kc6po", // live
+ stripeProductId: isTestEnvironment
+ ? "prod_RoBuRrXjIUBIJ8" // test
+ : "prod_RoYirvRQ4Kc6po", // live
mappedPlan: "cloud:core",
checkout: {
title: "Core",
@@ -38,11 +40,9 @@ export const stripeProducts: StripeProduct[] = [
},
},
{
- stripeProductId:
- env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION === "DEV" ||
- env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION === "STAGING"
- ? "prod_QgDNYKXcBfvUQ3" // test
- : "prod_QhK7UMhrkVeF6R", // live
+ stripeProductId: isTestEnvironment
+ ? "prod_QgDNYKXcBfvUQ3" // test
+ : "prod_QhK7UMhrkVeF6R", // live
mappedPlan: "cloud:pro",
checkout: {
title: "Pro",
@@ -61,11 +61,9 @@ export const stripeProducts: StripeProduct[] = [
},
},
{
- stripeProductId:
- env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION === "DEV" ||
- env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION === "STAGING"
- ? "prod_QgDOxTD64U6KDv" // test
- : "prod_QhK9qKGH25BTcS", // live
+ stripeProductId: isTestEnvironment
+ ? "prod_QgDOxTD64U6KDv" // test
+ : "prod_QhK9qKGH25BTcS", // live
mappedPlan: "cloud:team",
checkout: {
title: "Pro + Teams Add-on",
@@ -81,6 +79,13 @@ export const stripeProducts: StripeProduct[] = [
],
},
},
+ {
+ stripeProductId: isTestEnvironment
+ ? "prod_SToP5nTZpC4yO8" // test
+ : "prod_STnXok7GSSDmyF", // live
+ mappedPlan: "cloud:enterprise",
+ checkout: null,
+ },
];
export const mapStripeProductIdToPlan = (productId: string): Plan | null =>