Fix missing Stripe price config

This commit is contained in:
Arthur Belleville 2026-03-16 08:41:02 +01:00
parent 5775ff3c8f
commit 1a0d77857e
No known key found for this signature in database
3 changed files with 3 additions and 6 deletions

View file

@ -93,10 +93,7 @@ export function createConfig(secrets?: Secrets): AppConfig {
STRIPE_WEBHOOK_SECRET: isTestMode
? validateEnvVar("STRIPE_WEBHOOK_SECRET", process.env.STRIPE_WEBHOOK_SECRET)
: getStripeWebhookSecretFromEnv() || getStripeWebhookSecret(isStagingMode),
STRIPE_SOLO_PRICE_ID: validateEnvVar(
"STRIPE_SOLO_PRICE_ID",
process.env.STRIPE_SOLO_PRICE_ID
),
STRIPE_SOLO_PRICE_ID: validateEnvVar("STRIPE_SOLO_PRICE_ID", process.env.STRIPE_SOLO_PRICE_ID),
STRIPE_TEAM_MONTHLY_PRICE_ID: validateEnvVar(
"STRIPE_TEAM_MONTHLY_PRICE_ID",
process.env.STRIPE_TEAM_MONTHLY_PRICE_ID

View file

@ -253,7 +253,7 @@ const createCheckoutSession = (
quantity = Math.max(1, ownerContext.billingState.member_count);
}
}
if (!priceId) {
return c.json({ error: "priceId is required" }, 400);
}

View file

@ -2,8 +2,8 @@ import { useEffect, useRef } from "react";
import { useOrganization } from "../hooks/organization";
import { useCreateCheckoutSession } from "../hooks/stripe";
import {
PENDING_BILLING_CHECKOUT_PLAN_KEY,
isSignupBillingIntent,
PENDING_BILLING_CHECKOUT_PLAN_KEY,
satisfiesPendingCheckoutPlan,
} from "../lib/billing";
import { useMaybeUser } from "../providers/UserStoreProvider";