{"record":{"id":"f9151a5efc61cf59","repo":"FlowiseAI/Flowise","slug":"no-active-price-found-for-the-product","errorCode":null,"errorMessage":"No active price found for the product","messagePattern":"No active price found for the product","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/server/src/IdentityManager.ts","lineNumber":521,"sourceCode":"                    productId = process.env.CLOUD_STARTER_ID as string\n                    break\n                case UserPlan.PRO:\n                    productId = process.env.CLOUD_PRO_ID as string\n                    break\n                case UserPlan.FREE:\n                    productId = process.env.CLOUD_FREE_ID as string\n                    break\n            }\n\n            // Get the default price ID for the product\n            const prices = await this.stripeManager.getStripe().prices.list({\n                product: productId,\n                active: true,\n                limit: 1\n            })\n\n            if (!prices.data.length) {\n                throw new Error('No active price found for the product')\n            }\n\n            // Create the subscription\n            const subscription = await this.stripeManager.getStripe().subscriptions.create({\n                customer: customer.id,\n                items: [{ price: prices.data[0].id }]\n            })\n\n            return {\n                customerId: customer.id,\n                subscriptionId: subscription.id\n            }\n        } catch (error) {\n            console.error('Error creating Stripe user and subscription:', error)\n            throw error\n        }\n    }\n","sourceCodeStart":503,"sourceCodeEnd":539,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/server/src/IdentityManager.ts#L503-L539","documentation":"Thrown during new-user provisioning when IdentityManager creates a Stripe subscription. After resolving the product ID from the user's plan (CLOUD_STARTER_ID / CLOUD_PRO_ID / CLOUD_FREE_ID env vars), it queries Stripe for an active price on that product. If the prices.list call returns zero entries, no subscribable price exists, so the flow aborts before creating the subscription. This is a configuration/data error in the Stripe account backing the cloud product catalog, not a runtime logic bug.","triggerScenarios":"Signup flow calling createUserAndSubscription with a valid UserPlan value. The matched env var resolves to a product ID whose prices are all archived/inactive in the Stripe dashboard, so prices.list({product, active:true, limit:1}) returns an empty data array. Also triggered if the env var holds a product ID that was deleted or replaced during a catalog migration without reactivating a price.","commonSituations":"Stripe product prices were archived after a plan rename or pricing change. Env var (e.g. CLOUD_FREE_ID) points at a stale product from a previous environment. Test/staging Stripe account never had prices created for the product. Product was created but price creation step was skipped in setup scripts.","solutions":["In the Stripe dashboard, open the product matching the failing plan's env var and confirm at least one price is active; reactivate or create a price if none exists.","Verify the env var value (CLOUD_STARTER_ID / CLOUD_PRO_ID / CLOUD_FREE_ID) matches a real, current product ID (prod_...) in the active Stripe account, not a deleted/archived one.","Confirm you are pointed at the correct Stripe account (check STRIPE_SECRET_KEY begins with the right live/test prefix) so the product lookup hits the expected catalog.","If migrating pricing, create the new active price before archiving the old one so there is never a zero-active-price window."],"exampleFix":"// before: relies on a price existing; fails opaquely on misconfig\nconst prices = await this.stripeManager.getStripe().prices.list({ product: productId, active: true, limit: 1 })\nif (!prices.data.length) {\n    throw new Error('No active price found for the product')\n}\n\n// after: surface which product/plan is missing its price\nif (!prices.data.length) {\n    throw new Error(`No active price found for product '${productId}' (plan ${userPlan}). Ensure a price exists and is active in Stripe.`)\n}","handlingStrategy":"validation","validationCode":"// Before signup, confirm each plan product has an active price in Stripe\nimport Stripe from 'stripe'\nconst stripe = new Stripe(process.env.STRIPE_SECRET_KEY!)\n\nasync function assertProductHasActivePrice(productIdEnv: string, plan: string) {\n    const productId = process.env[productIdEnv]\n    if (!productId) throw new Error(`Missing env ${productIdEnv} for plan ${plan}`)\n    const prices = await stripe.prices.list({ product: productId, active: true, limit: 1 })\n    if (!prices.data.length) {\n        throw new Error(`Plan ${plan} product ${productId} has no active price. Fix the Stripe catalog.`)\n    }\n}\n\n// run at boot\nawait Promise.all([\n    assertProductHasActivePrice('CLOUD_STARTER_ID', 'STARTER'),\n    assertProductHasActivePrice('CLOUD_PRO_ID', 'PRO'),\n    assertProductHasActivePrice('CLOUD_FREE_ID', 'FREE')\n])","typeGuard":"function hasActivePrice(prices: Stripe.ApiList<Stripe.Price>): prices is Stripe.ApiList<Stripe.Price> & { data: [Stripe.Price, ...Stripe.Price[]] } {\n    return prices.data.length > 0\n}","tryCatchPattern":"try {\n    const result = await identityManager.createUserAndSubscription(email, plan, referral)\n} catch (err) {\n    if (err instanceof Error && err.message.includes('No active price found')) {\n        // catalog/config issue: alert ops, do not retry against the same misconfigured product\n        logger.error('Stripe catalog misconfigured', { plan, err })\n        throw new InternalFlowiseError(StatusCodes.SERVICE_UNAVAILABLE, 'Billing setup incomplete')\n    }\n    throw err\n}","preventionTips":["Run a startup catalog check that verifies an active price exists for every plan product before accepting signups.","Create the new active price before archiving the previous one during pricing changes.","Keep product/price IDs in version-controlled env files with the Stripe account they belong to.","Use the same Stripe account in staging as production schema so catalog drift is caught early."],"tags":["stripe","billing","configuration","signup","env-vars"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}