diff --git a/ee/apps/den-api/src/inference.ts b/ee/apps/den-api/src/inference.ts index 0a130b0028..23108d79db 100644 --- a/ee/apps/den-api/src/inference.ts +++ b/ee/apps/den-api/src/inference.ts @@ -50,7 +50,7 @@ export function readInferenceMetadata(metadata: Record | null): } const inference = metadata.inference - if (inference.enabled !== true || inference.tier !== "tier1" && inference.tier !== "tier2") { + if (inference.enabled !== true || (inference.tier !== "tier1" && inference.tier !== "tier2")) { return null } diff --git a/ee/apps/den-api/src/stripe-billing.ts b/ee/apps/den-api/src/stripe-billing.ts index ead5f08332..a8365f18fd 100644 --- a/ee/apps/den-api/src/stripe-billing.ts +++ b/ee/apps/den-api/src/stripe-billing.ts @@ -677,7 +677,7 @@ export async function handleStripeWebhook(input: { payload: string; signature: s if (row) { await db .update(OrgSubscriptionTable) - .set({ status: "expired", last_event_id: event.id, updated_at: new Date() }) + .set({ status: "past_due", last_event_id: event.id, updated_at: new Date() }) .where(eq(OrgSubscriptionTable.id, row.id)) if (row.type === INFERENCE_SUBSCRIPTION_TYPE) { await setInferenceEnabled({ organizationId: row.organization_id, enabled: false })