We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc05889 commit 40834fdCopy full SHA for 40834fd
1 file changed
packages/console/app/src/routes/zen/util/handler.ts
@@ -762,7 +762,7 @@ export async function handler(
762
const billing = authInfo.billing
763
const billingUrl = `https://opencode.ai/workspace/${authInfo.workspaceID}/billing`
764
const membersUrl = `https://opencode.ai/workspace/${authInfo.workspaceID}/members`
765
- if (!billing.paymentMethodID) throw new CreditsError(t("zen.api.error.noPaymentMethod", { billingUrl }))
+ if (!billing.paymentMethodID && billing.balance <= 0) throw new CreditsError(t("zen.api.error.noPaymentMethod", { billingUrl }))
766
if (billing.balance <= 0) throw new CreditsError(t("zen.api.error.insufficientBalance", { billingUrl }))
767
768
const now = new Date()
0 commit comments