Interim status report

Tegy billing lifecycle status

This report is a publishable progress snapshot for Tegy's Polar billing lifecycle. It is not the final purchase walkthrough report. The final report still requires approved lifecycle enforcement, usable Polar sandbox configuration, a completed seat purchase, and verified video clips for every step.

$20 Monthly price per active workspace seat.
prod Polar production product, token, and webhook are configured.
off Production enforcement flag remains disabled.
2 gates Enforcement approval and sandbox access remain open.

Lifecycle Map

Shipped

Backend foundation

D1 schema, billing status/plans/checkout/portal routes, Polar webhook ingestion, and provider error handling are on main.

Shipped

Production product

Polar production has public monthly seat-based Tegy Pro mapped to product 227f4ece-3491-4af4-8809-38dd9c187275.

Shipped

UI and refresh

The account billing dialog shows the plan, checkout return opens billing, and /api/billing/refresh reconciles customer state after return.

Approval gate

Lifecycle enforcement

Turn blocking affects the user-to-AI boundary and requires explicit operator approval before implementation.

Sandbox gate

Purchase walkthrough

Polar sandbox login/config is not usable yet, so no verified sandbox card checkout video exists.

Shipped Evidence

Split Status PR / commit Evidence
Backend foundation Production #488 Billing D1 schema, route handlers, Polar webhook handler, and billing tests.
Production product configuration Production #491 Tegy Pro production product, USD 20/month/seat, configured in Worker env.
Billing UI Production #494 Account menu billing dialog and checkout return notice.
Billing-required UI handling Production #496 Structured HTTP 402 handling opens billing UI without fake assistant content.
Lifecycle projection and route tests Covered #498 to #502 Active, canceling, past-due, inactive, webhook signature, dedupe, portal guard, and config-verifier coverage.
Checkout-return refresh Production #503 / 2c411a9 Production asset contains /api/billing/refresh; deployed version e19d7a9d-22ac-4f3e-8b95-dc95cc075ce0.
Evidence and runbook Current #505 / a7a89cc Current ledger and verification runbook document remaining gates and exact verifier output.

Current Verification Snapshot

Production Polar verifier

bash scripts/env-run.sh -- env POLAR_SERVER=production tsx scripts/verify-polar-config.ts

server: production
product lookup: ok
product name: Tegy Pro
product visibility: public
product recurring interval: month
product price mode: seat_based

Sandbox verifier

npm run billing:verify-polar-config

server: sandbox
access token: configured
monthly product: configured
product lookup: failed
error status: 401
error: invalid_token
Interpretation: Local encrypted env currently has production Polar credentials/product values while defaulting to POLAR_SERVER=sandbox. A dedicated sandbox token, product, and webhook secret are still required.

Production Smoke Evidence

Video Evidence Slots

The final report must replace these slots with real verified videos. They are listed here so missing evidence remains visible.

Planned

New user to checkout

Open Tegy as a new user or workspace, use Billing, start Polar checkout, and verify the checkout product and seat quantity.

Planned

Checkout return to active

Complete sandbox purchase, return to /new?billing=success, and show billing refresh projecting active entitlement.

Planned

Continue using Tegy

After purchase, submit a real Tegy turn and show a successful assistant response under active entitlement.

Planned

Portal and cancellation

Open the customer portal, cancel at period end, and show Tegy state becomes canceling while access remains active.

Planned

Payment recovery

Trigger or simulate past-due/revoked state, verify inactive access, then recover to active.

Planned

Production smoke

Verify production configuration and UI after the final enforcement and sandbox splits are shipped.

Open Gates

Gate Required before completion Current state
AI-boundary enforcement approval Explicit operator approval for rejecting unpaid turn submissions before chat hydration, persistence, or container dispatch. No approval has been given yet; implementation is intentionally held.
Polar sandbox access Usable sandbox organization, token, product, and webhook secret. Sandbox login remains blocked in the current browser session; production dashboard has no visible sandbox switch.
End-to-end purchase proof Verified sandbox or production purchase from new user to active entitlement and successful Tegy turn. Pending sandbox access and enforcement approval.

Source Links