diff --git a/src/server/model/billing.ts b/src/server/model/billing.ts index 31c090e..0760d48 100644 --- a/src/server/model/billing.ts +++ b/src/server/model/billing.ts @@ -7,10 +7,12 @@ import { import { env } from '../utils/env.js'; import { prisma } from './_client.js'; -lemonSqueezySetup({ - apiKey: env.billing.lemonSqueezy.apiKey, - onError: (error) => console.error('Error!', error), -}); +if (env.billing.lemonSqueezy.apiKey) { + lemonSqueezySetup({ + apiKey: env.billing.lemonSqueezy.apiKey, + onError: (error) => console.error('Error!', error), + }); +} export type SubscriptionTierType = keyof typeof env.billing.lemonSqueezy.tierVariantId;