- Document that 402 QUOTA_EXCEEDED (51/50) is the verae-zapier-middleware shared tenant free-plan quota, not a customer balance gate; edge passes it through fail-closed (no mock certs). - tests/negative-balance.test.ts locks in: negative balance_cents still stamps. - src/jobs/overdue-balances.ts: effective balance = prepaid - unpaid issued invoices - unbilled usage; dry-run by default, --send uses existing mailer (SMTP_FROM). systemd unit/timer stubs in deploy/systemd. - src/billing/signup-credit.ts: SIGNUP_CREDIT_CENTS (default 5000) granted on new portal signup and admin create via credit ledger + ledgerAdjust; idempotent, no double grant on claim; admin create 409 on existing id. - docs/NEGATIVE-BALANCE.md
42 lines
1.7 KiB
Shell
42 lines
1.7 KiB
Shell
# Copy to .env (gitignored) and fill in your real Stripe secret key.
|
|
# The billing job (src/jobs/report-usage.ts) loads this via dotenv.
|
|
STRIPE_SECRET_KEY=sk_test_replace_me
|
|
# Optional: override SQLite locations
|
|
# ZAPPIER_DB=/absolute/path/to/zappier.db
|
|
# BILLING_DB=/absolute/path/to/billing.db
|
|
|
|
# BusinessStore driver (D006 / WP-L). Default: sqlite-file (BILLING_DB).
|
|
# BUSINESS_STORE=sqlite-file
|
|
# BUSINESS_STORE=libsql
|
|
# Required when BUSINESS_STORE=libsql (fail closed if missing):
|
|
# LIBSQL_URL=file:./tmp-business.db
|
|
# LIBSQL_URL=libsql://<host>
|
|
# LIBSQL_AUTH_TOKEN=
|
|
|
|
# Password-reset email (POST /portal/api/password/forgot). Gmail: STARTTLS on 587
|
|
# with an app password. Leave SMTP_USER/SMTP_PASS unset to disable (endpoint 503s
|
|
# with error=email_unavailable; capabilities.emailAvailable=false).
|
|
# On .138 these live in /etc/verae/zappier-edge-smtp.env (root 0600, systemd drop-in).
|
|
# SMTP_HOST=smtp.gmail.com
|
|
# SMTP_PORT=587
|
|
# SMTP_USER=veraetimestamp@gmail.com
|
|
# SMTP_FROM=veraetimestamp@gmail.com
|
|
# SMTP_FROM_NAME=Verae
|
|
# SMTP_PASS=
|
|
|
|
# Verae timestamp upstream (production: middleware on loopback).
|
|
# When set, edge fail-closes on non-2xx — never invents mock-cert-* receipts.
|
|
# ZAPPIER_UPSTREAM=http://127.0.0.1:3130
|
|
# Optional middleware API key forwarded as x-api-key to upstream.
|
|
# ZAPPIER_MIDDLEWARE_API_KEY=
|
|
|
|
# Dev-only: allow local mock-cert-* receipts when ZAPPIER_UPSTREAM is unset.
|
|
# Never enable in production.
|
|
# ALLOW_MOCK_CERTS=true
|
|
|
|
# New-customer signup credit in cents (portal signup + admin create). 0 disables.
|
|
# SIGNUP_CREDIT_CENTS=5000
|
|
|
|
# Daily overdue job (dist/jobs/overdue-balances.js); see docs/NEGATIVE-BALANCE.md
|
|
# OVERDUE_THRESHOLD_CENTS=0
|
|
# PORTAL_URL=https://zap.verae.ai/portal/
|