mirror of
https://github.com/stablyai/orca.git
synced 2026-11-16 02:47:34 +00:00
Worker - Seats = org members from Orca Cloud auth (single source of truth; pending invites never count; min 1): auth pushes POST /v1/internal/seats, billing pulls /v1/internal/billing/org-members at Checkout and in a reconcile cron, fails closed (503) if auth is configured but unreachable. No token claim carries a count. - Proration: adds always_invoice, removals create_prorations (Stripe default). - Billing admin actions require a token minted in the last 6 minutes. - Payment failure: past_due_since (migration 0003); new starts stop at once; after 96 h (paymentGraceHours) reason payment_grace_expired + suspendRunning on check/usage, and GET /v1/internal/suspensions for the control plane. - Portal config: monthly<->annual + cancel only (seats follow membership). - e2e: seat add/remove proration, grace expiry -> suspend -> pay -> resume. Desktop - Team section + account menu item: members/roles, invite, change role, remove with confirm, revoke invites (owners/admins, auth role rules mirrored). - Payment issue banner with suspension date and Update payment method.
5 lines
312 B
SQL
5 lines
312 B
SQL
-- Payment failure grace: when billing first saw the subscription past_due/unpaid (epoch ms).
|
|
-- Cleared when it is paid again. New starts stop immediately; running sandboxes are suspended
|
|
-- once the plan's grace period has passed (entitlements.ts).
|
|
ALTER TABLE subscriptions ADD COLUMN past_due_since INTEGER;
|