diff --git a/app/profile/billing.tsx b/app/profile/billing.tsx index 39b3d08..43faed7 100644 --- a/app/profile/billing.tsx +++ b/app/profile/billing.tsx @@ -81,10 +81,10 @@ const getBillingCopy = (language: Language) => { freePlanName: 'Free', freePlanPrice: '0 EUR / Monat', proPlanName: 'Pro', - proPlanPrice: '4.99 EUR / Monat', + proPlanPrice: '4,99 € / Monat', proBadgeText: 'EMPFOHLEN', proYearlyPlanName: 'Pro', - proYearlyPlanPrice: '39.99 EUR / Jahr', + proYearlyPlanPrice: '39,99 € / Jahr', proYearlyBadgeText: 'SPAREN', proBenefits: [ '250 Credits jeden Monat', diff --git a/server/lib/billing.js b/server/lib/billing.js index 7dcce5f..1396608 100644 --- a/server/lib/billing.js +++ b/server/lib/billing.js @@ -308,6 +308,18 @@ const getValidProEntitlement = (customerInfo) => { return proEntitlement; } + // Fallback: entitlement is active but backed by a non-subscription product (e.g. a topup + // that was previously misconfigured to grant the pro entitlement). If the user also has a + // supported subscription product in their purchase history, honour the entitlement anyway. + const purchased = Array.isArray(customerInfo?.allPurchasedProductIdentifiers) + ? customerInfo.allPurchasedProductIdentifiers + : []; + const hasSubscription = purchased.some((id) => SUPPORTED_SUBSCRIPTION_PRODUCTS.has(id)); + if (hasSubscription) { + console.warn('[Billing] Pro entitlement backed by unsupported product but subscription found — honouring entitlement', summarizeRevenueCatCustomerInfo(customerInfo)); + return proEntitlement; + } + console.warn('[Billing] Ignoring unsupported RevenueCat pro entitlement', summarizeRevenueCatCustomerInfo(customerInfo)); return null; };