{"id":"payments.subscriptions.turbineh","compat":{"runtime":"node@>=20","framework":"next@^16.0.0"},"schema":"turbineh.component/v0.1","source":{"purl":"pkg:generic/turbineh/payments.subscriptions.turbineh@0.1.0","repo":"https://github.com/alejandroruiz3c/code-api-turbineh"},"status":"approved","effects":{"db":true,"fs":false,"network":true,"external_services":["stripe"]},"license":{"declared":"Apache-2.0","detected":"Apache-2.0","obligations":["preserve-notice"]},"quality":{"tests":{"date":"2026-10-11","passed":true,"command":"unit (signature, access) + E2E against Stripe's official simulator (stripe-mock) in the sandbox"}},"version":"0.1.0","category":"payments","contract":{"errors":["Unsigned or forged webhooks are rejected (400); billing pages explain when Stripe is not configured"],"inputs":["Owner/admin upgrade and manage actions; Stripe webhooks at /api/billing/webhook"],"limits":["Stripe-hosted pages only (redirect host checked); 5-minute signature tolerance"],"outputs":["subscriptions table per workspace; requirePlan('pro') redirects non-paying workspaces to /dashboard/billing"]},"evidence":[{"ref":"bench/results (D3 recipes and components)","claim":"Upgrade, signed activation and cancellation verified end to end against stripe-mock","origin":"tested"}],"security":{"scope":"First-party source reviewed: HMAC-SHA256 signature with constant-time compare and replay tolerance, owner/admin-only plan changes, redirect host checks, no secrets in code.","tools":["gitleaks","semgrep","review"],"findings":[],"scanned_at":"2026-10-11"},"relations":{"provides":["payments.subscriptions"],"requires":[],"conflicts":[],"tested_with":["recipe.saas-crud"]},"capability":{"cons":["Needs a Stripe account and a Pro price id"],"does":"Workspace subscriptions with Stripe Billing: hosted Checkout in subscription mode, Customer Portal, signed webhooks, requirePlan guard","pros":["Maintained by TurbineH","No SDK and no card data in the app","Signed, idempotent webhook as the only writer"],"does_not":"Does not handle usage-based billing, taxes or multiple paid tiers out of the box (one Pro plan)","use_cases":["saas-crud","internal-tool","projects","analytics-dashboard","tracker","client-portal","bookings"],"alternatives":[]},"integration":{"config":["STRIPE_SECRET_KEY","STRIPE_WEBHOOK_SECRET","STRIPE_PRICE_PRO"],"install":"Copied by the assembler from files/ when selected: billing page and actions, webhook, rules, table, tests","strategy":"vendored-with-provenance","migrations":true}}